diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-10-07 14:51:21 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-10-07 14:51:21 +0100 |
| commit | 972b41810330b287fc7c4172cf33878240cd25ce (patch) | |
| tree | 977416b579616da55d24188b1f3a477e5c91eb0d /src/server/game | |
| parent | 509c8d0baefa7d8e0edbca5c9f1bb2c0d81149a4 (diff) | |
| parent | 1a89de87c19936b18d45ec783a3244addb996062 (diff) | |
Merge remote-tracking branch 'origin/master' into mmaps
Conflicts:
src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
Diffstat (limited to 'src/server/game')
31 files changed, 237 insertions, 110 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 ae58f3504b4..1c99934bafc 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -999,7 +999,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; @@ -1069,7 +1069,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 d8f1883cbda..a64184261c7 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -202,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 1c5041da017..90c0dae9f5e 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -843,12 +843,6 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) switch (go->GetEntry()) { case GO_HORDE_GATE_1: - if (!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); - } lang_entry = LANG_BG_IC_NORTH_GATE_DESTROYED; break; case GO_HORDE_GATE_2: @@ -860,18 +854,23 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) lang_entry = LANG_BG_IC_EAST_GATE_DESTROYED; break; case GO_ALLIANCE_GATE_3: - if (!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); - } lang_entry = LANG_BG_IC_SOUTH_GATE_DESTROYED; break; default: 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 ef949f43f49..e4ba3ebb12e 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1203,7 +1203,7 @@ struct LFGDungeonEntry uint32 recmaxlevel; // 22 int32 map; // 23 uint32 difficulty; // 24 - //uint32 flags; // 25 (flags & 4) = IsHoliday + uint32 flags; // 25 uint32 type; // 26 //uint32 unk; // 27 //char* iconname; // 28 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 39d031e96f9..39f9009419e 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -77,7 +77,7 @@ const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii"; const char ItemRandomPropertiesfmt[]="nxiiixxssssssssssssssssx"; const char ItemRandomSuffixfmt[]="nssssssssssssssssxxiiixxiiixx"; const char ItemSetEntryfmt[]="dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; -const char LFGDungeonEntryfmt[]="nxxxxxxxxxxxxxxxxxiiiiiiixixxixixxxxxxxxxxxxxxxxx"; +const char LFGDungeonEntryfmt[]="nxxxxxxxxxxxxxxxxxiiiiiiiiixxixixxxxxxxxxxxxxxxxx"; const char LiquidTypefmt[]="nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; const char MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxssssssssssssssssx"; 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 c4d42f7a537..da6e4ef8407 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -293,7 +293,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; @@ -417,7 +417,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) @@ -1080,7 +1080,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 c41436e1947..50f5fd4c978 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7620,21 +7620,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 @@ -9113,6 +9111,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; @@ -9639,6 +9640,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) @@ -20831,6 +20843,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 3742503c786..d171fa635d2 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10102,8 +10102,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 9b29d644c36..ce329098bc6 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -795,21 +795,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 fd2a2fe143a..95a27fd14e1 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5531,7 +5531,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 aa6d208ad3a..f5d5a0b67e2 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) @@ -156,16 +157,25 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data 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 afaa38527bb..0e5d68d51e4 100755 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -303,7 +303,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 25ffc1d19f2..954dac232ab 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2430,7 +2430,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/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 6442a35f0c3..5f3400804c3 100755 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -503,6 +503,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(); @@ -1224,6 +1225,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 5db0e589e1b..a88ffffd5ea 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2002,7 +2002,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 c89442855e1..ec7359a7ba4 100755 --- 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) @@ -3402,7 +3402,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) @@ -3412,7 +3412,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) @@ -3430,7 +3430,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) @@ -3453,7 +3453,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) @@ -3464,7 +3464,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) @@ -3513,62 +3513,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 @@ -3576,19 +3576,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 @@ -3630,5 +3646,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 39effcf217e..2f022fac4e6 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1475,6 +1475,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(); |
