From a8cd34c4a4613c968aa783f65a45af45965433e3 Mon Sep 17 00:00:00 2001 From: kaelima Date: Wed, 26 Dec 2012 04:02:42 +0100 Subject: Core/Battleground: Rename and correct usage of opcode 1223 and increase the timer before arena/bg invitation window is removed to its proper value. Closes #6725 --- src/server/game/Battlegrounds/Battleground.cpp | 6 +----- src/server/game/Battlegrounds/Battleground.h | 2 +- src/server/game/Entities/Object/Object.cpp | 13 +++++++++++++ src/server/game/Server/Protocol/Opcodes.cpp | 2 +- src/server/game/Server/Protocol/Opcodes.h | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 22f960ceaef..1c426be3b4e 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1183,10 +1183,6 @@ void Battleground::AddPlayer(Player* player) player->CastSpell(player, SPELL_ARENA_PREPARATION, true); player->ResetAllPowers(); } - - WorldPacket data(SMSG_ARENA_OPPONENT_UPDATE, 8); - data << uint64(player->GetGUID()); - SendPacketToTeam(team, &data, player, false); } else { @@ -1884,7 +1880,7 @@ int32 Battleground::GetObjectType(uint64 guid) return -1; } -void Battleground::HandleKillUnit(Creature* /*creature*/, Player* /*killer*/) +void Battleground::HandleKillUnit(Creature* /*victim*/, Player* /*killer*/) { } diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 0a837f9f3c3..b58f321fe55 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -108,7 +108,7 @@ enum BattlegroundTimeIntervals RESURRECTION_INTERVAL = 30000, // ms //REMIND_INTERVAL = 10000, // ms INVITATION_REMIND_TIME = 20000, // ms - INVITE_ACCEPT_WAIT_TIME = 40000, // ms + INVITE_ACCEPT_WAIT_TIME = 60000, // ms TIME_TO_AUTOREMOVE = 120000, // ms MAX_OFFLINE_TIME = 300, // secs RESPAWN_ONE_DAY = 86400, // secs diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index d96cf58db52..313c6942902 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -302,6 +302,19 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const { ASSERT(target); + if (isType(TYPEMASK_UNIT) || isType(TYPEMASK_PLAYER)) + { + if (Battleground* bg = target->GetBattleground()) + { + if (bg->isArena()) + { + WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8); + data << uint64(GetGUID()); + target->GetSession()->SendPacket(&data); + } + } + } + WorldPacket data(SMSG_DESTROY_OBJECT, 8 + 1); data << uint64(GetGUID()); //! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object. diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 0821be2abb9..6492f3ee1f8 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1249,7 +1249,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x4C4*/ { "CMSG_GM_GRANT_ACHIEVEMENT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4C5*/ { "CMSG_GM_REMOVE_ACHIEVEMENT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4C6*/ { "CMSG_GM_SET_CRITERIA_FOR_PLAYER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, - /*0x4C7*/ { "SMSG_ARENA_OPPONENT_UPDATE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, + /*0x4C7*/ { "SMSG_ARENA_UNIT_DESTROYED", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4C8*/ { "SMSG_ARENA_TEAM_CHANGE_FAILED_QUEUED", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4C9*/ { "CMSG_PROFILEDATA_REQUEST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4CA*/ { "SMSG_PROFILEDATA_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 625ee88a853..f7a73a20d6e 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1257,7 +1257,7 @@ enum Opcodes CMSG_GM_GRANT_ACHIEVEMENT = 0x4C4, CMSG_GM_REMOVE_ACHIEVEMENT = 0x4C5, CMSG_GM_SET_CRITERIA_FOR_PLAYER = 0x4C6, - SMSG_ARENA_OPPONENT_UPDATE = 0x4C7, // uint64 + SMSG_ARENA_UNIT_DESTROYED = 0x4C7, SMSG_ARENA_TEAM_CHANGE_FAILED_QUEUED = 0x4C8, // uint32 "Can't modify arena team while queued or in a match." CMSG_PROFILEDATA_REQUEST = 0x4C9, SMSG_PROFILEDATA_RESPONSE = 0x4CA, -- cgit v1.2.3 From 30936fd1c49fd72d9d9e4180cd610864c14ab01a Mon Sep 17 00:00:00 2001 From: MidnaAT Date: Wed, 26 Dec 2012 04:34:40 +0100 Subject: Core/Totem: Have Lightwell use Totem logic ref www.trinitycore.org/f/topic/7599-propper-lightwell-handling/ --- src/server/game/DataStores/DBCEnums.h | 18 ------------------ src/server/game/Entities/Object/Object.cpp | 1 + src/server/game/Miscellaneous/SharedDefines.h | 7 ++++--- src/server/game/Spells/SpellEffects.cpp | 1 + 4 files changed, 6 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index fa6b5f0695f..cdc1c790844 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -365,24 +365,6 @@ enum SummonPropGroup SUMMON_PROP_GROUP_UNKNOWN3 = 4 // 86 spells in 3.0.3, taxi/mounts }; -// SummonProperties.dbc, col 3 -enum SummonPropType -{ - SUMMON_PROP_TYPE_UNKNOWN = 0, // different summons, 1330 spells in 3.0.3 - SUMMON_PROP_TYPE_SUMMON = 1, // generic summons, 49 spells in 3.0.3 - SUMMON_PROP_TYPE_GUARDIAN = 2, // summon guardian, 393 spells in 3.0.3 - SUMMON_PROP_TYPE_ARMY = 3, // summon army, 5 spells in 3.0.3 - SUMMON_PROP_TYPE_TOTEM = 4, // summon totem, 169 spells in 3.0.3 - SUMMON_PROP_TYPE_CRITTER = 5, // critter/minipet, 195 spells in 3.0.3 - SUMMON_PROP_TYPE_DK = 6, // summon DRW/Ghoul, 2 spells in 3.0.3 - SUMMON_PROP_TYPE_BOMB = 7, // summon bot/bomb, 4 spells in 3.0.3 - SUMMON_PROP_TYPE_PHASING = 8, // something todo with DK prequest line, 2 spells in 3.0.3 - SUMMON_PROP_TYPE_SIEGE_VEH = 9, // summon different vehicles, 14 spells in 3.0.3 - SUMMON_PROP_TYPE_DRAKE_VEH = 10, // summon drake (vehicle), 3 spells - SUMMON_PROP_TYPE_LIGHTWELL = 11, // summon lightwell, 6 spells in 3.0.3 - SUMMON_PROP_TYPE_JEEVES = 12 // summon Jeeves, 1 spell in 3.3.5a -}; - // SummonProperties.dbc, col 5 enum SummonPropFlags { diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 313c6942902..705360ec32a 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2267,6 +2267,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert mask = UNIT_MASK_GUARDIAN; break; case SUMMON_TYPE_TOTEM: + case SUMMON_TYPE_LIGHTWELL: mask = UNIT_MASK_TOTEM; break; case SUMMON_TYPE_VEHICLE: diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index e3cf975e92f..0113e8b4f1f 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -3146,10 +3146,11 @@ enum SummonType SUMMON_TYPE_MINIPET = 5, SUMMON_TYPE_GUARDIAN2 = 6, SUMMON_TYPE_WILD2 = 7, - SUMMON_TYPE_WILD3 = 8, + SUMMON_TYPE_WILD3 = 8, // Related to phases and DK prequest line (3.3.5a) SUMMON_TYPE_VEHICLE = 9, - SUMMON_TYPE_VEHICLE2 = 10, - SUMMON_TYPE_OBJECT = 11 + SUMMON_TYPE_VEHICLE2 = 10, // Oculus and Argent Tournament vehicles (3.3.5a) + SUMMON_TYPE_LIGHTWELL = 11, + SUMMON_TYPE_JEEVES = 12 }; enum EventId diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index a642d40c24d..6ac8f9b5f7d 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2354,6 +2354,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) case SUMMON_TYPE_VEHICLE2: summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id); break; + case SUMMON_TYPE_LIGHTWELL: case SUMMON_TYPE_TOTEM: { summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id); -- cgit v1.2.3 From 30e2ab8e0faac96548fc681b608a0f96f77985a1 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Dec 2012 11:52:05 -0330 Subject: DB/SCRIPTS: Fix text for High Botanist Freywinn and remove creature_ai_texts. --- sql/updates/world/2012_12_26_01_world_creature_text.sql | 14 ++++++++++++++ .../TempestKeep/botanica/boss_high_botanist_freywinn.cpp | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2012_12_26_01_world_creature_text.sql (limited to 'src') diff --git a/sql/updates/world/2012_12_26_01_world_creature_text.sql b/sql/updates/world/2012_12_26_01_world_creature_text.sql new file mode 100644 index 00000000000..ae4170ae5a8 --- /dev/null +++ b/sql/updates/world/2012_12_26_01_world_creature_text.sql @@ -0,0 +1,14 @@ +-- NPC talk text convert from creature_ai_text +DELETE FROM `creature_ai_texts` WHERE entry BETWEEN -21 AND -17; +DELETE FROM `creature_text` WHERE `entry` IN (17975); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(17975,0,0, 'What are you doing? These specimens are very delicate!',14,0,100,0,0,11144, 'High Botanist Freywinn - Aggro Say'), +(17975,1,0, 'Your lifecycle is now concluded!',14,0,100,0,0,11145, 'High Botanist Freywinn - Kill Plant as Bloodelf Say'), +(17975,1,1, 'You will feed the worms.',14,0,100,0,0,11146, 'High Botanist Freywinn - Shapeshifting Say'), +(17975,2,0, 'Endorel aluminor!',14,0,100,0,0,11147, 'High Botanist Freywinn - Shapeshifting Say'), +(17975,3,0, 'Nature bends to my will!',14,0,100,0,0,11148, 'High Botanist Freywinn - Summoning Plants Say'), +(17975,4,0, 'The specimens... must be... preserved.',14,0,100,0,0,11149, 'High Botanist Freywinn - Death Say'), +(17975,5,0, '...thorny vines...mumble...ouch!',12,0,100,0,0,0, 'High Botanist Freywinn - OOC Random Say'), +(17975,5,1, '...mumble mumble...',12,0,100,0,0,0, 'High Botanist Freywinn - OOC Random Say'), +(17975,5,2, '...mumble...Petals of Fire...mumble...',12,0,100,0,0,0, 'High Botanist Freywinn - OOC Random Say'), +(17975,5,3, '...with the right mixture, perhaps...',12,0,100,0,0,0, 'High Botanist Freywinn - OOC Random Say'); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 4288061860e..53277afdc54 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -31,7 +31,9 @@ enum eSays SAY_AGGRO = 0, SAY_KILL = 1, SAY_TREE = 2, - SAY_DEATH = 3 + SAY_SUMMON = 3, + SAY_DEATH = 4, + SAY_OOC_RANDOM = 5, }; enum eSpells -- cgit v1.2.3 From 81d53f8a87167427abc4e1645d9dac2fea3a834b Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 26 Dec 2012 13:36:07 -0500 Subject: Scripts/Ick&Krick: Krick should only say his KilledUnit text when the victim is a player. --- .../scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index ed196d2cd0c..abb633cee5c 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -322,7 +322,7 @@ class boss_krick : public CreatureScript void KilledUnit(Unit* victim) { - if (victim == me) + if (victim->GetTypeId() != TYPEID_PLAYER) return; Talk(SAY_KRICK_SLAY); -- cgit v1.2.3 From 7b9b67a3b3bb88566b15abab4d47c2c64717f548 Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Wed, 26 Dec 2012 23:19:37 +0100 Subject: Core/Quest: Drop table quest_end_scripts --- .../2012_12_26_12_world_quest_end_scripts.sql | 4 ++++ src/server/game/Entities/Player/Player.cpp | 3 --- src/server/game/Globals/ObjectMgr.cpp | 20 ++------------------ src/server/game/Globals/ObjectMgr.h | 2 -- src/server/game/Quests/QuestDef.cpp | 4 +--- src/server/game/Quests/QuestDef.h | 2 -- src/server/game/World/World.cpp | 1 - src/server/scripts/Commands/cs_reload.cpp | 22 ---------------------- 8 files changed, 7 insertions(+), 51 deletions(-) create mode 100644 sql/updates/world/2012_12_26_12_world_quest_end_scripts.sql (limited to 'src') diff --git a/sql/updates/world/2012_12_26_12_world_quest_end_scripts.sql b/sql/updates/world/2012_12_26_12_world_quest_end_scripts.sql new file mode 100644 index 00000000000..501bb796557 --- /dev/null +++ b/sql/updates/world/2012_12_26_12_world_quest_end_scripts.sql @@ -0,0 +1,4 @@ +ALTER TABLE `quest_template` DROP `CompleteScript`; +DROP TABLE quest_end_scripts; + +DELETE FROM `command` WHERE `name`='reload quest_end_scripts'; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f85a251f010..3b20d5664a1 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16430,9 +16430,6 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP, Object* questGiver) data << uint32(quest->GetBonusTalents()); // bonus talents data << uint32(quest->GetRewArenaPoints()); GetSession()->SendPacket(&data); - - if (quest->GetQuestCompleteScript() != 0) - GetMap()->ScriptsStart(sQuestEndScripts, quest->GetQuestCompleteScript(), questGiver, this); } void Player::SendQuestFailed(uint32 questId, InventoryResult reason) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 70ac4aec4aa..fcde96079e1 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -49,7 +49,6 @@ #include "WaypointManager.h" #include "World.h" -ScriptMapMap sQuestEndScripts; ScriptMapMap sSpellScripts; ScriptMapMap sGameObjectScripts; ScriptMapMap sEventScripts; @@ -60,7 +59,6 @@ std::string GetScriptsTableNameByType(ScriptsType type) std::string res = ""; switch (type) { - case SCRIPTS_QUEST_END: res = "quest_end_scripts"; break; case SCRIPTS_SPELL: res = "spell_scripts"; break; case SCRIPTS_GAMEOBJECT: res = "gameobject_scripts"; break; case SCRIPTS_EVENT: res = "event_scripts"; break; @@ -75,7 +73,6 @@ ScriptMapMap* GetScriptsMapByType(ScriptsType type) ScriptMapMap* res = NULL; switch (type) { - case SCRIPTS_QUEST_END: res = &sQuestEndScripts; break; case SCRIPTS_SPELL: res = &sSpellScripts; break; case SCRIPTS_GAMEOBJECT: res = &sGameObjectScripts; break; case SCRIPTS_EVENT: res = &sEventScripts; break; @@ -3658,13 +3655,12 @@ void ObjectMgr::LoadQuests() "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4, EmoteOnIncomplete, EmoteOnComplete, " // 136 137 138 139 140 141 142 143 "OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4, OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4, " - // 144 145 - "CompleteScript, WDBVerified" + // 144 + "WDBVerified" " FROM quest_template"); if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quests definitions. DB table `quest_template` is empty."); - return; } @@ -4683,18 +4679,6 @@ void ObjectMgr::LoadGameObjectScripts() } } -void ObjectMgr::LoadQuestEndScripts() -{ - LoadScripts(SCRIPTS_QUEST_END); - - // check ids - for (ScriptMapMap::const_iterator itr = sQuestEndScripts.begin(); itr != sQuestEndScripts.end(); ++itr) - { - if (!GetQuestTemplate(itr->first)) - sLog->outError(LOG_FILTER_SQL, "Table `quest_end_scripts` has not existing quest (Id: %u) as script id", itr->first); - } -} - void ObjectMgr::LoadSpellScripts() { LoadScripts(SCRIPTS_SPELL); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index e1df03b97b0..9419fd2b7ba 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -361,7 +361,6 @@ typedef std::multimap ScriptMap; typedef std::map ScriptMapMap; typedef std::multimap SpellScriptsContainer; typedef std::pair SpellScriptsBounds; -extern ScriptMapMap sQuestEndScripts; extern ScriptMapMap sSpellScripts; extern ScriptMapMap sGameObjectScripts; extern ScriptMapMap sEventScripts; @@ -864,7 +863,6 @@ class ObjectMgr } void LoadGameObjectScripts(); - void LoadQuestEndScripts(); void LoadEventScripts(); void LoadSpellScripts(); void LoadWaypointScripts(); diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index a918a19334f..9e9bcffd871 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -140,9 +140,7 @@ Quest::Quest(Field* questRecord) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) OfferRewardEmoteDelay[i] = questRecord[140+i].GetInt32(); - CompleteScript = questRecord[144].GetUInt32(); - - // int32 WDBVerified = questRecord[145].GetInt32(); + //int32 WDBVerified = questRecord[144].GetInt32(); Flags |= SpecialFlags << 20; if (Flags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT) diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 3e8e91c9b6e..d02e4c511b1 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -245,7 +245,6 @@ class Quest uint32 GetPointOpt() const { return PointOption; } uint32 GetIncompleteEmote() const { return EmoteOnIncomplete; } uint32 GetCompleteEmote() const { return EmoteOnComplete; } - uint32 GetQuestCompleteScript() const { return CompleteScript; } bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; } bool IsAutoAccept() const; bool IsAutoComplete() const; @@ -355,7 +354,6 @@ class Quest uint32 PointOption; uint32 EmoteOnIncomplete; uint32 EmoteOnComplete; - uint32 CompleteScript; }; struct QuestStatusData diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 7824a72c4d3..3a38ad6b383 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1647,7 +1647,6 @@ void World::SetInitialWorldSettings() LoadAutobroadcasts(); ///- Load and initialize scripts - sObjectMgr->LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate sObjectMgr->LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data) sObjectMgr->LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data) sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data) diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 5b5608f9a26..f62a6f059b7 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -126,7 +126,6 @@ public: { "pickpocketing_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesPickpocketingCommand, "", NULL}, { "points_of_interest", SEC_ADMINISTRATOR, true, &HandleReloadPointsOfInterestCommand, "", NULL }, { "prospecting_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL }, - { "quest_end_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestEndScriptsCommand, "", NULL }, { "quest_poi", SEC_ADMINISTRATOR, true, &HandleReloadQuestPOICommand, "", NULL }, { "quest_template", SEC_ADMINISTRATOR, true, &HandleReloadQuestTemplateCommand, "", NULL }, { "reference_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL }, @@ -263,7 +262,6 @@ public: sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts..."); HandleReloadGameObjectScriptsCommand(handler, "a"); HandleReloadEventScriptsCommand(handler, "a"); - HandleReloadQuestEndScriptsCommand(handler, "a"); HandleReloadSpellScriptsCommand(handler, "a"); handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded."); HandleReloadDbScriptStringCommand(handler, "a"); @@ -1043,26 +1041,6 @@ public: return true; } - static bool HandleReloadQuestEndScriptsCommand(ChatHandler* handler, const char* args) - { - if (sScriptMgr->IsScriptScheduled()) - { - handler->SendSysMessage("DB scripts used currently, please attempt reload later."); - handler->SetSentErrorMessage(true); - return false; - } - - if (*args != 'a') - sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `quest_end_scripts`..."); - - sObjectMgr->LoadQuestEndScripts(); - - if (*args != 'a') - handler->SendGlobalGMSysMessage("DB table `quest_end_scripts` reloaded."); - - return true; - } - static bool HandleReloadSpellScriptsCommand(ChatHandler* handler, const char* args) { if (sScriptMgr->IsScriptScheduled()) -- cgit v1.2.3 From ece2f7c7ab30fbdbe52be7ce510e09437e2643ee Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Wed, 26 Dec 2012 23:23:49 +0100 Subject: Add missing changes in 7b9b67a3b3bb88566b15abab4d47c2c64717f548 (fucking save button) --- src/server/game/Globals/ObjectMgr.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 9419fd2b7ba..84597d37722 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -127,8 +127,7 @@ enum ScriptsType { SCRIPTS_FIRST = 1, - SCRIPTS_QUEST_END = SCRIPTS_FIRST, - SCRIPTS_SPELL, + SCRIPTS_SPELL = SCRIPTS_FIRST, SCRIPTS_GAMEOBJECT, SCRIPTS_EVENT, SCRIPTS_WAYPOINT, -- cgit v1.2.3 From 452e585f7b4b2bc349d7386b0c42cf296f0ab4c2 Mon Sep 17 00:00:00 2001 From: Trista Date: Thu, 27 Dec 2012 01:28:23 +0200 Subject: Core/Vehicles: Fixed seat id for auras with SPELL_AURA_CONTROL_VEHICLE. Also always allow npc passengers to cast spells and remove TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE hacks. * Author: Horn. Please give feedback, I tested a lot stuff, but it will be appreciated. * One of the fixes allow all creatures to cast when being passangers, researched, this doesn't involve players. * This basically rewrittes vehicle seat formula calculated, so it fix quite stuff that will not be visible and some eye candies: #3831 and #1984 Heart part ;) (which magically fix a lot more of it and some quests), also Yog-Sarron mechanics --- src/server/game/Entities/Unit/Unit.cpp | 4 ++-- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 3 ++- src/server/game/Spells/Spell.cpp | 3 ++- .../scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1c2f03ec5b9..62df8c2049c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17064,7 +17064,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) } if (IsInMap(caster)) - caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID); + caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID); else // This can happen during Player::_LoadAuras { int32 bp0 = seatId; @@ -17094,7 +17094,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) void Unit::EnterVehicle(Unit* base, int8 seatId) { - CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId+1, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); + CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); } void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* aurApp) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 260091c9ed7..745a7baab8f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3199,7 +3199,8 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m if (apply) { - caster->_EnterVehicle(target->GetVehicleKit(), m_amount - 1, aurApp); + // correct amount is already calculated adding one more -1 meant calculated amount - 1 + caster->_EnterVehicle(target->GetVehicleKit(), m_amount, aurApp); } else { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 3cee51949bc..1ca04747101 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4853,9 +4853,10 @@ SpellCastResult Spell::CheckCast(bool strict) if (!checkMask) checkMask = VEHICLE_SEAT_FLAG_CAN_ATTACK; + // All creatures should be able to cast as passengers freely, restriction and attribute are only for players VehicleSeatEntry const* vehicleSeat = vehicle->GetSeatForPassenger(m_caster); if (!(m_spellInfo->AttributesEx6 & SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE) && !(m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_MOUNTED) - && (vehicleSeat->m_flags & checkMask) != checkMask) + && (vehicleSeat->m_flags & checkMask) != checkMask && m_caster->GetTypeId() == TYPEID_PLAYER) return SPELL_FAILED_DONT_REPORT; } diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index abb633cee5c..f94b028bfaf 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -226,13 +226,13 @@ class boss_ick : public CreatureScript case EVENT_TOXIC_WASTE: if (Creature* krick = GetKrick()) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - krick->CastSpell(target, SPELL_TOXIC_WASTE, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); + krick->CastSpell(target, SPELL_TOXIC_WASTE); events.ScheduleEvent(EVENT_TOXIC_WASTE, urand(7000, 10000)); break; case EVENT_SHADOW_BOLT: if (Creature* krick = GetKrick()) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - krick->CastSpell(target, SPELL_SHADOW_BOLT, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); + krick->CastSpell(target, SPELL_SHADOW_BOLT); events.ScheduleEvent(EVENT_SHADOW_BOLT, 15000); return; case EVENT_MIGHTY_KICK: -- cgit v1.2.3 From e48bbac93fa8cb0740218261646d9421ec6ce69c Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Thu, 27 Dec 2012 01:42:25 +0100 Subject: Core: Fix warning in 7b9b67a3b3bb88566b15abab4d47c2c64717f548 --- src/server/game/Entities/Player/Player.cpp | 4 ++-- src/server/game/Entities/Player/Player.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3b20d5664a1..3607e8a9ec3 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -15226,7 +15226,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, _SaveQuestStatus(trans); if (announce) - SendQuestReward(quest, XP, questGiver); + SendQuestReward(quest, XP); // cast spells after mark quest complete (some spells have quest completed state requirements in spell_area data) if (quest->GetRewSpellCast() > 0) @@ -16407,7 +16407,7 @@ void Player::SendQuestComplete(uint32 quest_id) } } -void Player::SendQuestReward(Quest const* quest, uint32 XP, Object* questGiver) +void Player::SendQuestReward(Quest const* quest, uint32 XP) { uint32 questid = quest->GetQuestId(); sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 8fc13e1dda9..522fe529b41 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1479,7 +1479,7 @@ class Player : public Unit, public GridObject bool CanShareQuest(uint32 quest_id) const; void SendQuestComplete(uint32 quest_id); - void SendQuestReward(Quest const* quest, uint32 XP, Object* questGiver); + void SendQuestReward(Quest const* quest, uint32 XP); void SendQuestFailed(uint32 questId, InventoryResult reason = EQUIP_ERR_OK); void SendQuestTimerFailed(uint32 quest_id); void SendCanTakeQuestResponse(uint32 msg) const; -- cgit v1.2.3 From 3288d7024a3ddd604d80322ba87f6f6bdf6b30d4 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Thu, 27 Dec 2012 06:04:45 +0100 Subject: Core/Spells: fix possible crash when loading `spell_proc` table --- src/server/game/Spells/SpellMgr.cpp | 64 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d166c6f9ebf..9714e2bc09b 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1836,14 +1836,14 @@ void SpellMgr::LoadSpellProcs() int32 spellId = fields[0].GetInt32(); bool allRanks = false; - if (spellId <=0) + if (spellId < 0) { allRanks = true; spellId = -spellId; } - SpellInfo const* spellEntry = GetSpellInfo(spellId); - if (!spellEntry) + SpellInfo const* spellInfo = GetSpellInfo(spellId); + if (!spellInfo) { sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` does not exist", spellId); continue; @@ -1851,9 +1851,9 @@ void SpellMgr::LoadSpellProcs() if (allRanks) { - if (GetFirstSpellInChain(spellId) != uint32(spellId)) + if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId)) { - sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32()); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", spellId); continue; } } @@ -1876,79 +1876,77 @@ void SpellMgr::LoadSpellProcs() baseProcEntry.cooldown = uint32(cooldown); baseProcEntry.charges = fields[14].GetUInt32(); - while (true) + while (spellInfo) { - if (mSpellProcMap.find(spellId) != mSpellProcMap.end()) + if (mSpellProcMap.find(spellInfo->Id) != mSpellProcMap.end()) { - sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellInfo->Id); break; } SpellProcEntry procEntry = SpellProcEntry(baseProcEntry); // take defaults from dbcs if (!procEntry.typeMask) - procEntry.typeMask = spellEntry->ProcFlags; + procEntry.typeMask = spellInfo->ProcFlags; if (!procEntry.charges) - procEntry.charges = spellEntry->ProcCharges; + procEntry.charges = spellInfo->ProcCharges; if (!procEntry.chance && !procEntry.ratePerMinute) - procEntry.chance = float(spellEntry->ProcChance); + procEntry.chance = float(spellInfo->ProcChance); // validate data if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellInfo->Id, procEntry.schoolMask); if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16)) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellInfo->Id, procEntry.spellFamilyName); if (procEntry.chance < 0) { - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellInfo->Id); procEntry.chance = 0; } if (procEntry.ratePerMinute < 0) { - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellInfo->Id); procEntry.ratePerMinute = 0; } if (cooldown < 0) { - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellInfo->Id); procEntry.cooldown = 0; } if (procEntry.chance == 0 && procEntry.ratePerMinute == 0) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellInfo->Id); if (procEntry.charges > 99) { - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellInfo->Id); procEntry.charges = 99; } if (!procEntry.typeMask) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId); - if (procEntry.spellTypeMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellInfo->Id); + if (procEntry.spellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL) + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellInfo->Id, procEntry.spellTypeMask); if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id); if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellInfo->Id); if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellInfo->Id, procEntry.spellPhaseMask); if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id); if (procEntry.hitMask & ~PROC_HIT_MASK_ALL) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellInfo->Id, procEntry.hitMask); if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH))))) - sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellInfo->Id); - mSpellProcMap[spellId] = procEntry; + mSpellProcMap[spellInfo->Id] = procEntry; if (allRanks) - { - spellId = GetNextSpellInChain(spellId); - spellEntry = GetSpellInfo(spellId); - } + spellInfo = spellInfo->GetNextRankSpell(); else break; } ++count; - } while (result->NextRow()); + } + while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } -- cgit v1.2.3 From b19563fb6af74d7b9f915bdcf2fa5ec15e87e327 Mon Sep 17 00:00:00 2001 From: AliveShiro Date: Thu, 27 Dec 2012 12:12:27 +0100 Subject: Scripts/Trial of the Crusader: Fix Icehowl Script closes #8539 --- .../CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 2d09feef089..b0edbf214e8 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -1006,7 +1006,7 @@ class boss_icehowl : public CreatureScript events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS)); return; case EVENT_MASSIVE_CRASH: - me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 20.0f, 20.0f); // 1: Middle of the room + me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 20.0f, 20.0f, 0); // 1: Middle of the room SetCombatMovement(false); me->AttackStop(); _stage = 7; //Invalid (Do nothing more than move) @@ -1059,7 +1059,7 @@ class boss_icehowl : public CreatureScript _trampleTargetY = target->GetPositionY(); _trampleTargetZ = target->GetPositionZ(); // 2: Hop Backwards - me->GetMotionMaster()->MoveJump(2*me->GetPositionX() - _trampleTargetX, 2*me->GetPositionY() - _trampleTargetY, me->GetPositionZ(), 30.0f, 20.0f); + me->GetMotionMaster()->MoveJump(2*me->GetPositionX() - _trampleTargetX, 2*me->GetPositionY() - _trampleTargetY, me->GetPositionZ(), 30.0f, 20.0f, 0); _stage = 7; //Invalid (Do nothing more than move) } else -- cgit v1.2.3 From b530602b96974c2a536f9e757739e207bf034fd7 Mon Sep 17 00:00:00 2001 From: Nay Date: Thu, 27 Dec 2012 14:29:05 +0000 Subject: DB/Schema: Rename locales_quest.entry to locales_quest.Id for consistency with quest_template table --- sql/updates/world/2012_12_27_01_world_locales_quest.sql | 1 + src/server/game/Globals/ObjectMgr.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2012_12_27_01_world_locales_quest.sql (limited to 'src') diff --git a/sql/updates/world/2012_12_27_01_world_locales_quest.sql b/sql/updates/world/2012_12_27_01_world_locales_quest.sql new file mode 100644 index 00000000000..047f8bb499f --- /dev/null +++ b/sql/updates/world/2012_12_27_01_world_locales_quest.sql @@ -0,0 +1 @@ +ALTER TABLE `locales_quest` CHANGE `entry` `Id` mediumint(8) unsigned NOT NULL DEFAULT '0'; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index fcde96079e1..5865ef67a78 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -4306,7 +4306,7 @@ void ObjectMgr::LoadQuestLocales() _questLocaleStore.clear(); // need for reload case - QueryResult result = WorldDatabase.Query("SELECT entry, " + QueryResult result = WorldDatabase.Query("SELECT Id, " "Title_loc1, Details_loc1, Objectives_loc1, OfferRewardText_loc1, RequestItemsText_loc1, EndText_loc1, CompletedText_loc1, ObjectiveText1_loc1, ObjectiveText2_loc1, ObjectiveText3_loc1, ObjectiveText4_loc1, " "Title_loc2, Details_loc2, Objectives_loc2, OfferRewardText_loc2, RequestItemsText_loc2, EndText_loc2, CompletedText_loc2, ObjectiveText1_loc2, ObjectiveText2_loc2, ObjectiveText3_loc2, ObjectiveText4_loc2, " "Title_loc3, Details_loc3, Objectives_loc3, OfferRewardText_loc3, RequestItemsText_loc3, EndText_loc3, CompletedText_loc3, ObjectiveText1_loc3, ObjectiveText2_loc3, ObjectiveText3_loc3, ObjectiveText4_loc3, " -- cgit v1.2.3 From 7fe2d7309ae3b850f3a7c75fc9bb6ec18bea00a1 Mon Sep 17 00:00:00 2001 From: Nay Date: Thu, 27 Dec 2012 16:42:05 +0000 Subject: DB/Schema: Rename and change types of a few fields in locales_creature_text and locales_npc_text locales_creature_text.textGroup -> locales_creature_text.groupid locales_npc_text.entry -> locales_npc_text.ID --- sql/updates/world/2012_12_27_02_world_locales.sql | 4 ++++ src/server/game/Globals/ObjectMgr.cpp | 2 +- src/server/game/Texts/CreatureTextMgr.cpp | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 sql/updates/world/2012_12_27_02_world_locales.sql (limited to 'src') diff --git a/sql/updates/world/2012_12_27_02_world_locales.sql b/sql/updates/world/2012_12_27_02_world_locales.sql new file mode 100644 index 00000000000..5caeb009447 --- /dev/null +++ b/sql/updates/world/2012_12_27_02_world_locales.sql @@ -0,0 +1,4 @@ +ALTER TABLE `locales_creature_text` CHANGE `entry` `entry` mediumint(8) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `locales_creature_text` CHANGE `textGroup` `groupid` tinyint(3) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `locales_creature_text` CHANGE `id` `id` tinyint(3) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `locales_npc_text` CHANGE `entry` `ID` mediumint(8) unsigned NOT NULL DEFAULT '0'; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5865ef67a78..be365202cdc 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5161,7 +5161,7 @@ void ObjectMgr::LoadNpcTextLocales() _npcTextLocaleStore.clear(); // need for reload case - QueryResult result = WorldDatabase.Query("SELECT entry, " + QueryResult result = WorldDatabase.Query("SELECT ID, " "Text0_0_loc1, Text0_1_loc1, Text1_0_loc1, Text1_1_loc1, Text2_0_loc1, Text2_1_loc1, Text3_0_loc1, Text3_1_loc1, Text4_0_loc1, Text4_1_loc1, Text5_0_loc1, Text5_1_loc1, Text6_0_loc1, Text6_1_loc1, Text7_0_loc1, Text7_1_loc1, " "Text0_0_loc2, Text0_1_loc2, Text1_0_loc2, Text1_1_loc2, Text2_0_loc2, Text2_1_loc2, Text3_0_loc2, Text3_1_loc1, Text4_0_loc2, Text4_1_loc2, Text5_0_loc2, Text5_1_loc2, Text6_0_loc2, Text6_1_loc2, Text7_0_loc2, Text7_1_loc2, " "Text0_0_loc3, Text0_1_loc3, Text1_0_loc3, Text1_1_loc3, Text2_0_loc3, Text2_1_loc3, Text3_0_loc3, Text3_1_loc1, Text4_0_loc3, Text4_1_loc3, Text5_0_loc3, Text5_1_loc3, Text6_0_loc3, Text6_1_loc3, Text7_0_loc3, Text7_1_loc3, " diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 89b75fd1695..fac64455b9d 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -187,7 +187,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() mLocaleTextMap.clear(); // for reload case - QueryResult result = WorldDatabase.Query("SELECT entry, textGroup, id, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_creature_text"); + QueryResult result = WorldDatabase.Query("SELECT entry, groupid, id, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_creature_text"); if (!result) return; @@ -197,7 +197,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() do { Field* fields = result->Fetch(); - CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), fields[2].GetUInt32())]; + CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), uint32(fields[2].GetUInt8()))]; for (uint8 i = 1; i < TOTAL_LOCALES; ++i) { LocaleConstant locale = LocaleConstant(i); -- cgit v1.2.3