diff options
18 files changed, 250 insertions, 165 deletions
diff --git a/sql/updates/world/2014_04_27_08_world_creature_template.sql b/sql/updates/world/2014_04_27_08_world_creature_template.sql new file mode 100644 index 00000000000..84157ed8633 --- /dev/null +++ b/sql/updates/world/2014_04_27_08_world_creature_template.sql @@ -0,0 +1,85 @@ +-- +UPDATE `creature_template` SET `difficulty_entry_2`=31917, `difficulty_entry_3`=37233 WHERE `entry`=13161; +UPDATE `creature_template` SET `difficulty_entry_1`=34131 WHERE `entry`=33105; +UPDATE `creature_template` SET `difficulty_entry_1`=35410 WHERE `entry`=34929; +UPDATE `creature_template` SET `difficulty_entry_2`=31919, `difficulty_entry_3`=37235 WHERE `entry`=12048; +UPDATE `creature_template` SET `difficulty_entry_1`=34277 WHERE `entry`=33387; +UPDATE `creature_template` SET `difficulty_entry_1`=34276 WHERE `entry`=34275; +UPDATE `creature_template` SET `difficulty_entry_1`=33815 WHERE `entry`=33806; +UPDATE `creature_template` SET `difficulty_entry_1`=33397 WHERE `entry`=33168; +UPDATE `creature_template` SET `difficulty_entry_1`=33942 WHERE `entry`=33809; +UPDATE `creature_template` SET `difficulty_entry_1`=34110 WHERE `entry`=34047; +UPDATE `creature_template` SET `difficulty_entry_1`=33668 WHERE `entry`=33667; +UPDATE `creature_template` SET `difficulty_entry_1`=33664 WHERE `entry`=33663; +UPDATE `creature_template` SET `difficulty_entry_1`=30801 WHERE `entry`=22271; +UPDATE `creature_template` SET `difficulty_entry_1`=30799 WHERE `entry`=22264; +UPDATE `creature_template` SET `difficulty_entry_1`=30797 WHERE `entry`=22270; +UPDATE `creature_template` SET `difficulty_entry_1`=37525, `difficulty_entry_2`=37526 WHERE `entry`=33351; +UPDATE `creature_template` SET `difficulty_entry_1`=30793 WHERE `entry`=22304; +UPDATE `creature_template` SET `difficulty_entry_2`=32044, `difficulty_entry_3`=37365 WHERE `entry`=13377; +UPDATE `creature_template` SET `difficulty_entry_3`=37363 WHERE `entry`=13256; +UPDATE `creature_template` SET `difficulty_entry_2`=32023, `difficulty_entry_3`=37343 WHERE `entry`=14944; +UPDATE `creature_template` SET `difficulty_entry_2`=32022, `difficulty_entry_3`=37342 WHERE `entry`=13219; +UPDATE `creature_template` SET `difficulty_entry_1`=34170 WHERE `entry`=34168; +UPDATE `creature_template` SET `difficulty_entry_3`=37341 WHERE `entry`=13419; +UPDATE `creature_template` SET `difficulty_entry_1`=33396 WHERE `entry`=33088; +UPDATE `creature_template` SET `difficulty_entry_2`=32010, `difficulty_entry_3`=37329 WHERE `entry`=14947; +UPDATE `creature_template` SET `difficulty_entry_1`=22562, `difficulty_entry_2`=32009, `difficulty_entry_3`=37328 WHERE `entry`=14774; +UPDATE `creature_template` SET `difficulty_entry_1`=22559, `difficulty_entry_2`=32006, `difficulty_entry_3`=37325 WHERE `entry`=14766; +UPDATE `creature_template` SET `difficulty_entry_2`=32005, `difficulty_entry_3`=37324 WHERE `entry`=10985; +UPDATE `creature_template` SET `difficulty_entry_2`=32002, `difficulty_entry_3`=37321 WHERE `entry`=14943; +UPDATE `creature_template` SET `difficulty_entry_1`=33730 WHERE `entry`=33516; +UPDATE `creature_template` SET `difficulty_entry_2`=32000, `difficulty_entry_3`=37319 WHERE `entry`=603; +UPDATE `creature_template` SET `difficulty_entry_1`=35425 WHERE `entry`=35346; +UPDATE `creature_template` SET `difficulty_entry_2`=31998, `difficulty_entry_3`=37317 WHERE `entry`=13977; +UPDATE `creature_template` SET `difficulty_entry_2`=31997, `difficulty_entry_3`=37316 WHERE `entry`=15139; +UPDATE `creature_template` SET `difficulty_entry_2`=31995, `difficulty_entry_3`=37314 WHERE `entry`=13281; +UPDATE `creature_template` SET `difficulty_entry_2`=31993, `difficulty_entry_3`=37312 WHERE `entry`=13440; +UPDATE `creature_template` SET `difficulty_entry_2`=31992, `difficulty_entry_3`=37311 WHERE `entry`=12052; +UPDATE `creature_template` SET `difficulty_entry_2`=31990, `difficulty_entry_3`=37309 WHERE `entry`=13378; +UPDATE `creature_template` SET `difficulty_entry_2`=31988, `difficulty_entry_3`=37307 WHERE `entry`=14142; +UPDATE `creature_template` SET `difficulty_entry_2`=31987, `difficulty_entry_3`=37306 WHERE `entry`=13528; +UPDATE `creature_template` SET `difficulty_entry_2`=31985, `difficulty_entry_3`=37304 WHERE `entry`=13516; +UPDATE `creature_template` SET `difficulty_entry_2`=31984, `difficulty_entry_3`=37303 WHERE `entry`=13357; +UPDATE `creature_template` SET `difficulty_entry_3`=37301 WHERE `entry`=11998; +UPDATE `creature_template` SET `difficulty_entry_2`=31980, `difficulty_entry_3`=37299 WHERE `entry`=13597; +UPDATE `creature_template` SET `difficulty_entry_2`=31979, `difficulty_entry_3`=37298 WHERE `entry`=15106; +UPDATE `creature_template` SET `difficulty_entry_3`=37295 WHERE `entry`=14285; +UPDATE `creature_template` SET `difficulty_entry_1`=34228 WHERE `entry`=34213; +UPDATE `creature_template` SET `difficulty_entry_2`=31974, `difficulty_entry_3`=37293 WHERE `entry`=11676; +UPDATE `creature_template` SET `difficulty_entry_2`=31973, `difficulty_entry_3`=37392 WHERE `entry`=13446; +UPDATE `creature_template` SET `difficulty_entry_1`=37611 WHERE `entry`=36913; +UPDATE `creature_template` SET `difficulty_entry_1`=37610 WHERE `entry`=36610; +UPDATE `creature_template` SET `difficulty_entry_1`=33839 WHERE `entry`=33838; +UPDATE `creature_template` SET `difficulty_entry_2`=25389 WHERE `entry`=25390; +UPDATE `creature_template` SET `difficulty_entry_1`=34148 WHERE `entry`=34147; +UPDATE `creature_template` SET `difficulty_entry_2`=31971, `difficulty_entry_3`=37290 WHERE `entry`=14768; +UPDATE `creature_template` SET `difficulty_entry_1`=22545, `difficulty_entry_2`=31969, `difficulty_entry_3`=37288 WHERE `entry`=14771; +UPDATE `creature_template` SET `difficulty_entry_2`=31962, `difficulty_entry_3`=37280 WHERE `entry`=13155; +UPDATE `creature_template` SET `difficulty_entry_1`=29853 WHERE `entry`=29818; +UPDATE `creature_template` SET `difficulty_entry_1`=25683, `difficulty_entry_2`=25704 WHERE `entry`=25537; +UPDATE `creature_template` SET `difficulty_entry_2`=25412 WHERE `entry`=25323; +UPDATE `creature_template` SET `difficulty_entry_2`=31961, `difficulty_entry_3`=37279 WHERE `entry`=13776; +UPDATE `creature_template` SET `difficulty_entry_1`=35356, `difficulty_entry_2`=35357, `difficulty_entry_3`=35358 WHERE `entry`=34630; +UPDATE `creature_template` SET `difficulty_entry_1`=35353, `difficulty_entry_2`=35354, `difficulty_entry_3`=35355 WHERE `entry`=34628; +UPDATE `creature_template` SET `difficulty_entry_2`=31959, `difficulty_entry_3`=37277 WHERE `entry`=13139; +UPDATE `creature_template` SET `difficulty_entry_2`=31958, `difficulty_entry_3`=37376 WHERE `entry`=13153; +UPDATE `creature_template` SET `difficulty_entry_2`=31957, `difficulty_entry_3`=37275 WHERE `entry`=13318; +UPDATE `creature_template` SET `difficulty_entry_2`=31956, `difficulty_entry_3`=37274 WHERE `entry`=13152; +UPDATE `creature_template` SET `difficulty_entry_2`=31955, `difficulty_entry_3`=37273 WHERE `entry`=13154; +UPDATE `creature_template` SET `difficulty_entry_2`=31954, `difficulty_entry_3`=37272 WHERE `entry`=13320; +UPDATE `creature_template` SET `difficulty_entry_2`=31953, `difficulty_entry_3`=37271 WHERE `entry`=13319; +UPDATE `creature_template` SET `difficulty_entry_2`=31952, `difficulty_entry_3`=37270 WHERE `entry`=13140; +UPDATE `creature_template` SET `difficulty_entry_2`=31945, `difficulty_entry_3`=37263 WHERE `entry`=13428; +UPDATE `creature_template` SET `difficulty_entry_2`=31944, `difficulty_entry_3`=37362 WHERE `entry`=13427; +UPDATE `creature_template` SET `difficulty_entry_2`=31943, `difficulty_entry_3`=37261 WHERE `entry`=13531; +UPDATE `creature_template` SET `difficulty_entry_2`=31942, `difficulty_entry_3`=37260 WHERE `entry`=13523; +UPDATE `creature_template` SET `difficulty_entry_2`=31941, `difficulty_entry_3`=37259 WHERE `entry`=13519; +UPDATE `creature_template` SET `difficulty_entry_2`=31940, `difficulty_entry_3`=37358 WHERE `entry`=13426; +UPDATE `creature_template` SET `difficulty_entry_2`=31939, `difficulty_entry_3`=37257 WHERE `entry`=13425; +UPDATE `creature_template` SET `difficulty_entry_2`=31934, `difficulty_entry_3`=37252 WHERE `entry`=13424; +UPDATE `creature_template` SET `difficulty_entry_2`=31931, `difficulty_entry_3`=37249 WHERE `entry`=13527; +UPDATE `creature_template` SET `difficulty_entry_2`=31930, `difficulty_entry_3`=37248 WHERE `entry`=13539; +UPDATE `creature_template` SET `difficulty_entry_3`=37245 WHERE `entry`=13548; +UPDATE `creature_template` SET `difficulty_entry_2`=31925, `difficulty_entry_3`=37241 WHERE `entry`=10989; +UPDATE `creature_template` SET `difficulty_entry_3`=37238 WHERE `entry`=13959; diff --git a/sql/updates/world/2014_04_27_09_world_creature_template.sql b/sql/updates/world/2014_04_27_09_world_creature_template.sql new file mode 100644 index 00000000000..05da0b277c7 --- /dev/null +++ b/sql/updates/world/2014_04_27_09_world_creature_template.sql @@ -0,0 +1,23 @@ +-- +UPDATE `creature_template` SET `difficulty_entry_3`=37262 WHERE `entry`=13427; +UPDATE `creature_template` SET `difficulty_entry_3`=37258 WHERE `entry`=13426; +UPDATE `creature_template` SET `faction_A`=1215, `faction_H`=1215, `npcflag`=1048577 WHERE `entry`=31979; +UPDATE `creature_template` SET `faction_A`=21, `faction_H`=21 WHERE `entry`=29853; +UPDATE `creature_template` SET `faction_A`=114, `faction_H`=114 WHERE `entry`=34110; +UPDATE `creature_template` SET `faction_A`=1335, `faction_H`=1335, `npcflag`=4226 WHERE `entry`=32022; +UPDATE `creature_template` SET `faction_A`=1732, `faction_H`=1732, `npcflag`=16777216 WHERE `entry`=35410; +UPDATE `creature_template` SET `faction_A`=1534, `faction_H`=1534 WHERE `entry`=32006; +UPDATE `creature_template` SET `faction_A`=1534, `faction_H`=1534 WHERE `entry`=37325; +UPDATE `creature_template` SET `faction_A`=84, `faction_H`=84 WHERE `entry`=31919; +UPDATE `creature_template` SET `faction_A`=84, `faction_H`=84 WHERE `entry`=37235; +UPDATE `creature_template` SET `faction_A`=58, `faction_H`=58 WHERE `entry`=31917; +UPDATE `creature_template` SET `faction_A`=58, `faction_H`=58 WHERE `entry`=37233; +UPDATE `creature_template` SET `faction_A`=1217, `faction_H`=1217 WHERE `entry`=31934; +UPDATE `creature_template` SET `faction_A`=1217, `faction_H`=1217 WHERE `entry`=37252; +UPDATE `creature_template` SET `faction_A`=85, `faction_H`=85 WHERE `entry`=31962; +UPDATE `creature_template` SET `faction_A`=85, `faction_H`=85 WHERE `entry`=31943; +UPDATE `creature_template` SET `faction_A`=85, `faction_H`=85, `unit_class`=2 WHERE `entry`=37363; +UPDATE `creature_template` SET `faction_A`=1872, `faction_H`=1872, `npcflag`=4225 WHERE `entry`=30799; +UPDATE `creature_template` SET `faction_A`=1872, `faction_H`=1872, `npcflag`=129 WHERE `entry`=30797; +UPDATE `creature_template` SET `faction_A`=1872, `faction_H`=1872, `npcflag`=129 WHERE `entry`=30801; +UPDATE `creature_template` SET `faction_A`=1216, `faction_H`=1216, `npcflag`=3, `exp`=1 WHERE `entry`=31954; diff --git a/sql/updates/world/2014_04_27_10_world_creature_template.sql b/sql/updates/world/2014_04_27_10_world_creature_template.sql new file mode 100644 index 00000000000..f251bdd51aa --- /dev/null +++ b/sql/updates/world/2014_04_27_10_world_creature_template.sql @@ -0,0 +1,2 @@ +ALTER TABLE `creature_template` DROP `faction_H`; +ALTER TABLE `creature_template` CHANGE `faction_A` `faction` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 43596ffb4cb..d06f90c1aeb 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -166,7 +166,7 @@ void npc_escortAI::JustRespawned() //add a small delay before going to first waypoint, normal in near all cases m_uiWPWaitTimer = 2500; - if (me->getFaction() != me->GetCreatureTemplate()->faction_A) + if (me->getFaction() != me->GetCreatureTemplate()->faction) me->RestoreFaction(); Reset(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index df6bee51642..a106c98c786 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -165,8 +165,8 @@ void FollowerAI::JustRespawned() if (!IsCombatMovementAllowed()) SetCombatMovement(true); - if (me->getFaction() != me->GetCreatureTemplate()->faction_A) - me->setFaction(me->GetCreatureTemplate()->faction_A); + if (me->getFaction() != me->GetCreatureTemplate()->faction) + me->setFaction(me->GetCreatureTemplate()->faction); Reset(); } diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 521f39171af..098f3130fed 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -532,7 +532,7 @@ void SmartAI::JustRespawned() mDespawnState = 0; mEscortState = SMART_ESCORT_NONE; me->SetVisible(true); - if (me->getFaction() != me->GetCreatureTemplate()->faction_A) + if (me->getFaction() != me->GetCreatureTemplate()->faction) me->RestoreFaction(); GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN); mJustReset = true; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 2b64c647ef3..5949484cd23 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -261,11 +261,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate((*itr)->ToCreature()->GetEntry())) { - if ((*itr)->ToCreature()->getFaction() != ci->faction_A) + if ((*itr)->ToCreature()->getFaction() != ci->faction) { - (*itr)->ToCreature()->setFaction(ci->faction_A); + (*itr)->ToCreature()->setFaction(ci->faction); TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u", - (*itr)->GetEntry(), (*itr)->GetGUIDLow(), ci->faction_A); + (*itr)->GetEntry(), (*itr)->GetGUIDLow(), ci->faction); } } } diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 07b4eb5b594..40935a0712c 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -705,7 +705,7 @@ bool AuctionEntry::LoadFromDB(Field* fields) return false; } - factionTemplateId = auctioneerInfo->faction_A; + factionTemplateId = auctioneerInfo->faction; auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId); if (!auctionHouseEntry) { @@ -828,7 +828,7 @@ bool AuctionEntry::LoadFromFieldList(Field* fields) return false; } - factionTemplateId = auctioneerInfo->faction_A; + factionTemplateId = auctioneerInfo->faction; auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId); if (!auctionHouseEntry) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 926527e2bd9..5c25b9454cb 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -368,10 +368,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) if (!GetCreatureAddon()) SetSheath(SHEATH_STATE_MELEE); - if (team == HORDE) - setFaction(cInfo->faction_H); - else - setFaction(cInfo->faction_A); + setFaction(cInfo->faction); uint32 npcflag, unit_flags, dynamicflags; ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data); @@ -409,7 +406,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) UpdateAllStats(); // checked and error show at loading templates - if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_A)) + if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction)) { if (factionTemplate->factionFlags & FACTION_TEMPLATE_FLAG_PVP) SetPvP(true); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 19f9e110ab3..2db17b6fa1d 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -89,8 +89,7 @@ struct CreatureTemplate uint8 maxlevel; uint32 expansion; uint32 expansionUnknown; // either 0 or 3, sent to the client / wdb - uint32 faction_A; - uint32 faction_H; + uint32 faction; uint32 npcflag; float speed_walk; float speed_run; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 15d6e1dd288..32882de75ea 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14251,10 +14251,7 @@ void Unit::RestoreFaction() } if (CreatureTemplate const* cinfo = ToCreature()->GetCreatureTemplate()) // normal creature - { - FactionTemplateEntry const* faction = GetFactionTemplateEntry(); - setFaction((faction && faction->friendlyMask & 0x004) ? cinfo->faction_H : cinfo->faction_A); - } + setFaction(cinfo->faction); } } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a12b39a5f46..b8b05aecc42 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -419,19 +419,19 @@ void ObjectMgr::LoadCreatureTemplates() // 0 1 2 3 4 5 6 7 8 QueryResult result = WorldDatabase.Query("SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, " - // 9 10 11 12 13 14 15 16 17 18 19 20 21 - "modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction_A, faction_H, npcflag, speed_walk, " - // 22 23 24 25 26 27 28 29 30 31 32 33 34 - "speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, " - // 35 36 37 38 39 40 41 42 43 + // 9 10 11 12 13 14 15 16 17 18 19 20 21 + "modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction, npcflag, speed_walk, speed_run" + // 22 23 24 25 26 27 28 29 30 31 32 33 + "scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, " + // 34 35 36 37 38 39 40 41 42 "dynamicflags, family, trainer_type, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, " - // 44 45 46 47 48 49 50 51 52 53 54 + // 43 44 45 46 47 48 49 50 51 52 53 "type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, " - // 55 56 57 58 59 60 61 62 63 64 65 66 67 68 + // 54 55 56 57 58 59 60 61 62 63 64 65 66 67 "spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, " - // 69 70 71 72 73 74 75 76 77 78 79 80 + // 68 69 70 71 72 73 74 75 76 77 78 79 "InhabitType, HoverHeight, Health_mod, Mana_mod, Mana_mod_extra, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, " - // 81 82 83 84 85 86 + // 80 81 82 83 84 85 " questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName " "FROM creature_template;"); @@ -472,66 +472,65 @@ void ObjectMgr::LoadCreatureTemplates() creatureTemplate.maxlevel = fields[15].GetUInt8(); creatureTemplate.expansion = uint32(fields[16].GetInt16()); creatureTemplate.expansionUnknown = uint32(fields[17].GetUInt16()); - creatureTemplate.faction_A = uint32(fields[18].GetUInt16()); - creatureTemplate.faction_H = uint32(fields[19].GetUInt16()); - creatureTemplate.npcflag = fields[20].GetUInt32(); - creatureTemplate.speed_walk = fields[21].GetFloat(); - creatureTemplate.speed_run = fields[22].GetFloat(); - creatureTemplate.scale = fields[23].GetFloat(); - creatureTemplate.rank = uint32(fields[24].GetUInt8()); - creatureTemplate.mindmg = fields[25].GetFloat(); - creatureTemplate.maxdmg = fields[26].GetFloat(); - creatureTemplate.dmgschool = uint32(fields[27].GetInt8()); - creatureTemplate.attackpower = fields[28].GetUInt32(); - creatureTemplate.dmg_multiplier = fields[29].GetFloat(); - creatureTemplate.baseattacktime = fields[30].GetUInt32(); - creatureTemplate.rangeattacktime = fields[31].GetUInt32(); - creatureTemplate.unit_class = uint32(fields[32].GetUInt8()); - creatureTemplate.unit_flags = fields[33].GetUInt32(); - creatureTemplate.unit_flags2 = fields[34].GetUInt32(); - creatureTemplate.dynamicflags = fields[35].GetUInt32(); - creatureTemplate.family = uint32(fields[36].GetUInt8()); - creatureTemplate.trainer_type = uint32(fields[37].GetUInt8()); - creatureTemplate.trainer_class = uint32(fields[38].GetUInt8()); - creatureTemplate.trainer_race = uint32(fields[39].GetUInt8()); - creatureTemplate.minrangedmg = fields[40].GetFloat(); - creatureTemplate.maxrangedmg = fields[41].GetFloat(); - creatureTemplate.rangedattackpower = uint32(fields[42].GetUInt16()); - creatureTemplate.type = uint32(fields[43].GetUInt8()); - creatureTemplate.type_flags = fields[44].GetUInt32(); - creatureTemplate.type_flags2 = fields[45].GetUInt32(); - creatureTemplate.lootid = fields[46].GetUInt32(); - creatureTemplate.pickpocketLootId = fields[47].GetUInt32(); - creatureTemplate.SkinLootId = fields[48].GetUInt32(); + creatureTemplate.faction = uint32(fields[18].GetUInt16()); + creatureTemplate.npcflag = fields[19].GetUInt32(); + creatureTemplate.speed_walk = fields[20].GetFloat(); + creatureTemplate.speed_run = fields[21].GetFloat(); + creatureTemplate.scale = fields[22].GetFloat(); + creatureTemplate.rank = uint32(fields[23].GetUInt8()); + creatureTemplate.mindmg = fields[24].GetFloat(); + creatureTemplate.maxdmg = fields[25].GetFloat(); + creatureTemplate.dmgschool = uint32(fields[26].GetInt8()); + creatureTemplate.attackpower = fields[27].GetUInt32(); + creatureTemplate.dmg_multiplier = fields[28].GetFloat(); + creatureTemplate.baseattacktime = fields[29].GetUInt32(); + creatureTemplate.rangeattacktime = fields[30].GetUInt32(); + creatureTemplate.unit_class = uint32(fields[31].GetUInt8()); + creatureTemplate.unit_flags = fields[32].GetUInt32(); + creatureTemplate.unit_flags2 = fields[33].GetUInt32(); + creatureTemplate.dynamicflags = fields[34].GetUInt32(); + creatureTemplate.family = uint32(fields[35].GetUInt8()); + creatureTemplate.trainer_type = uint32(fields[36].GetUInt8()); + creatureTemplate.trainer_class = uint32(fields[37].GetUInt8()); + creatureTemplate.trainer_race = uint32(fields[38].GetUInt8()); + creatureTemplate.minrangedmg = fields[39].GetFloat(); + creatureTemplate.maxrangedmg = fields[40].GetFloat(); + creatureTemplate.rangedattackpower = uint32(fields[41].GetUInt16()); + creatureTemplate.type = uint32(fields[42].GetUInt8()); + creatureTemplate.type_flags = fields[43].GetUInt32(); + creatureTemplate.type_flags2 = fields[44].GetUInt32(); + creatureTemplate.lootid = fields[45].GetUInt32(); + creatureTemplate.pickpocketLootId = fields[46].GetUInt32(); + creatureTemplate.SkinLootId = fields[47].GetUInt32(); for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) - creatureTemplate.resistance[i] = fields[49 + i - 1].GetInt16(); + creatureTemplate.resistance[i] = fields[48 + i - 1].GetInt16(); for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i) - creatureTemplate.spells[i] = fields[55 + i].GetUInt32(); - - creatureTemplate.PetSpellDataId = fields[63].GetUInt32(); - creatureTemplate.VehicleId = fields[64].GetUInt32(); - creatureTemplate.mingold = fields[65].GetUInt32(); - creatureTemplate.maxgold = fields[66].GetUInt32(); - creatureTemplate.AIName = fields[67].GetString(); - creatureTemplate.MovementType = uint32(fields[68].GetUInt8()); - creatureTemplate.InhabitType = uint32(fields[69].GetUInt8()); - creatureTemplate.HoverHeight = fields[70].GetFloat(); - creatureTemplate.ModHealth = fields[71].GetFloat(); - creatureTemplate.ModMana = fields[72].GetFloat(); - creatureTemplate.ModManaExtra = fields[73].GetFloat(); - creatureTemplate.ModArmor = fields[74].GetFloat(); - creatureTemplate.RacialLeader = fields[75].GetBool(); + creatureTemplate.spells[i] = fields[54 + i].GetUInt32(); + + creatureTemplate.PetSpellDataId = fields[62].GetUInt32(); + creatureTemplate.VehicleId = fields[63].GetUInt32(); + creatureTemplate.mingold = fields[64].GetUInt32(); + creatureTemplate.maxgold = fields[65].GetUInt32(); + creatureTemplate.AIName = fields[66].GetString(); + creatureTemplate.MovementType = uint32(fields[67].GetUInt8()); + creatureTemplate.InhabitType = uint32(fields[68].GetUInt8()); + creatureTemplate.HoverHeight = fields[69].GetFloat(); + creatureTemplate.ModHealth = fields[70].GetFloat(); + creatureTemplate.ModMana = fields[71].GetFloat(); + creatureTemplate.ModManaExtra = fields[72].GetFloat(); + creatureTemplate.ModArmor = fields[73].GetFloat(); + creatureTemplate.RacialLeader = fields[74].GetBool(); for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i) - creatureTemplate.questItems[i] = fields[76 + i].GetUInt32(); + creatureTemplate.questItems[i] = fields[75 + i].GetUInt32(); - creatureTemplate.movementId = fields[82].GetUInt32(); - creatureTemplate.RegenHealth = fields[83].GetBool(); - creatureTemplate.MechanicImmuneMask = fields[84].GetUInt32(); - creatureTemplate.flags_extra = fields[85].GetUInt32(); - creatureTemplate.ScriptID = GetScriptId(fields[86].GetCString()); + creatureTemplate.movementId = fields[81].GetUInt32(); + creatureTemplate.RegenHealth = fields[82].GetBool(); + creatureTemplate.MechanicImmuneMask = fields[83].GetUInt32(); + creatureTemplate.flags_extra = fields[84].GetUInt32(); + creatureTemplate.ScriptID = GetScriptId(fields[85].GetCString()); ++count; } @@ -685,20 +684,12 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) cInfo->Entry, cInfo->maxlevel, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->maxlevel); } - if (cInfo->faction_A != difficultyInfo->faction_A) + if (cInfo->faction != difficultyInfo->faction) { - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, faction_A %u) has different `faction_A` in difficulty %u mode (Entry: %u, faction_A %u).", - cInfo->Entry, cInfo->faction_A, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->faction_A); - TC_LOG_ERROR("sql.sql", "Possible FIX: UPDATE `creature_template` SET `faction_A`=%u WHERE `entry`=%u;", - cInfo->faction_A, cInfo->DifficultyEntry[diff]); - } - - if (cInfo->faction_H != difficultyInfo->faction_H) - { - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, faction_H %u) has different `faction_H` in difficulty %u mode (Entry: %u, faction_H %u).", - cInfo->Entry, cInfo->faction_H, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->faction_H); - TC_LOG_ERROR("sql.sql", "Possible FIX: UPDATE `creature_template` SET `faction_H`=%u WHERE `entry`=%u;", - cInfo->faction_H, cInfo->DifficultyEntry[diff]); + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, faction %u) has different `faction` in difficulty %u mode (Entry: %u, faction %u).", + cInfo->Entry, cInfo->faction, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->faction); + TC_LOG_ERROR("sql.sql", "Possible FIX: UPDATE `creature_template` SET `faction`=%u WHERE `entry`=%u;", + cInfo->faction, cInfo->DifficultyEntry[diff]); } if (cInfo->unit_class != difficultyInfo->unit_class) @@ -787,13 +778,9 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) ok = true; } - FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_A); - if (!factionTemplate) - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction_A template (%u).", cInfo->Entry, cInfo->faction_A); - - factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_H); + FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction); if (!factionTemplate) - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction_H template (%u).", cInfo->Entry, cInfo->faction_H); + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction template (%u).", cInfo->Entry, cInfo->faction); // used later for scale CreatureDisplayInfoEntry const* displayScaleEntry = NULL; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index a4210d2dad5..b8af5a51a3e 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -6039,7 +6039,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const uint32 procVictim = PROC_FLAG_TAKEN_PERIODIC; uint32 procEx = (crit ? PROC_EX_CRITICAL_HIT : PROC_EX_NORMAL_HIT) | PROC_EX_INTERNAL_HOT; // ignore item heals - if (!haveCastItem) + if (!haveCastItem && GetAuraType() != SPELL_AURA_OBS_MOD_HEALTH) caster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, damage, BASE_ATTACK, GetSpellInfo()); } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e4f8516839f..ff6751717ed 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -816,7 +816,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr return true; /// Any aura that has only PROC_FLAG_DONE_PERIODIC or PROC_FLAG_TAKEN_PERIODIC should always proc, if procSpell is correct or not is checked in Unit::HandleAuraProc - if (EventProcFlag == PROC_FLAG_DONE_PERIODIC || EventProcFlag == PROC_FLAG_TAKEN_PERIODIC) + if ((EventProcFlag == PROC_FLAG_DONE_PERIODIC && procFlags == PROC_FLAG_DONE_PERIODIC) || (EventProcFlag == PROC_FLAG_TAKEN_PERIODIC && procFlags == PROC_FLAG_TAKEN_PERIODIC)) return true; if (procFlags & PROC_FLAG_DONE_PERIODIC && EventProcFlag & PROC_FLAG_DONE_PERIODIC) diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 9bfa4f0334f..6fdc3b9f5ef 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -601,17 +601,13 @@ public: // Update in memory.. if (CreatureTemplate const* cinfo = creature->GetCreatureTemplate()) - { - const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId; - const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId; - } + const_cast<CreatureTemplate*>(cinfo)->faction = factionId; // ..and DB PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_FACTION); stmt->setUInt16(0, uint16(factionId)); - stmt->setUInt16(1, uint16(factionId)); - stmt->setUInt32(2, creature->GetEntry()); + stmt->setUInt32(1, creature->GetEntry()); WorldDatabase.Execute(stmt); diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 2d4cb379536..0274de02ae0 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -456,66 +456,65 @@ public: cInfo->maxlevel = fields[14].GetUInt8(); cInfo->expansion = fields[15].GetUInt16(); cInfo->expansionUnknown = fields[16].GetUInt16(); - cInfo->faction_A = fields[17].GetUInt16(); - cInfo->faction_H = fields[18].GetUInt16(); - cInfo->npcflag = fields[19].GetUInt32(); - cInfo->speed_walk = fields[20].GetFloat(); - cInfo->speed_run = fields[21].GetFloat(); - cInfo->scale = fields[22].GetFloat(); - cInfo->rank = fields[23].GetUInt8(); - cInfo->mindmg = fields[24].GetFloat(); - cInfo->maxdmg = fields[25].GetFloat(); - cInfo->dmgschool = fields[26].GetUInt8(); - cInfo->attackpower = fields[27].GetUInt32(); - cInfo->dmg_multiplier = fields[28].GetFloat(); - cInfo->baseattacktime = fields[29].GetUInt32(); - cInfo->rangeattacktime = fields[30].GetUInt32(); - cInfo->unit_class = fields[31].GetUInt8(); - cInfo->unit_flags = fields[32].GetUInt32(); - cInfo->unit_flags2 = fields[33].GetUInt32(); - cInfo->dynamicflags = fields[34].GetUInt32(); - cInfo->family = fields[35].GetUInt8(); - cInfo->trainer_type = fields[36].GetUInt8(); - cInfo->trainer_class = fields[37].GetUInt8(); - cInfo->trainer_race = fields[38].GetUInt8(); - cInfo->minrangedmg = fields[39].GetFloat(); - cInfo->maxrangedmg = fields[40].GetFloat(); - cInfo->rangedattackpower = fields[41].GetUInt16(); - cInfo->type = fields[42].GetUInt8(); - cInfo->type_flags = fields[43].GetUInt32(); - cInfo->type_flags2 = fields[44].GetUInt32(); - cInfo->lootid = fields[45].GetUInt32(); - cInfo->pickpocketLootId = fields[46].GetUInt32(); - cInfo->SkinLootId = fields[47].GetUInt32(); + cInfo->faction = fields[17].GetUInt16(); + cInfo->npcflag = fields[18].GetUInt32(); + cInfo->speed_walk = fields[19].GetFloat(); + cInfo->speed_run = fields[20].GetFloat(); + cInfo->scale = fields[21].GetFloat(); + cInfo->rank = fields[22].GetUInt8(); + cInfo->mindmg = fields[23].GetFloat(); + cInfo->maxdmg = fields[24].GetFloat(); + cInfo->dmgschool = fields[25].GetUInt8(); + cInfo->attackpower = fields[26].GetUInt32(); + cInfo->dmg_multiplier = fields[27].GetFloat(); + cInfo->baseattacktime = fields[28].GetUInt32(); + cInfo->rangeattacktime = fields[29].GetUInt32(); + cInfo->unit_class = fields[30].GetUInt8(); + cInfo->unit_flags = fields[31].GetUInt32(); + cInfo->unit_flags2 = fields[32].GetUInt32(); + cInfo->dynamicflags = fields[33].GetUInt32(); + cInfo->family = fields[34].GetUInt8(); + cInfo->trainer_type = fields[35].GetUInt8(); + cInfo->trainer_class = fields[36].GetUInt8(); + cInfo->trainer_race = fields[37].GetUInt8(); + cInfo->minrangedmg = fields[38].GetFloat(); + cInfo->maxrangedmg = fields[39].GetFloat(); + cInfo->rangedattackpower = fields[40].GetUInt16(); + cInfo->type = fields[41].GetUInt8(); + cInfo->type_flags = fields[42].GetUInt32(); + cInfo->type_flags2 = fields[43].GetUInt32(); + cInfo->lootid = fields[44].GetUInt32(); + cInfo->pickpocketLootId = fields[45].GetUInt32(); + cInfo->SkinLootId = fields[46].GetUInt32(); for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) - cInfo->resistance[i] = fields[48 + i -1].GetUInt16(); + cInfo->resistance[i] = fields[47 + i -1].GetUInt16(); for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i) - cInfo->spells[i] = fields[54 + i].GetUInt32(); - - cInfo->PetSpellDataId = fields[62].GetUInt32(); - cInfo->VehicleId = fields[63].GetUInt32(); - cInfo->mingold = fields[64].GetUInt32(); - cInfo->maxgold = fields[65].GetUInt32(); - cInfo->AIName = fields[66].GetString(); - cInfo->MovementType = fields[67].GetUInt8(); - cInfo->InhabitType = fields[68].GetUInt8(); - cInfo->HoverHeight = fields[69].GetFloat(); - cInfo->ModHealth = fields[70].GetFloat(); - cInfo->ModMana = fields[71].GetFloat(); - cInfo->ModManaExtra = fields[72].GetFloat(); - cInfo->ModArmor = fields[73].GetFloat(); - cInfo->RacialLeader = fields[74].GetBool(); + cInfo->spells[i] = fields[53 + i].GetUInt32(); + + cInfo->PetSpellDataId = fields[61].GetUInt32(); + cInfo->VehicleId = fields[62].GetUInt32(); + cInfo->mingold = fields[63].GetUInt32(); + cInfo->maxgold = fields[64].GetUInt32(); + cInfo->AIName = fields[65].GetString(); + cInfo->MovementType = fields[66].GetUInt8(); + cInfo->InhabitType = fields[67].GetUInt8(); + cInfo->HoverHeight = fields[68].GetFloat(); + cInfo->ModHealth = fields[69].GetFloat(); + cInfo->ModMana = fields[70].GetFloat(); + cInfo->ModManaExtra = fields[71].GetFloat(); + cInfo->ModArmor = fields[72].GetFloat(); + cInfo->RacialLeader = fields[73].GetBool(); for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i) - cInfo->questItems[i] = fields[75 + i].GetUInt32(); + cInfo->questItems[i] = fields[74 + i].GetUInt32(); - cInfo->movementId = fields[81].GetUInt32(); - cInfo->RegenHealth = fields[82].GetBool(); - cInfo->MechanicImmuneMask = fields[83].GetUInt32(); - cInfo->flags_extra = fields[84].GetUInt32(); - cInfo->ScriptID = sObjectMgr->GetScriptId(fields[85].GetCString()); + cInfo->movementId = fields[80].GetUInt32(); + cInfo->RegenHealth = fields[81].GetBool(); + cInfo->MechanicImmuneMask = fields[82].GetUInt32(); + cInfo->flags_extra = fields[83].GetUInt32(); + cInfo->ScriptID = sObjectMgr->GetScriptId(fields[84].GetCString()); sObjectMgr->CheckCreatureTemplate(cInfo); } diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 0f542b3aca7..fbf9a38512b 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -148,7 +148,7 @@ public: me->RemoveAurasDueToSpell(SPELL_LEFT_CHAIN); me->RemoveAurasDueToSpell(SPELL_RIGHT_CHAIN); me->RemoveAurasDueToSpell(SPELL_KNEEL); - me->setFaction(me->GetCreatureTemplate()->faction_H); + me->setFaction(me->GetCreatureTemplate()->faction); DoCast(me, SPELL_UNSHACKLED, true); Talk(SAY_RAGECLAW); me->GetMotionMaster()->MoveRandom(10); diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index 1a9c9869bac..800f9eafb60 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -38,7 +38,7 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_DEL_NPC_VENDOR, "DELETE FROM npc_vendor WHERE entry = ? AND item = ? AND type = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_NPC_VENDOR_REF, "SELECT item, maxcount, incrtime, ExtendedCost, type FROM npc_vendor WHERE entry = ? AND type = ? ORDER BY slot ASC", CONNECTION_SYNCH); PrepareStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE, "UPDATE creature SET MovementType = ? WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(WORLD_UPD_CREATURE_FACTION, "UPDATE creature_template SET faction_A = ?, faction_H = ? WHERE entry = ?", CONNECTION_ASYNC); + PrepareStatement(WORLD_UPD_CREATURE_FACTION, "UPDATE creature_template SET faction = ? WHERE entry = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_UPD_CREATURE_NPCFLAG, "UPDATE creature_template SET npcflag = ? WHERE entry = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_UPD_CREATURE_POSITION, "UPDATE creature SET position_x = ?, position_y = ?, position_z = ?, orientation = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_UPD_CREATURE_SPAWN_DISTANCE, "UPDATE creature SET spawndist = ?, MovementType = ? WHERE guid = ?", CONNECTION_ASYNC); @@ -76,7 +76,7 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH); - PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "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, exp_unk, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, type_flags2, 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, Mana_mod_extra, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH); + PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "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, exp_unk, faction, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, type_flags2, 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, Mana_mod_extra, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH); |