+ Reply to Thread
Results 1 to 8 of 8

Thread: [tut] How to start fixing bugs

  1. #1
    MMOpro SMOD Grandelf will become famous soon enough Grandelf will become famous soon enough Grandelf's Avatar
    Join Date
    Nov 2009
    Posts
    116
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    2

    To start, you need to compile your own core.

    SVN: svn://arcemu.info/svn/trunk/

    When you compiled your own core, go to:


    Code:
     C:/yourcompile/src/arcemu-world
    Then the easiest fixes can be done is in Spellfixes.cpp I guess you should start there. Just open it I recommend using notepad++ since you can open more files at once with it. And it can easy handle 12000 lines.

    DL link notepad++: [Only registered and activated users can see links. ]

    Now if a spell just doesnt prog at all you can make it prog like this:


    Code:
    sp = dbcSpell.LookupEntryForced( SpellID );
    if( sp != NULL )
    {
    	sp->procFlags = PROC_ON_CAST_SPELL;
    }
    I think its pretty easy to understand what it does.

    This will log the id of the spell, that has to prog.

    Code:
    sp = dbcSpell.LookupEntryForced( SpellID );
    This are the prog flags, so on what you want a spell to trigger.

    Code:
    sp->procFlags = PROC_ON_CAST_SPELL;
    The PROC_ON_CAST_SPELL; can be changed by a lot more things, you can find them in the spellfixes.cpp to. There is a list arround line 480. For example you can change it to PROC_ON_MELEE_ATTACK; or PROC_ON_SPELL_CRIT_HIT; Now if you want a spell to prog with a certain prog chance you can do it like this.


    Code:
    sp = dbcSpell.LookupEntryForced( SpellID );
    if( sp != NULL )
    {
    	sp->procFlags = PROC_ON_CAST_SPELL;
    	sp->procChance = 10;
    }
    Now the spell with have a 10% prog chance.

    Now there are some spells that have to trigger on melee and spell cast. So how can do you do that:

    Code:
    sp->procFlags = PROC_ON_MELEE_ATTACK | PROC_ON_CAST_SPELL;
    Now it will prog on melee and when you cast a spell. You can add more just seperate it with a | And dont forget to only put a ; At the end. So one more example, and I will mark the things I just said so you can understand it better.

    Code:
    sp->procFlags = PROC_ON_MELEE_ATTACK | PROC_ON_RANGED_ATTACK | PROC_ON_CAST_SPELL;
    Where do I put it? There are over 8500 lines?

    You can put it at the tabs made by arcemu, like put Paladin spells at the tab paladin. You can also make your own tab, just create something like this at the end of the tab paladin or the tab warlock or above the class fixes:

    Code:
    	//////////////////////////////////////////////////////
    	// Your Name                                        //
    	//////////////////////////////////////////////////////
    Now there are also spells/talents that trigger another spell. But what if it doesnt?

    You can fix that by adding a trigger spell.

    Code:
    sp = dbcSpell.LookupEntryForced( SpellID );
    if( sp != NULL )
    {
    	sp->EffectApplyAuraName[0] = SPELL_AURA_PROC_TRIGGER_SPELL;
    	sp->EffectTriggerSpell[0]=TriggerSpellID;		
             sp->procFlags = PROC_ON_ANY_DAMAGE_VICTIM;
    	sp->procChance = 10;
    }
    Now you put a spellID, at TriggerSpellID. Now in this case if I put the ID of a talent at the SpellID and the SpellID that has to trigger at the TriggerSpellID, then the spell will trigger when the person that got that talent gets hit by another player/mob. I will give you an example on how you could fix a bug with it: Druid Owlkin frenzy.

    Code:
    //Druid - Owlkin Frenzy rank 1
    sp = dbcSpell.LookupEntryForced( 48389 );
    if( sp != NULL )
    {
    	sp->EffectApplyAuraName[0] = SPELL_AURA_PROC_TRIGGER_SPELL;
    	sp->EffectTriggerSpell[0]=48391;			
    	sp->procFlags = PROC_ON_ANY_DAMAGE_VICTIM;
    	sp->procChance = 5;
    }
    		
    //Druid - Owlkin Frenzy rank 2
    sp = dbcSpell.LookupEntryForced( 48392 );
    if( sp != NULL )
    {
    	sp->EffectApplyAuraName[0] = SPELL_AURA_PROC_TRIGGER_SPELL;
    	sp->EffectTriggerSpell[0]=48391;			
    	sp->procFlags = PROC_ON_ANY_DAMAGE_VICTIM;
    	sp->procChance = 10;
    }
    		
    //Druid - Owlkin Frenzy rank 3
    sp = dbcSpell.LookupEntryForced( 48393 );
    if( sp != NULL )
    {
    	sp->EffectApplyAuraName[0] = SPELL_AURA_PROC_TRIGGER_SPELL;
    	sp->EffectTriggerSpell[0]=48391;			
    	sp->procFlags = PROC_ON_ANY_DAMAGE_VICTIM;
    	sp->procChance = 15;
    }
    If you would put this in spellfixes.cpp, above the tab paladin, and compile your server, Owlkin Frenzy would work.

    Then when you think you are done and fixed some spells, save it and compile the arcemuVC90 in your C;\YourCompile\Win. Then copy the Arcemu-world, Arcemu-logon and collision.dll to your server folder. Then log on your server and test it.

    Ofc this are just some easy ways to fix spells. You should just try play with it a bit, and backup b4 you start so if it doesnt work out well you can change it back. You cant fix all spells with this, this are just some examples for prog chances. You need C++ knowledge to fix more spells in documents like spelleffects.cpp etc. But this is a great way to start =]

    Tip: Try to look a bit arround in the cpp files. And try to understand what the functions are doing. And when you think you understand it, try to make your own fix for another spell. It doesnt matter if your fix doesnt work, you can easy delete and start over again.


    I want to ask you not to flame me, I did my best to make this tuturial understandeble for everyone.

    Grandelf =]
    Last edited by Grandelf; 12-23-2009 at 04:00 PM.

  2. #2
    Administrator Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    527
    Thanks
    0
    Thanked 18 Times in 7 Posts
    Rep Power
    10

    Thanks for posting this mate, I hope this helps other people out.

  3. #3
    MMOpro Owner Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry's Avatar
    Join Date
    Mar 2009
    Location
    Serbia
    Posts
    1,294
    Thanks
    17
    Thanked 28 Times in 25 Posts
    Rep Power
    10

    Grandelf sholud reply to this thread so i can give him topic starter position.

  4. #4
    Administrator Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    527
    Thanks
    0
    Thanked 18 Times in 7 Posts
    Rep Power
    10

    Why did you post then?

  5. #5
    MMOpro Owner Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry's Avatar
    Join Date
    Mar 2009
    Location
    Serbia
    Posts
    1,294
    Thanks
    17
    Thanked 28 Times in 25 Posts
    Rep Power
    10

    Because when i made this thread he was unregistered :)

  6. #6
    Administrator Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    527
    Thanks
    0
    Thanked 18 Times in 7 Posts
    Rep Power
    10

    oooh I see, that would be a problem then lol

  7. #7
    MMOpro Owner Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry's Avatar
    Join Date
    Mar 2009
    Location
    Serbia
    Posts
    1,294
    Thanks
    17
    Thanked 28 Times in 25 Posts
    Rep Power
    10

    Quote Originally Posted by Grandelf View Post
    Ehm ok =P, Posted.
    Thank's dude, you are thread starter now

  8. #8
    Administrator Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian has a reputation beyond repute Lucian's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    527
    Thanks
    0
    Thanked 18 Times in 7 Posts
    Rep Power
    10

    Bout times lols

+ Reply to Thread

Similar Threads

  1. [Release] Weapon Skills on Start
    By Jerry in forum SQL Querys
    Replies: 3
    Last Post: 03-01-2010, 09:50 PM
  2. [Release] Start With Full Tier 7 And Every Slot Item
    By Jerry in forum Dead link's Archive
    Replies: 3
    Last Post: 01-07-2010, 03:46 PM
  3. How to make a wow server 3.2.0!+Fix bugs
    By Nicklas0912 in forum Mangos Guides
    Replies: 9
    Last Post: 12-20-2009, 08:25 PM
  4. How to make a wow server 3.2.0!+Fix bugs
    By Nicklas0912 in forum Emulator Website / Script's Releases
    Replies: 1
    Last Post: 08-13-2009, 04:28 AM
  5. Before you Start a Project
    By Jerry in forum Warcraft Maps
    Replies: 0
    Last Post: 03-29-2009, 06:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts