feat(DB/Creature): Allow to set swim and flight speeds (#10067)

This commit is contained in:
Kitzunu
2022-01-09 01:34:39 +01:00
committed by GitHub
parent 18830ae00e
commit dbc35e3495
5 changed files with 80 additions and 69 deletions

View File

@@ -446,8 +446,8 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
SetSpeed(MOVE_WALK, cinfo->speed_walk);
SetSpeed(MOVE_RUN, runSpeed);
SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
SetSpeed(MOVE_SWIM, cinfo->speed_swim);
SetSpeed(MOVE_FLIGHT, cinfo->speed_flight);
// Will set UNIT_FIELD_BOUNDINGRADIUS and UNIT_FIELD_COMBATREACH
SetObjectScale(cinfo->scale);

View File

@@ -193,6 +193,8 @@ struct CreatureTemplate
uint32 npcflag;
float speed_walk;
float speed_run;
float speed_swim;
float speed_flight;
float detection_range; // Detection Range for Line of Sight aggro
float scale;
uint32 rank;