Jump to content

move speed?


Recommended Posts

spell_work is a utility, orignally created by DisLord (a.k.a. Chestr ). He no longer develops or maintains this program, but did release the source code so others may continue work upon the code.

Put briefly, spell_work is used for reading and comparing spell data from the client DBC files and server database. Perhaps someone having more experience with this tool can provide a more complete description.

It has been ported to C# and is currently maintained by LordJZ and Konctantin. Here's a link to the thread... http://getmangos.eu/community/topic/13617/spell-work-in-c/

Link to comment
Share on other sites

  • 41 years later...

hey, patman. thanks for the reply.

i'm guessing MAX_MOVE_TYPE would be a number around 3, for normal, ground mounts and aerial mounts.

if so, if one gets debuffed by some skill and his move speed reduces to 40%.

where is that applied to? m_speed_rate?

this is why i've been thinking move speed of characters would be stored somewhere.

Link to comment
Share on other sites

hey, patman. thanks for the reply.

i'm guessing MAX_MOVE_TYPE would be a number around 3, for normal, ground mounts and aerial mounts.

if so, if one gets debuffed by some skill and his move speed reduces to 40%.

where is that applied to? m_speed_rate?

this is why i've been thinking move speed of characters would be stored somewhere.

Yes, its stored in the DDR server :D, when the player enter in the game, the speed rate its initialized and its will changed over time.

So the m_speed_rate change when you mount or when you debuffed,there are some function which set speed_rate.

Its why m_speed_rate is a variable .. lol

Link to comment
Share on other sites

i'm guessing MAX_MOVE_TYPE would be a number around 3, for normal, ground mounts and aerial mounts.

It's actually 9.

enum UnitMoveType
{
   MOVE_WALK           = 0,
   MOVE_RUN            = 1,
   MOVE_RUN_BACK       = 2,
   MOVE_SWIM           = 3,
   MOVE_SWIM_BACK      = 4,
   MOVE_TURN_RATE      = 5,
   MOVE_FLIGHT         = 6,
   MOVE_FLIGHT_BACK    = 7,
   MOVE_PITCH_RATE     = 8
};

Normal/ground mounts are MOVE_RUN, aerial mounts are MOVE_FLIGHT, but they are changed by many things.

Link to comment
Share on other sites

Yes, its stored in the DDR server :D, when the player enter in the game, the speed rate its initialized and its will changed over time.

Would I sound stupid to ask what DDR server is? I really need a lot of studying...... :(

See here for more explication and if you have some other question, we are here :D .

Link to comment
Share on other sites

i've been trying to read some source codes to find out where movement debuffs are applied.

so far, i've found out that speed is initialized in Unit.cpp thanks to patman128, and MotionMaster.cpp holds info on

confusedmovement, fleeingmovement, etc but i think these are for creatures only? not sure about this.

and from Spell.cpp and SpellEffects.cpp i can see that a lot of effects on movement are coded here, such as knockbacks, pulls, leapbacks and stuff.

but i've been unable to find stuff on pure movement speed.

for example, if a warrior uses 'hamstring' and the target gets 40% off his movement speed. where can i find the code that says this?

Link to comment
Share on other sites

Looking at Hamstring (Rank 1) in SpellWork, it says that it has Effect 1: Id 6 (SPELL_EFFECT_APPLY_AURA) with Aura Id 33 (SPELL_AURA_MOD_DECREASE_SPEED), value = -40. Looking up SPELL_AURA_MOD_DECREASE_SPEED in mangos reveals that it is handled by Aura::HandleAuraModDecreaseSpeed. In Aura::HandleAuraModDecreaseSpeed:

void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
{
   // all applied/removed only at real aura add/remove
   if(!Real)
       return;

   Unit* target = GetTarget();

   target->UpdateSpeed(MOVE_RUN, true);
   target->UpdateSpeed(MOVE_SWIM, true);
}

Link to comment
Share on other sites

thanks again patman. i've been doing some more research on it, and have gotten to aura_mod parts myself as well.

now i see that movement speed is forced by object->updateSpeed(). can't believe this took me a week!! :(

one last question... what is spellwork? is it a website? i've googled it, searched source codes, but came up with unhelpful results...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use