diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-10-07 14:57:18 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-10-07 14:57:18 +0100 |
| commit | 44c2edee51ba9cec3c481007c5c659b1e2124058 (patch) | |
| tree | 59cbd3539bcb18f0c22a53c31cc9d9672c25ee35 /src/server/game | |
| parent | f570383fbadf12c02d2a3f323eadf5ca2417c3bd (diff) | |
| parent | 1a89de87c19936b18d45ec783a3244addb996062 (diff) | |
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts:
src/server/game/DataStores/DBCStructure.h
src/server/game/DataStores/DBCfmt.h
src/server/game/Spells/SpellMgr.cpp
Diffstat (limited to 'src/server/game')
33 files changed, 249 insertions, 100 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 32b9f8b5903..f37ae4fa60e 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -130,12 +130,10 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3 if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/) { - bool meets = true; ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type); ConditionSourceInfo info = ConditionSourceInfo(unit, GetBaseObject()); - meets = sConditionMgr->IsObjectMeetToConditions(info, conds); - if (meets) + if (sConditionMgr->IsObjectMeetToConditions(info, conds)) ProcessEvent(*i, unit, var0, var1, bvar, spell, gob); } } diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index cbaab482b01..b7572c6f2b0 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -1001,7 +1001,7 @@ bool BfCapturePoint::Update(uint32 diff) // get the difference of numbers float fact_diff = ((float) m_activePlayers[0].size() - (float) m_activePlayers[1].size()) * diff / BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL; - if (!fact_diff) + if (G3D::fuzzyEq(fact_diff, 0.0f)) return false; uint32 Challenger = 0; @@ -1071,7 +1071,7 @@ bool BfCapturePoint::Update(uint32 diff) m_team = TEAM_NEUTRAL; } - if (m_value != oldValue) + if (G3D::fuzzyNe(m_value, oldValue)) SendChangePhase(); if (m_OldState != m_State) diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index de1ee1785d8..119880bae8d 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -528,12 +528,12 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature) case NPC_WINTERGRASP_CATAPULT: case NPC_WINTERGRASP_DEMOLISHER: { - if (!creature->ToTempSummon()->GetSummonerGUID() || !sObjectAccessor->FindPlayer(creature->ToTempSummon()->GetSummonerGUID())) + if (!creature->ToTempSummon() || !creature->ToTempSummon()->GetSummonerGUID() || !sObjectAccessor->FindPlayer(creature->ToTempSummon()->GetSummonerGUID())) { - creature->setDeathState(DEAD); - creature->RemoveFromWorld(); + creature->DespawnOrUnsummon(); return; } + Player* creator = sObjectAccessor->FindPlayer(creature->ToTempSummon()->GetSummonerGUID()); TeamId team = creator->GetTeamId(); @@ -548,8 +548,7 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature) } else { - creature->setDeathState(DEAD); - creature->RemoveFromWorld(); + creature->DespawnOrUnsummon(); return; } } @@ -564,8 +563,7 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature) } else { - creature->setDeathState(DEAD); - creature->RemoveFromWorld(); + creature->DespawnOrUnsummon(); return; } } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index c57eeff9911..a348ec69b8a 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -177,7 +177,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player) case AV_QUEST_H_COMMANDER3: m_Team_QuestStatus[team][3]++; RewardReputationToTeam(team, 1, player->GetTeam()); - if (m_Team_QuestStatus[team][1] == 120) + if (m_Team_QuestStatus[team][3] == 120) sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid); break; case AV_QUEST_A_BOSS1: diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 28d524977fc..dab67fe3258 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -1514,12 +1514,12 @@ enum BG_AV_Objectives struct BG_AV_NodeInfo { - uint16 TotalOwner; - uint16 Owner; - uint16 PrevOwner; BG_AV_States State; BG_AV_States PrevState; uint32 Timer; + uint16 TotalOwner; + uint16 Owner; + uint16 PrevOwner; bool Tower; }; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp index d4086b2e48e..402406f7fd0 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp @@ -96,7 +96,7 @@ void BattlegroundBE::HandleKillPlayer(Player* player, Player* killer) bool BattlegroundBE::HandlePlayerUnderMap(Player* player) { - player->TeleportTo(GetMapId(), 6238.930176f, 262.963470f, 0.889519f, player->GetOrientation(), false); + player->TeleportTo(GetMapId(), 6238.930176f, 262.963470f, 0.889519f, player->GetOrientation()); return true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index a39350d1f45..a64184261c7 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -21,6 +21,7 @@ #include "Language.h" #include "Player.h" #include "WorldPacket.h" +#include "GameObject.h" BattlegroundDS::BattlegroundDS() { @@ -201,7 +202,7 @@ void BattlegroundDS::HandleAreaTrigger(Player* player, uint32 trigger) bool BattlegroundDS::HandlePlayerUnderMap(Player* player) { - player->TeleportTo(GetMapId(), 1299.046f, 784.825f, 9.338f, 2.422f, false); + player->TeleportTo(GetMapId(), 1299.046f, 784.825f, 9.338f, 2.422f); return true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 8725bf63a9b..fe3f214ebe5 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -384,7 +384,7 @@ bool BattlegroundIC::SetupBattleground() } } - for (uint8 i = 0; i < MAX_NORMAL_NPCS_SPAWNS; ++i) + for (uint8 i = 2; i < MAX_NORMAL_NPCS_SPAWNS; ++i) { if (!AddCreature(BG_IC_NpcSpawnlocs[i].entry, BG_IC_NpcSpawnlocs[i].type, BG_IC_NpcSpawnlocs[i].team, BG_IC_NpcSpawnlocs[i].x, BG_IC_NpcSpawnlocs[i].y, @@ -860,6 +860,17 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) break; } + if (go->GetEntry() == GO_HORDE_GATE_1 || go->GetEntry() == GO_HORDE_GATE_2 || go->GetEntry() == GO_HORDE_GATE_3) + { + if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].o, RESPAWN_ONE_DAY)) + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry); + } + else if (go->GetEntry() == GO_ALLIANCE_GATE_1 || go->GetEntry() == GO_ALLIANCE_GATE_2 || go->GetEntry() == GO_ALLIANCE_GATE_3) + { + if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].o, RESPAWN_ONE_DAY)) + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry); + } + SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP)); } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp index deb2e565b07..6677d665290 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp @@ -93,7 +93,7 @@ void BattlegroundNA::HandleKillPlayer(Player* player, Player* killer) bool BattlegroundNA::HandlePlayerUnderMap(Player* player) { - player->TeleportTo(GetMapId(), 4055.504395f, 2919.660645f, 13.611241f, player->GetOrientation(), false); + player->TeleportTo(GetMapId(), 4055.504395f, 2919.660645f, 13.611241f, player->GetOrientation()); return true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp index 14c1052ed64..2c715193a3b 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp @@ -93,7 +93,7 @@ void BattlegroundRL::HandleKillPlayer(Player* player, Player* killer) bool BattlegroundRL::HandlePlayerUnderMap(Player* player) { - player->TeleportTo(GetMapId(), 1285.810547f, 1667.896851f, 39.957642f, player->GetOrientation(), false); + player->TeleportTo(GetMapId(), 1285.810547f, 1667.896851f, 39.957642f, player->GetOrientation()); return true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 80018bce0a2..130ba4f3290 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -137,7 +137,7 @@ void BattlegroundRV::HandleKillPlayer(Player* player, Player* killer) bool BattlegroundRV::HandlePlayerUnderMap(Player* player) { - player->TeleportTo(GetMapId(), 763.5f, -284, 28.276f, 2.422f, false); + player->TeleportTo(GetMapId(), 763.5f, -284, 28.276f, 2.422f); return true; } diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 704f252c625..64e7d5b4b60 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1357,10 +1357,10 @@ struct LFGDungeonEntry uint32 recmaxlevel; // 6 int32 map; // 7 uint32 difficulty; // 8 - //uint32 unk; // 9 + uint32 flags; // 9 uint32 type; // 10 //uint32 unk2; // 11 - //char* unk3; // 12 + //char* iconname; // 12 uint32 expansion; // 13 //uint32 unk4; // 14 uint32 grouptype; // 15 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index bffe9263549..f9339f7515a 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -99,7 +99,7 @@ const char ItemLimitCategoryEntryfmt[]="nxii"; const char ItemRandomPropertiesfmt[]="nxiiixxs"; const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii"; const char ItemSetEntryfmt[]="dsiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; -const char LFGDungeonEntryfmt[]="nxiiiiiiixixxixixxxxx"; +const char LFGDungeonEntryfmt[]="nxiiiiiiiiixxixixxxxx"; const char LiquidTypefmt[]="nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; const char PhaseEntryfmt[]="nsi"; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 3a75066fa2d..2b425dffff0 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -24,6 +24,7 @@ #include "SocialMgr.h" #include "LFGMgr.h" #include "GroupMgr.h" +#include "GameEventMgr.h" #include "LFGScripts.h" #include "LFGGroupData.h" #include "LFGPlayerData.h" @@ -185,6 +186,38 @@ void LFGMgr::LoadRewards() sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } +void LFGMgr::LoadEntrancePositions() +{ + uint32 oldMSTime = getMSTime(); + m_entrancePositions.clear(); + + QueryResult result = WorldDatabase.Query("SELECT dungeonId, position_x, position_y, position_z, orientation FROM lfg_entrances"); + + if (!result) + { + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 lfg entrance positions. DB table `lfg_entrances` is empty!"); + return; + } + + uint32 count = 0; + + do + { + Field* fields = result->Fetch(); + uint32 dungeonId = fields[0].GetUInt32(); + Position pos; + pos.m_positionX = fields[1].GetFloat(); + pos.m_positionY = fields[2].GetFloat(); + pos.m_positionZ = fields[3].GetFloat(); + pos.m_orientation = fields[4].GetFloat(); + m_entrancePositions[dungeonId] = pos; + ++count; + } + while (result->NextRow()); + + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg entrance positions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); +} + void LFGMgr::Update(uint32 diff) { if (!m_update) @@ -438,6 +471,12 @@ void LFGMgr::InitializeLockedDungeons(Player* player) locktype = LFG_LOCKSTATUS_TOO_LOW_LEVEL; else if (dungeon->maxlevel < level) locktype = LFG_LOCKSTATUS_TOO_HIGH_LEVEL; + else if (dungeon->flags & LFG_FLAG_SEASONAL) + { + if (HolidayIds holiday = sLFGMgr->GetDungeonSeason(dungeon->ID)) + if (!IsHolidayActive(holiday)) + locktype = LFG_LOCKSTATUS_NOT_IN_SEASON; + } else if (locktype == LFG_LOCKSTATUS_OK && ar) { if (ar->achievement && !player->HasAchieved(ar->achievement)) @@ -460,7 +499,6 @@ void LFGMgr::InitializeLockedDungeons(Player* player) locktype = LFG_LOCKSTATUS_TOO_HIGH_GEAR_SCORE; locktype = LFG_LOCKSTATUS_ATTUNEMENT_TOO_LOW_LEVEL; locktype = LFG_LOCKSTATUS_ATTUNEMENT_TOO_HIGH_LEVEL; - locktype = LFG_LOCKSTATUS_NOT_IN_SEASON; // Need list of instances and needed season to open */ if (locktype != LFG_LOCKSTATUS_OK) @@ -1808,13 +1846,16 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* if (!mapid) { - AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon->map); - if (!at) + LfgEntrancePositionMap::const_iterator itr = m_entrancePositions.find(dungeon->ID); + if (itr != m_entrancePositions.end()) { - sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty); - error = LFG_TELEPORTERROR_INVALID_LOCATION; + mapid = dungeon->map; + x = itr->second.GetPositionX(); + y = itr->second.GetPositionY(); + z = itr->second.GetPositionZ(); + orientation = itr->second.GetOrientation(); } - else + else if (AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon->map)) { mapid = at->target_mapId; x = at->target_X; @@ -1822,6 +1863,11 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* z = at->target_Z; orientation = at->target_Orientation; } + else + { + sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty); + error = LFG_TELEPORTERROR_INVALID_LOCATION; + } } if (error == LFG_TELEPORTERROR_OK) @@ -1889,11 +1935,11 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) ClearState(guid); SetState(guid, LFG_STATE_FINISHED_DUNGEON); - // Give rewards only if its a random dungeon + // Give rewards only if its a random or seasonal dungeon LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(rDungeonId); - if (!dungeon || dungeon->type != LFG_TYPE_RANDOM) + if (!dungeon || (dungeon->type != LFG_TYPE_RANDOM && !(dungeon->flags & LFG_FLAG_SEASONAL))) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random", guid, rDungeonId); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random nor seasonal", guid, rDungeonId); return; } @@ -2001,6 +2047,31 @@ std::string LFGMgr::ConcatenateGuids(LfgGuidList check) return o.str(); } +HolidayIds LFGMgr::GetDungeonSeason(uint32 dungeonId) +{ + HolidayIds holiday = HOLIDAY_NONE; + + switch (dungeonId) + { + case 285: + holiday = HOLIDAY_HALLOWS_END; + break; + case 286: + holiday = HOLIDAY_FIRE_FESTIVAL; + break; + case 287: + holiday = HOLIDAY_BREWFEST; + break; + case 288: + holiday = HOLIDAY_LOVE_IS_IN_THE_AIR; + break; + default: + break; + } + + return holiday; +} + LfgState LFGMgr::GetState(uint64 guid) { sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "]", guid); diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index e341b21706f..9937759741b 100755 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -41,6 +41,14 @@ enum LFGenum LFG_SPELL_LUCK_OF_THE_DRAW = 72221 }; +enum LfgFlags +{ + LFG_FLAG_UNK1 = 0x1, + LFG_FLAG_UNK2 = 0x2, + LFG_FLAG_SEASONAL = 0x4, + LFG_FLAG_UNK3 = 0x8 +}; + /// Determines the type of instance enum LfgType { @@ -143,6 +151,7 @@ typedef std::map<uint64, LfgProposalPlayer*> LfgProposalPlayerMap; typedef std::map<uint32, LfgPlayerBoot*> LfgPlayerBootMap; typedef std::map<uint64, LfgGroupData> LfgGroupDataMap; typedef std::map<uint64, LfgPlayerData> LfgPlayerDataMap; +typedef std::map<uint32, Position> LfgEntrancePositionMap; // Data needed by SMSG_LFG_JOIN_RESULT struct LfgJoinResultData @@ -279,6 +288,7 @@ class LFGMgr void UpdateProposal(uint32 proposalId, uint64 guid, bool accept); // Teleportation + void LoadEntrancePositions(); void TeleportPlayer(Player* player, bool out, bool fromOpcode = false); // Vote kick @@ -286,6 +296,8 @@ class LFGMgr void UpdateBoot(Player* player, bool accept); void OfferContinue(Group* grp); + HolidayIds GetDungeonSeason(uint32 dungeonId); + void InitializeLockedDungeons(Player* player); void _LoadFromDB(Field* fields, uint64 guid); @@ -349,6 +361,7 @@ class LFGMgr uint32 m_NumWaitTimeHealer; ///< Num of players used to calc healers wait time uint32 m_NumWaitTimeDps; ///< Num of players used to calc dps wait time LfgDungeonMap m_CachedDungeonMap; ///< Stores all dungeons by groupType + LfgEntrancePositionMap m_entrancePositions; ///< Stores special entrance positions // Reward System LfgRewardMap m_RewardMap; ///< Stores rewards for random dungeons // Queue diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index e4b67e22221..36f04b3020b 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -123,8 +123,8 @@ void LFGGroupScript::OnRemoveMember(Group* group, uint64 guid, RemoveMethod meth sLFGMgr->SetState(guid, LFG_STATE_NONE); if (Player* player = ObjectAccessor::FindPlayer(guid)) { - if (method == GROUP_REMOVEMETHOD_LEAVE && state != LFG_STATE_FINISHED_DUNGEON && player->HasAura(LFG_SPELL_DUNGEON_COOLDOWN)) - player->CastSpell(player, LFG_SPELL_DUNGEON_DESERTER, false); + if (method == GROUP_REMOVEMETHOD_LEAVE && sLFGMgr->GetState(gguid) != LFG_STATE_FINISHED_DUNGEON && sLFGMgr->GetDungeon(gguid, false)) + player->CastSpell(player, LFG_SPELL_DUNGEON_DESERTER, true); /* else if (group->isLfgKickActive()) // Update internal kick cooldown of kicked diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index e619ac36b2f..d152dc5642f 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -294,7 +294,7 @@ void GameObject::Update(uint32 diff) else if (Unit* owner = GetOwner()) { if (owner->isInCombat()) - m_cooldownTime = time(NULL) + goInfo->trap.cooldown; + m_cooldownTime = time(NULL) + goInfo->trap.startDelay; } m_lootState = GO_READY; break; @@ -418,7 +418,7 @@ void GameObject::Update(uint32 diff) bool IsBattlegroundTrap = false; //FIXME: this is activation radius (in different casting radius that must be selected from spell data) //TODO: move activated state code (cast itself) to GO_ACTIVATED, in this place only check activating and set state - float radius = (float)(goInfo->trap.radius)/2; // TODO rename radius to diameter (goInfo->trap.radius) should be (goInfo->trap.diameter) + float radius = (float)(goInfo->trap.radius)/3*2; // TODO rename radius to diameter (goInfo->trap.radius) should be (goInfo->trap.diameter) if (!radius) { if (goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call) @@ -1081,7 +1081,8 @@ void GameObject::Use(Unit* user) if (sScriptMgr->OnGossipHello(playerUser, this)) return; - AI()->GossipHello(playerUser); + if (AI()->GossipHello(playerUser)) + return; } // If cooldown data present in template diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 34c5732af7b..9177672e8c7 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7823,21 +7823,19 @@ void Player::DuelComplete(DuelCompleteType type) break; case DUEL_WON: UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL, 1); - if (duel->opponent) - { - duel->opponent->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL, 1); + duel->opponent->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL, 1); + + // Credit for quest Death's Challenge + if (getClass() == CLASS_DEATH_KNIGHT && duel->opponent->GetQuestStatus(12733) == QUEST_STATUS_INCOMPLETE) + duel->opponent->CastSpell(duel->opponent, 52994, true); - //Credit for quest Death's Challenge - if (getClass() == CLASS_DEATH_KNIGHT && duel->opponent->GetQuestStatus(12733) == QUEST_STATUS_INCOMPLETE) - duel->opponent->CastSpell(duel->opponent, 52994, true); - } break; default: break; } // Victory emote spell - if (type != DUEL_INTERRUPTED && duel->opponent) + if (type != DUEL_INTERRUPTED) duel->opponent->CastSpell(duel->opponent, 52852, true); //Remove Duel Flag object @@ -9218,6 +9216,9 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) case 4100: // The Culling of Stratholme NumberOfFields = 13; break; + case 4987: // The Ruby Sanctum + NumberOfFields = 3; + break; case 4273: // Ulduar NumberOfFields = 10; break; @@ -9704,6 +9705,17 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) data << uint32(4345) << uint32(1); // 24 unknown } break; + // The Ruby Sanctum + case 4987: + if (instance && mapid == 724) + instance->FillInitialWorldStates(data); + else + { + data << uint32(5049) << uint32(50); // 9 WORLDSTATE_CORPOREALITY_MATERIAL + data << uint32(5050) << uint32(50); // 10 WORLDSTATE_CORPOREALITY_TWILIGHT + data << uint32(5051) << uint32(0); // 11 WORLDSTATE_CORPOREALITY_TOGGLE + } + break; // Icecrown Citadel case 4812: if (instance && mapid == 631) @@ -20975,6 +20987,9 @@ void Player::ContinueTaxiFlight() sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Restart character %u taxi flight", GetGUIDLow()); uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeam(), true); + if (!mountDisplayId) + return; + uint32 path = m_taxi.GetCurrentTaxiPath(); // search appropriate start path node diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 87a125a9ed8..af55c67eff3 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -9076,8 +9076,7 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo) if (Unit* magnet = (*itr)->GetBase()->GetCaster()) if (spellInfo->CheckExplicitTarget(this, magnet) == SPELL_CAST_OK && spellInfo->CheckTarget(this, magnet, false) == SPELL_CAST_OK - && _IsValidAttackTarget(magnet, spellInfo) - && IsWithinLOSInMap(magnet)) + && _IsValidAttackTarget(magnet, spellInfo)) { // TODO: handle this charge drop by proc in cast phase on explicit target (*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 7b100be255d..7351d4b014b 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -802,21 +802,21 @@ enum MeleeHitOutcome class DispelInfo { -private: - Unit* const m_dispeller; - uint32 const m_dispellerSpellId; - uint8 m_chargesRemoved; public: - explicit DispelInfo(Unit* _dispeller, uint32 _dispellerSpellId, uint8 _chargesRemoved) : - m_dispeller(_dispeller), m_dispellerSpellId(_dispellerSpellId), m_chargesRemoved(_chargesRemoved) {} + explicit DispelInfo(Unit* dispeller, uint32 dispellerSpellId, uint8 chargesRemoved) : + _dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) {} - Unit* GetDispeller() { return m_dispeller; } - uint32 GetDispellerSpellId() const { return m_dispellerSpellId; } - uint8 GetRemovedCharges() const { return m_chargesRemoved; } + Unit* GetDispeller() const { return _dispellerUnit; } + uint32 GetDispellerSpellId() const { return _dispellerSpell; } + uint8 GetRemovedCharges() const { return _chargesRemoved; } void SetRemovedCharges(uint8 amount) { - m_chargesRemoved = amount; + _chargesRemoved = amount; } +private: + Unit* _dispellerUnit; + uint32 _dispellerSpell; + uint8 _chargesRemoved; }; struct CleanDamage diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index b8937a58681..196e36ad82b 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5481,7 +5481,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt if (!mount_id) { sLog->outError(LOG_FILTER_SQL, "No displayid found for the taxi mount with the entry %u! Can't load it!", mount_entry); - return false; + return 0; } } } diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index b4f74735568..c2d8dbb8ee0 100755 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -23,6 +23,7 @@ #include "LFGMgr.h" #include "ObjectMgr.h" #include "GroupMgr.h" +#include "GameEventMgr.h" #include "InstanceScript.h" void BuildPlayerLockDungeonBlock(WorldPacket& data, const LfgLockMap& lock) @@ -158,16 +159,25 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData* sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFD_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); // Get Random dungeons that can be done at a certain level and expansion - // FIXME - Should return seasonals (when not disabled) LfgDungeonSet randomDungeons; uint8 level = GetPlayer()->getLevel(); uint8 expansion = GetPlayer()->GetSession()->Expansion(); for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) { LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); - if (dungeon && dungeon->type == LFG_TYPE_RANDOM && dungeon->expansion <= expansion && - dungeon->minlevel <= level && level <= dungeon->maxlevel) + if (dungeon && dungeon->expansion <= expansion && dungeon->minlevel <= level && level <= dungeon->maxlevel) + { + if (dungeon->flags & LFG_FLAG_SEASONAL) + { + if (HolidayIds holiday = sLFGMgr->GetDungeonSeason(dungeon->ID)) + if (!IsHolidayActive(holiday)) + continue; + } + else if (dungeon->type != LFG_TYPE_RANDOM) + continue; + randomDungeons.insert(dungeon->Entry()); + } } // Get player locked Dungeons diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 5c8f6c1f720..cd3b4fae75f 100755 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -325,7 +325,8 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) if (!go->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) return; - go->AI()->GossipHello(_player); + if (go->AI()->GossipHello(_player)) + return; _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry()); } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5fabd49d7be..c0f4bfd1c24 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2415,7 +2415,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) { // solo saves should be reset when entering a group InstanceGroupBind* groupBind = group->GetBoundInstance(this); - if (playerBind) + if (playerBind && playerBind->save != mapSave) { sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); if (groupBind) diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index 54a68f92c66..bd75e1c8912 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -32,6 +32,7 @@ template<class T> void ConfusedMovementGenerator<T>::Initialize(T &unit) { + unit.StopMoving(); float const wander_distance = 4; float x = unit.GetPositionX(); float y = unit.GetPositionY(); diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 6e0c62107ff..c9497784988 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -335,6 +335,7 @@ void FleeingMovementGenerator<Player>::Finalize(Player &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); + owner.StopMoving(); } template<> diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h index 73d611e0419..df20c513c90 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.h +++ b/src/server/game/Movement/Waypoints/WaypointManager.h @@ -27,9 +27,9 @@ struct WaypointData { uint32 id; float x, y, z, orientation; - bool run; uint32 delay; uint32 event_id; + bool run; uint8 event_chance; }; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index ac0d9466736..41ae9fb705f 100755 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -495,6 +495,7 @@ void AddSC_ruby_sanctum(); void AddSC_boss_baltharus_the_warborn(); void AddSC_boss_saviana_ragefire(); void AddSC_boss_general_zarithrian(); +void AddSC_boss_halion(); void AddSC_dalaran(); void AddSC_borean_tundra(); @@ -1208,6 +1209,7 @@ void AddNorthrendScripts() AddSC_boss_baltharus_the_warborn(); AddSC_boss_saviana_ragefire(); AddSC_boss_general_zarithrian(); + AddSC_boss_halion(); AddSC_dalaran(); AddSC_borean_tundra(); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index b645c57f154..0b62000fb3f 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1856,7 +1856,8 @@ void Spell::SendLoot(uint64 guid, LootType loottype) if (sScriptMgr->OnGossipHello(player, gameObjTarget)) return; - gameObjTarget->AI()->GossipHello(player); + if (gameObjTarget->AI()->GossipHello(player)) + return; switch (gameObjTarget->GetGoType()) { diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e2c7ebf12d9..ab6c2b1df8b 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -645,7 +645,7 @@ SpellSpellGroupMapBounds SpellMgr::GetSpellSpellGroupMapBounds(uint32 spell_id) return SpellSpellGroupMapBounds(mSpellSpellGroup.lower_bound(spell_id), mSpellSpellGroup.upper_bound(spell_id)); } -uint32 SpellMgr::IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const +bool SpellMgr::IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const { SpellSpellGroupMapBounds spellGroup = GetSpellSpellGroupMapBounds(spellid); for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second; ++itr) @@ -3430,7 +3430,7 @@ void SpellMgr::LoadDbcDataCorrections() break; case 69055: // Saber Lash (Lord Marrowgar) case 70814: // Saber Lash (Lord Marrowgar) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_5_YARDS; // 5yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_5_YARDS; // 5yd break; case 69075: // Bone Storm (Lord Marrowgar) case 70834: // Bone Storm (Lord Marrowgar) @@ -3440,7 +3440,7 @@ void SpellMgr::LoadDbcDataCorrections() case 71160: // Plague Stench (Stinky) case 71161: // Plague Stench (Stinky) case 71123: // Decimate (Stinky & Precious) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd break; case 72378: // Blood Nova (Deathbringer Saurfang) case 73058: // Blood Nova (Deathbringer Saurfang) @@ -3458,7 +3458,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->Effect[2] = 0; break; case 70460: // Coldflame Jets (Traps after Saurfang) - spellInfo->DurationIndex = 1; // 10 seconds + spellInfo->DurationIndex = 1; // 10 seconds break; case 71412: // Green Ooze Summon (Professor Putricide) case 71415: // Orange Ooze Summon (Professor Putricide) @@ -3481,7 +3481,7 @@ void SpellMgr::LoadDbcDataCorrections() case 72464: // Mutated Plague (Professor Putricide) case 72506: // Mutated Plague (Professor Putricide) case 72507: // Mutated Plague (Professor Putricide) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd break; case 70911: // Unbound Plague (Professor Putricide) (needs target selection script) case 72854: // Unbound Plague (Professor Putricide) (needs target selection script) @@ -3492,7 +3492,7 @@ void SpellMgr::LoadDbcDataCorrections() case 71518: // Unholy Infusion Quest Credit (Professor Putricide) case 72934: // Blood Infusion Quest Credit (Blood-Queen Lana'thel) case 72289: // Frost Infusion Quest Credit (Sindragosa) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // another missing radius + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // another missing radius break; case 71708: // Empowered Flare (Blood Prince Council) case 72785: // Empowered Flare (Blood Prince Council) @@ -3541,62 +3541,62 @@ void SpellMgr::LoadDbcDataCorrections() case 73708: // Defile case 73709: // Defile case 73710: // Defile - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd break; case 69030: // Val'kyr Target Search - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd break; case 69198: // Raging Spirit Visual - spellInfo->rangeIndex = 13; // 50000yd + spellInfo->rangeIndex = 13; // 50000yd break; case 73654: // Harvest Souls case 74295: // Harvest Souls case 74296: // Harvest Souls case 74297: // Harvest Souls - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd - spellInfo->EffectRadiusIndex[2] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[2] = EFFECT_RADIUS_50000_YARDS; // 50000yd break; case 73655: // Harvest Soul spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS; break; case 73540: // Summon Shadow Trap - spellInfo->DurationIndex = 23; // 90 seconds + spellInfo->DurationIndex = 23; // 90 seconds break; case 73530: // Shadow Trap (visual) - spellInfo->DurationIndex = 28; // 5 seconds + spellInfo->DurationIndex = 28; // 5 seconds break; case 73529: // Shadow Trap - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_10_YARDS; // 10yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_10_YARDS; // 10yd break; case 74282: // Shadow Trap (searcher) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_3_YARDS; // 3yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_3_YARDS; // 3yd break; case 72595: // Restore Soul case 73650: // Restore Soul - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd break; case 74086: // Destroy Soul - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd break; case 74302: // Summon Spirit Bomb case 74342: // Summon Spirit Bomb - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd spellInfo->MaxAffectedTargets = 1; break; case 74341: // Summon Spirit Bomb case 74343: // Summon Spirit Bomb - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd spellInfo->MaxAffectedTargets = 3; break; case 73579: // Summon Spirit Bomb - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd break; case 72350: // Fury of Frostmourne - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd break; case 75127: // Kill Frostmourne Players case 72351: // Fury of Frostmourne @@ -3604,19 +3604,35 @@ void SpellMgr::LoadDbcDataCorrections() case 72429: // Mass Resurrection case 73159: // Play Movie case 73582: // Trigger Vile Spirit (Inside, Heroic) - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd break; case 72376: // Raise Dead spellInfo->MaxAffectedTargets = 3; - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd break; case 71809: // Jump - spellInfo->rangeIndex = 3; // 20yd - spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd + spellInfo->rangeIndex = 3; // 20yd + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd break; case 72405: // Broken Frostmourne - spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd + break; + // ENDOF ICECROWN CITADEL SPELLS + // + // RUBY SANCTUM SPELLS + // + case 74769: // Twilight Cutter + case 77844: // Twilight Cutter + case 77845: // Twilight Cutter + case 77846: // Twilight Cutter + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd break; + case 75509: // Twilight Mending + spellInfo->AttributesEx6 |= SPELL_ATTR6_CAN_TARGET_INVISIBLE; + spellInfo->AttributesEx2 |= SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS; + break; + // ENDOF RUBY SANCTUM SPELLS + // case 40055: // Introspection case 40165: // Introspection case 40166: // Introspection @@ -3627,6 +3643,13 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->manaCost = 0; spellInfo->manaPerSecond = 0; break; + // OCULUS SPELLS + // The spells below are here, because their effect 1 is giving warning, because the triggered spell is not found in dbc and is missing from encounter sniff. + case 49462: // Call Ruby Drake + case 49461: // Call Amber Drake + case 49345: // Call Emerald Drake + spellInfo->Effect[1] = 0; + break; default: break; } @@ -3651,5 +3674,5 @@ void SpellMgr::LoadDbcDataCorrections() properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893 properties->Type = SUMMON_TYPE_TOTEM; */ - sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 9423ebf2893..9646bc9dabf 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -643,7 +643,7 @@ class SpellMgr // Spell Groups table SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const; - uint32 IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const; + bool IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const; SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const; void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const; diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index a5d77806739..c8126f8aaf3 100755 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -582,8 +582,8 @@ class AuraScript : public _SpellScript class ScriptStateStore { public: - uint8 _currentScriptState; AuraApplication const* _auraApplication; + uint8 _currentScriptState; bool _defaultActionPrevented; ScriptStateStore(uint8 currentScriptState, AuraApplication const* auraApplication, bool defaultActionPrevented) : _currentScriptState(currentScriptState), _auraApplication(auraApplication), _defaultActionPrevented(defaultActionPrevented) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index e1aa214c583..788e207eea8 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1470,6 +1470,9 @@ void World::SetInitialWorldSettings() sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG rewards..."); sLFGMgr->LoadRewards(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG entrance positions..."); + sLFGMgr->LoadEntrancePositions(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading SpellArea Data..."); // must be after quest load sSpellMgr->LoadSpellAreas(); |
