Merge
--HG-- branch : trunk
This commit is contained in:
@@ -341,9 +341,10 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
||||
|
||||
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
|
||||
|
||||
SetSpeed(MOVE_WALK, cinfo->speed );
|
||||
SetSpeed(MOVE_RUN, cinfo->speed );
|
||||
SetSpeed(MOVE_SWIM, cinfo->speed );
|
||||
SetSpeed(MOVE_WALK, cinfo->speed_walk );
|
||||
SetSpeed(MOVE_RUN, cinfo->speed_run );
|
||||
SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
|
||||
SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
|
||||
|
||||
SetFloatValue(OBJECT_FIELD_SCALE_X, cinfo->scale);
|
||||
|
||||
|
||||
+2
-1
@@ -88,7 +88,8 @@ struct CreatureInfo
|
||||
uint32 faction_A;
|
||||
uint32 faction_H;
|
||||
uint32 npcflag;
|
||||
float speed;
|
||||
float speed_walk;
|
||||
float speed_run;
|
||||
float scale;
|
||||
uint32 rank;
|
||||
float mindmg;
|
||||
|
||||
+5
-3
@@ -292,6 +292,7 @@ void Unit::SendMonsterMoveWithSpeedToCurrentDestination(Player* player)
|
||||
SendMonsterMoveWithSpeed(x, y, z, 0, player);
|
||||
}
|
||||
|
||||
|
||||
void Unit::SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime, Player* player)
|
||||
{
|
||||
if (!transitTime)
|
||||
@@ -421,8 +422,9 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 M
|
||||
|
||||
data << uint32(MovementFlags);
|
||||
|
||||
if (MovementFlags & MONSTER_MOVE_WALK)
|
||||
moveTime *= 1.05f;
|
||||
//enable me if things goes wrong or looks ugly, it is however an old hack
|
||||
//if (MovementFlags & MONSTER_MOVE_WALK)
|
||||
//moveTime *= 1.05f;
|
||||
|
||||
data << uint32(moveTime); // Time in between points
|
||||
data << uint32(1); // 1 single waypoint
|
||||
@@ -11744,7 +11746,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
|
||||
{
|
||||
// Set creature speed rate from CreatureInfo
|
||||
if (GetTypeId() == TYPEID_UNIT)
|
||||
speed *= this->ToCreature()->GetCreatureInfo()->speed;
|
||||
speed *= this->ToCreature()->GetCreatureInfo()->speed_walk;
|
||||
|
||||
// Normalize speed by 191 aura SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED if need
|
||||
// TODO: possible affect only on MOVE_RUN
|
||||
|
||||
@@ -185,7 +185,8 @@ struct boss_ionarAI : public ScriptedAI
|
||||
if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
||||
pSpark->GetMotionMaster()->MovementExpired();
|
||||
|
||||
pSpark->SetSpeed(MOVE_RUN, pSpark->GetCreatureInfo()->speed * 2);
|
||||
//now handle by db
|
||||
//pSpark->SetSpeed(MOVE_RUN, pSpark->GetCreatureInfo()->speed * 2);
|
||||
pSpark->GetMotionMaster()->MovePoint(POINT_CALLBACK, pos);
|
||||
}
|
||||
}
|
||||
@@ -430,7 +431,8 @@ struct mob_spark_of_ionarAI : public ScriptedAI
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
|
||||
m_creature->SetSpeed(MOVE_RUN, m_creature->GetCreatureInfo()->speed * 2);
|
||||
//now handle by db
|
||||
//m_creature->SetSpeed(MOVE_RUN, m_creature->GetCreatureInfo()->speed * 2);
|
||||
m_creature->GetMotionMaster()->MovePoint(POINT_CALLBACK, pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ extern DatabasePostgre WorldDatabase;
|
||||
extern DatabaseMysql WorldDatabase;
|
||||
#endif
|
||||
|
||||
const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiifffliiiiiiiliiisi";
|
||||
const char CreatureInfodstfmt[]="iiiiiiiiiisssibbiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiifffliiiiiiiliiiii";
|
||||
const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiifffliiiiiiiliiisi";
|
||||
const char CreatureInfodstfmt[]="iiiiiiiiiisssibbiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiifffliiiiiiiliiiii";
|
||||
const char CreatureDataAddonInfofmt[]="iiiiiis";
|
||||
const char CreatureModelfmt[]="iffbi";
|
||||
const char CreatureInfoAddonInfofmt[]="iiiiiis";
|
||||
|
||||
Reference in New Issue
Block a user