aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2012-03-12 00:45:58 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2012-03-12 00:53:45 +0100
commit03a24a84e493f914d46488e8c4ae9e9d663c21d7 (patch)
tree6299dee664c6a97fa9fbbb3482aa7a97d6e7d0dd /src/server/scripts/Commands
parent5ca27f40cced56414900aaaf656b45353a41aaf8 (diff)
Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side. - Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis. - Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply. - Send correct packet contents for movement update in Unit::SetSpeed. - Misc. cleanup in affected scripts.
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 28920f7c109..1520a944f6e 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -413,7 +413,7 @@ public:
for (Tokens::const_iterator itr = entries.begin(); itr != entries.end(); ++itr)
{
uint32 entry = uint32(atoi(*itr));
- QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry);
+ QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry);
if (!result)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry);
@@ -498,22 +498,23 @@ public:
const_cast<CreatureTemplate*>(cInfo)->AIName = fields[64].GetString();
const_cast<CreatureTemplate*>(cInfo)->MovementType = fields[65].GetUInt32();
const_cast<CreatureTemplate*>(cInfo)->InhabitType = fields[66].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[67].GetFloat();
- const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[68].GetFloat();
- const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[69].GetFloat();
- const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[70].GetBool();
- const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[71].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[72].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[73].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[74].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[75].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[76].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->movementId = fields[77].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[78].GetBool();
- const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[79].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[81].GetUInt32();
- const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString());
+ const_cast<CreatureTemplate*>(cInfo)->HoverHeight = fields[67].GetFloat();
+ const_cast<CreatureTemplate*>(cInfo)->ModHealth = fields[68].GetFloat();
+ const_cast<CreatureTemplate*>(cInfo)->ModMana = fields[69].GetFloat();
+ const_cast<CreatureTemplate*>(cInfo)->ModArmor = fields[70].GetFloat();
+ const_cast<CreatureTemplate*>(cInfo)->RacialLeader = fields[71].GetBool();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[0] = fields[72].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[1] = fields[73].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[2] = fields[74].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[3] = fields[75].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[4] = fields[76].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->questItems[5] = fields[77].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->movementId = fields[78].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->RegenHealth = fields[79].GetBool();
+ const_cast<CreatureTemplate*>(cInfo)->equipmentId = fields[80].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->MechanicImmuneMask = fields[81].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->flags_extra = fields[82].GetUInt32();
+ const_cast<CreatureTemplate*>(cInfo)->ScriptID = sObjectMgr->GetScriptId(fields[83].GetCString());
sObjectMgr->CheckCreatureTemplate(cInfo);
}