Merge branch 'master' into Playerbot
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- DB update 2025_05_01_00 -> 2025_05_03_00
|
||||
--
|
||||
DELETE FROM `spell_group` WHERE `spell_id` = 27648 AND `id` = 1014;
|
||||
INSERT INTO `spell_group` VALUES (1014, 27648, 0);
|
||||
@@ -0,0 +1,3 @@
|
||||
-- DB update 2025_05_03_00 -> 2025_05_04_00
|
||||
--
|
||||
UPDATE `gameobject` SET `position_x`=12848.5, `position_y`=-7011.7, `position_z`=19.5233, `orientation`=5.54318 WHERE (`id` = 187115) AND (`guid` = 5300290);
|
||||
@@ -0,0 +1,21 @@
|
||||
-- DB update 2025_05_04_00 -> 2025_05_04_01
|
||||
-- Embalming Slime
|
||||
SET @GUID := 128103;
|
||||
DELETE FROM `creature_formations` WHERE `leaderGUID` = @GUID AND `memberGUID` BETWEEN @GUID AND @GUID+15;
|
||||
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
|
||||
(@GUID, @GUID+0, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+1, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+2, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+3, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+4, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+5, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+6, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+7, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+8, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+9, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+10, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+11, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+12, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+13, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+14, 0, 0, 3, 0, 0),
|
||||
(@GUID, @GUID+15, 0, 0, 3, 0, 0);
|
||||
@@ -0,0 +1,4 @@
|
||||
-- DB update 2025_05_04_01 -> 2025_05_04_02
|
||||
-- Avenging Spirit - Wither
|
||||
DELETE FROM `spell_custom_attr` WHERE `spell_id`=48585;
|
||||
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (48585, 4194304);
|
||||
@@ -0,0 +1,5 @@
|
||||
-- DB update 2025_05_04_02 -> 2025_05_04_03
|
||||
--
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 47939);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 47939, 0, 0, 30, 0, 188539, 5, 0, 0, 0, 0, '', '\'Lumber Hack\' - Limit \'Gather Lumber\' to Coldwind Tree GOs within 5y.');
|
||||
@@ -0,0 +1,6 @@
|
||||
-- DB update 2025_05_04_03 -> 2025_05_04_04
|
||||
--
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceGroup` = 27061) AND (`SourceEntry` = 47920);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(18, 27061, 47920, 0, 0, 9, 0, 12050, 0, 0, 0, 0, 0, '', 'Allow interaction only while on quest \'Lumber Hack!\''),
|
||||
(18, 27061, 47920, 0, 1, 9, 0, 12052, 0, 0, 0, 0, 0, '', 'Allow interaction only while on quest \'Harp on This!\'');
|
||||
@@ -0,0 +1,49 @@
|
||||
-- DB update 2025_05_04_04 -> 2025_05_05_00
|
||||
|
||||
-- Set Don't Override SmartAI on the Stallions
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |134217728 WHERE (`entry` IN(28605));
|
||||
|
||||
-- Change Respawn Timers for Stallions/Mares/Colts
|
||||
UPDATE `creature` SET `spawntimesecs` = 60 WHERE (`id1` IN(28605, 28606, 28607));
|
||||
|
||||
-- Set SmartAI for Stallions, Mare and Colts
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28605;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28605) AND (`source_type` = 0);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(28605, 0, 0, 1, 28, 0, 100, 0, 500, 500, 0, 0, 0, 0, 5, 377, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Passenger Removed - Play Emote 377'),
|
||||
(28605, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Passenger Removed - Despawn In 5000 ms');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28606;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28606) AND (`source_type` = 0);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(28606, 0, 0, 1, 28, 0, 100, 0, 500, 500, 0, 0, 0, 0, 5, 377, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Mare - On Passenger Removed - Play Emote 377'),
|
||||
(28606, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Mare - On Passenger Removed - Despawn In 5000 ms');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28607;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28607) AND (`source_type` = 0);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(28607, 0, 0, 1, 28, 0, 100, 0, 500, 500, 0, 0, 0, 0, 5, 377, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Colt - On Passenger Removed - Play Emote 377'),
|
||||
(28607, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Colt - On Passenger Removed - Despawn In 5000 ms');
|
||||
|
||||
-- Move rows numbers for two Guid SmartAI.
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -129210);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(-129210, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 12921000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Respawn - Start Path 12921000'),
|
||||
(-129210, 0, 3, 4, 108, 0, 100, 0, 8, 12921000, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Point 8 of Path 12921000 Reached - Stop Movement'),
|
||||
(-129210, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2860500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Point 8 of Path 12921000 Reached - Run Script');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -129215);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(-129215, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 12921500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Respawn - Start Path 12921500'),
|
||||
(-129215, 0, 3, 4, 109, 0, 100, 0, 0, 12921500, 0, 0, 0, 0, 41, 2000, 60, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129236, 28606, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129246, 28607, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129249, 28607, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129251, 28607, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129248, 28607, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129245, 28607, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129214, 28605, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms'),
|
||||
(-129215, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 62, 0, 0, 0, 0, 10, 129235, 28606, 0, 0, 0, 0, 0, 0, 'Havenshire Stallion - On Path 12921500 Finished - Despawn In 2000 ms');
|
||||
@@ -0,0 +1,3 @@
|
||||
-- DB update 2025_05_05_00 -> 2025_05_09_00
|
||||
-- Wrath Enforcer
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|2097152 WHERE (`entry` = 25030);
|
||||
@@ -0,0 +1,3 @@
|
||||
-- DB update 2025_05_09_00 -> 2025_05_09_01
|
||||
--
|
||||
UPDATE `creature` SET `spawnMask` = `spawnMask`&~(1) WHERE `guid` IN (68283,68284) AND `id1` = 31104;
|
||||
@@ -137,14 +137,18 @@ struct PowerUsersSelector : public Acore::unary_function<Unit*, bool>
|
||||
Powers const _power;
|
||||
float const _dist;
|
||||
bool const _playerOnly;
|
||||
bool const _withTank;
|
||||
|
||||
PowerUsersSelector(Unit const* unit, Powers power, float dist, bool playerOnly) : _me(unit), _power(power), _dist(dist), _playerOnly(playerOnly) { }
|
||||
PowerUsersSelector(Unit const* unit, Powers power, float dist, bool playerOnly, bool withTank = true) : _me(unit), _power(power), _dist(dist), _playerOnly(playerOnly), _withTank(withTank) { }
|
||||
|
||||
bool operator()(Unit const* target) const
|
||||
{
|
||||
if (!_me || !target)
|
||||
return false;
|
||||
|
||||
if (!_withTank && target == _me->GetThreatMgr().GetCurrentVictim())
|
||||
return false;
|
||||
|
||||
if (target->getPowerType() != _power)
|
||||
return false;
|
||||
|
||||
@@ -294,18 +298,12 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* currentVictim = mgr.GetCurrentVictim();
|
||||
if (currentVictim)
|
||||
targetList.push_back(currentVictim);
|
||||
|
||||
for (ThreatReference const* ref : mgr.GetSortedThreatList())
|
||||
{
|
||||
if (ref->IsOffline())
|
||||
continue;
|
||||
|
||||
Unit* thisTarget = ref->GetVictim();
|
||||
if (thisTarget != currentVictim)
|
||||
targetList.push_back(thisTarget);
|
||||
targetList.push_back(ref->GetVictim());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3460,10 +3460,10 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
|
||||
{
|
||||
if (e.target.hostileRandom.powerType)
|
||||
{
|
||||
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 1, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
|
||||
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 0, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, false)))
|
||||
targets.push_back(u);
|
||||
}
|
||||
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
|
||||
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, false, -e.target.hostileRandom.aura))
|
||||
targets.push_back(u);
|
||||
}
|
||||
break;
|
||||
@@ -3496,10 +3496,10 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
|
||||
{
|
||||
if (e.target.hostileRandom.powerType)
|
||||
{
|
||||
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 1, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
|
||||
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, false)))
|
||||
targets.push_back(u);
|
||||
}
|
||||
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
|
||||
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, false, -e.target.hostileRandom.aura))
|
||||
targets.push_back(u);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "LFGMgr.h"
|
||||
@@ -41,7 +42,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && player->GetMapId() == 609)
|
||||
if (player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && player->GetMapId() == MAP_EBON_HOLD)
|
||||
{
|
||||
handler->PSendSysMessage("Death Knights can't spectate before finishing questline.");
|
||||
return true;
|
||||
@@ -163,7 +164,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s
|
||||
if (bgPreparation)
|
||||
return true;
|
||||
|
||||
float z = spectate->GetMapId() == 618 ? std::max(28.27f, spectate->GetPositionZ() + 0.25f) : spectate->GetPositionZ() + 0.25f;
|
||||
float z = spectate->GetMapId() == MAP_THE_RING_OF_VALOR ? std::max(28.27f, spectate->GetPositionZ() + 0.25f) : spectate->GetPositionZ() + 0.25f;
|
||||
|
||||
player->SetPendingSpectatorForBG(spectate->GetBattlegroundId());
|
||||
player->SetBattlegroundId(spectate->GetBattlegroundId(), spectate->GetBattlegroundTypeId(), PLAYER_MAX_BATTLEGROUND_QUEUES, false, false, TEAM_NEUTRAL);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
/// @todo: Use spell victory/defeat in wg instead of RewardMarkOfHonor() && RewardHonor
|
||||
/// @todo: Add proper implement of achievement
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldWG.h"
|
||||
#include "Chat.h"
|
||||
#include "GameTime.h"
|
||||
@@ -46,8 +47,8 @@ bool BattlefieldWG::SetupBattlefield()
|
||||
{
|
||||
m_TypeId = BATTLEFIELD_WG; // See enum BattlefieldTypes
|
||||
m_BattleId = BATTLEFIELD_BATTLEID_WG;
|
||||
m_ZoneId = BATTLEFIELD_WG_ZONEID;
|
||||
m_MapId = BATTLEFIELD_WG_MAPID;
|
||||
m_ZoneId = AREA_WINTERGRASP;
|
||||
m_MapId = MAP_NORTHREND;
|
||||
m_Map = sMapMgr->FindMap(m_MapId, 0);
|
||||
|
||||
// init stalker AFTER setting map id... we spawn it at map=random memory value?...
|
||||
@@ -81,19 +82,19 @@ bool BattlefieldWG::SetupBattlefield()
|
||||
SetGraveyardNumber(BATTLEFIELD_WG_GRAVEYARD_MAX);
|
||||
|
||||
// Load from db
|
||||
if (!sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE) &&
|
||||
!sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER) &&
|
||||
!sWorld->getWorldState(ClockWorldState[0]))
|
||||
if (!sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE) &&
|
||||
!sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER) &&
|
||||
!sWorldState->getWorldState(ClockWorldState[0]))
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE, uint64(false));
|
||||
sWorld->setWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER, uint64(urand(0, 1)));
|
||||
sWorld->setWorldState(ClockWorldState[0], uint64(m_NoWarBattleTime));
|
||||
sWorldState->setWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE, uint64(false));
|
||||
sWorldState->setWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER, uint64(urand(0, 1)));
|
||||
sWorldState->setWorldState(ClockWorldState[0], uint64(m_NoWarBattleTime));
|
||||
}
|
||||
|
||||
m_isActive = bool(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE));
|
||||
m_DefenderTeam = TeamId(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER));
|
||||
m_isActive = bool(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE));
|
||||
m_DefenderTeam = TeamId(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER));
|
||||
|
||||
m_Timer = sWorld->getWorldState(ClockWorldState[0]);
|
||||
m_Timer = sWorldState->getWorldState(ClockWorldState[0]);
|
||||
if (m_isActive)
|
||||
{
|
||||
m_isActive = false;
|
||||
@@ -195,9 +196,9 @@ bool BattlefieldWG::Update(uint32 diff)
|
||||
bool m_return = Battlefield::Update(diff);
|
||||
if (m_saveTimer <= diff)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE, m_isActive);
|
||||
sWorld->setWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER, m_DefenderTeam);
|
||||
sWorld->setWorldState(ClockWorldState[0], m_Timer);
|
||||
sWorldState->setWorldState(WORLD_STATE_BATTLEFIELD_WG_ACTIVE, m_isActive);
|
||||
sWorldState->setWorldState(WORLD_STATE_BATTLEFIELD_WG_DEFENDER, m_DefenderTeam);
|
||||
sWorldState->setWorldState(ClockWorldState[0], m_Timer);
|
||||
m_saveTimer = 60 * IN_MILLISECONDS;
|
||||
}
|
||||
else
|
||||
@@ -280,7 +281,7 @@ void BattlefieldWG::OnBattleStart()
|
||||
float x, y, z;
|
||||
player->GetPosition(x, y, z);
|
||||
if (5500 > x && x > 5392 && y < 2880 && y > 2800 && z < 480)
|
||||
player->TeleportTo(571, 5349.8686f, 2838.481f, 409.240f, 0.046328f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5349.8686f, 2838.481f, 409.240f, 0.046328f);
|
||||
SendInitWorldStatesTo(player);
|
||||
}
|
||||
}
|
||||
@@ -490,14 +491,14 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
|
||||
if (!endByTimer) // win alli/horde
|
||||
{
|
||||
uint32 const worldStateId = GetDefenderTeam() == TEAM_ALLIANCE ? WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_CAPTURED : WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_CAPTURED;
|
||||
sWorld->setWorldState(worldStateId, sWorld->getWorldState(worldStateId) + 1);
|
||||
sWorldState->setWorldState(worldStateId, sWorldState->getWorldState(worldStateId) + 1);
|
||||
|
||||
SendWarning((GetDefenderTeam() == TEAM_ALLIANCE) ? BATTLEFIELD_WG_TEXT_WIN_KEEP : (BATTLEFIELD_WG_TEXT_WIN_KEEP + 2));
|
||||
}
|
||||
else // defend alli/horde
|
||||
{
|
||||
uint32 const worldStateId = GetDefenderTeam() == TEAM_ALLIANCE ? WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_DEFENDED : WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_DEFENDED;
|
||||
sWorld->setWorldState(worldStateId, sWorld->getWorldState(worldStateId) + 1);
|
||||
sWorldState->setWorldState(worldStateId, sWorldState->getWorldState(worldStateId) + 1);
|
||||
|
||||
SendWarning((GetDefenderTeam() == TEAM_ALLIANCE) ? BATTLEFIELD_WG_TEXT_DEFEND_KEEP : (BATTLEFIELD_WG_TEXT_DEFEND_KEEP + 2));
|
||||
}
|
||||
@@ -523,9 +524,9 @@ uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_NE;
|
||||
case AREA_THE_BROKEN_TEMPLE:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_NW;
|
||||
case AREA_WESTPARK_WORKSHOP:
|
||||
case AREA_WESTSPARK_WORKSHOP:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_SW;
|
||||
case AREA_EASTPARK_WORKSHOP:
|
||||
case AREA_EASTSPARK_WORKSHOP:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_SE;
|
||||
case AREA_WINTERGRASP:
|
||||
return BATTLEFIELD_WG_GY_ALLIANCE;
|
||||
@@ -548,9 +549,9 @@ uint32 BattlefieldWG::GetAreaByGraveyardId(uint8 gId) const
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_NW:
|
||||
return AREA_THE_BROKEN_TEMPLE;
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_SW:
|
||||
return AREA_WESTPARK_WORKSHOP;
|
||||
return AREA_WESTSPARK_WORKSHOP;
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_SE:
|
||||
return AREA_EASTPARK_WORKSHOP;
|
||||
return AREA_EASTSPARK_WORKSHOP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -852,13 +853,13 @@ void BattlefieldWG::OnPlayerJoinWar(Player* player)
|
||||
AddUpdateTenacity(player);
|
||||
|
||||
if (player->GetTeamId() == GetDefenderTeam())
|
||||
player->TeleportTo(571, 5345, 2842, 410, 3.14f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5345, 2842, 410, 3.14f);
|
||||
else
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
player->TeleportTo(571, 5025.857422f, 3674.628906f, 362.737122f, 4.135169f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5025.857422f, 3674.628906f, 362.737122f, 4.135169f);
|
||||
else
|
||||
player->TeleportTo(571, 5101.284f, 2186.564f, 365.549f, 3.812f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5101.284f, 2186.564f, 365.549f, 3.812f);
|
||||
}
|
||||
|
||||
if (player->GetTeamId() == GetAttackerTeam())
|
||||
@@ -926,8 +927,8 @@ uint32 BattlefieldWG::GetData(uint32 data) const
|
||||
// See: SpellArea::IsFitToRequirements
|
||||
case AREA_THE_SUNKEN_RING:
|
||||
case AREA_THE_BROKEN_TEMPLE:
|
||||
case AREA_WESTPARK_WORKSHOP:
|
||||
case AREA_EASTPARK_WORKSHOP:
|
||||
case AREA_WESTSPARK_WORKSHOP:
|
||||
case AREA_EASTSPARK_WORKSHOP:
|
||||
// Graveyards and Workshops are controlled by the same team.
|
||||
if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data)))
|
||||
return graveyard->GetControlTeamId();
|
||||
@@ -959,10 +960,10 @@ void BattlefieldWG::FillInitialWorldStates(WorldPackets::WorldState::InitWorldSt
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_MAX_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A));
|
||||
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_DEFENDED, uint32(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_DEFENDED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_CAPTURED, uint32(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_CAPTURED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_DEFENDED, uint32(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_DEFENDED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_CAPTURED, uint32(sWorld->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_CAPTURED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_DEFENDED, uint32(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_DEFENDED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_CAPTURED, uint32(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_CAPTURED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_DEFENDED, uint32(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_HORDE_KEEP_DEFENDED)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_CAPTURED, uint32(sWorldState->getWorldState(WORLD_STATE_BATTLEFIELD_WG_ALLIANCE_KEEP_CAPTURED)));
|
||||
|
||||
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
|
||||
packet.Worldstates.emplace_back((*itr)->m_WorldState, (*itr)->m_State);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Battlefield.h"
|
||||
#include "Log.h"
|
||||
#include "World.h"
|
||||
#include "WorldState.h"
|
||||
#include "WorldStateDefines.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
@@ -100,20 +101,6 @@ enum WintergraspData
|
||||
BATTLEFIELD_WG_DATA_MAX,
|
||||
};
|
||||
|
||||
enum WintergraspAreaIds
|
||||
{
|
||||
BATTLEFIELD_WG_ZONEID = 4197, // Wintergrasp
|
||||
BATTLEFIELD_WG_MAPID = 571, // Northrend
|
||||
|
||||
AREA_WINTERGRASP_FORTRESS = 4575,
|
||||
AREA_THE_SUNKEN_RING = 4538,
|
||||
AREA_THE_BROKEN_TEMPLE = 4539,
|
||||
AREA_WESTPARK_WORKSHOP = 4611,
|
||||
AREA_EASTPARK_WORKSHOP = 4612,
|
||||
AREA_WINTERGRASP = 4197,
|
||||
AREA_THE_CHILLED_QUAGMIRE = 4589,
|
||||
};
|
||||
|
||||
/*#########################
|
||||
*####### Graveyards ######
|
||||
*#########################*/
|
||||
@@ -1238,7 +1225,7 @@ struct BfWGGameObjectBuilding
|
||||
break;
|
||||
}
|
||||
|
||||
m_State = sWorld->getWorldState(m_WorldState);
|
||||
m_State = sWorldState->getWorldState(m_WorldState);
|
||||
if (gobj)
|
||||
{
|
||||
switch (m_State)
|
||||
@@ -1418,7 +1405,7 @@ struct BfWGGameObjectBuilding
|
||||
|
||||
void Save()
|
||||
{
|
||||
sWorld->setWorldState(m_WorldState, m_State);
|
||||
sWorldState->setWorldState(m_WorldState, m_State);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1503,7 +1490,7 @@ struct WGWorkshop
|
||||
|
||||
void Save()
|
||||
{
|
||||
sWorld->setWorldState(WorkshopsData[workshopId].worldstate, state);
|
||||
sWorldState->setWorldState(WorkshopsData[workshopId].worldstate, state);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -60,16 +60,6 @@ enum BattlegroundDesertionType : uint8
|
||||
ARENA_DESERTION_TYPE_INVITE_LOGOUT = 8, // player is invited to join arena and logs out
|
||||
};
|
||||
|
||||
enum BattlegroundMaps
|
||||
{
|
||||
MAP_BG_ALTERAC_VALLEY = 30,
|
||||
MAP_BG_WARSONG_GULCH = 489,
|
||||
MAP_BG_ARATHI_BASIN = 529,
|
||||
MAP_BG_EYE_OF_THE_STORM = 566,
|
||||
MAP_BG_STRAND_OF_THE_ANCIENTS = 607,
|
||||
MAP_BG_ISLE_OF_CONQUEST = 628
|
||||
};
|
||||
|
||||
enum BattlegroundBroadcastTexts
|
||||
{
|
||||
BG_TEXT_ALLIANCE_WINS = 10633,
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "SharedDefines.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldState.h"
|
||||
#include "WorldStateDefines.h"
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -183,7 +184,7 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
{
|
||||
sArenaTeamMgr->DistributeArenaPoints();
|
||||
m_NextAutoDistributionTime = GameTime::GetGameTime() + Seconds(DAY * sWorld->getIntConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_ARENA_DISTRIBUTION_TIME, m_NextAutoDistributionTime.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_ARENA_DISTRIBUTION_TIME, m_NextAutoDistributionTime.count());
|
||||
}
|
||||
m_AutoDistributionTimeChecker = 600000; // 10 minutes check
|
||||
}
|
||||
@@ -562,7 +563,7 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
|
||||
if (!sWorld->getBoolConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS))
|
||||
return;
|
||||
|
||||
Seconds wstime = Seconds(sWorld->getWorldState(WORLD_STATE_CUSTOM_ARENA_DISTRIBUTION_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_ARENA_DISTRIBUTION_TIME));
|
||||
Seconds curtime = GameTime::GetGameTime();
|
||||
|
||||
LOG_INFO("server.loading", "Initializing Automatic Arena Point Distribution");
|
||||
|
||||
@@ -567,7 +567,7 @@ void BattlegroundSA::TeleportToEntrancePosition(Player* player)
|
||||
{
|
||||
if (player->GetTeamId() != Attackers)
|
||||
{
|
||||
player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -575,12 +575,12 @@ void BattlegroundSA::TeleportToEntrancePosition(Player* player)
|
||||
{
|
||||
player->CastSpell(player, 12438, true);//Without this player falls before boat loads...
|
||||
if (urand(0, 1))
|
||||
player->TeleportTo(607, 2682.936f, -830.368f, 15.0f, 2.895f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 2682.936f, -830.368f, 15.0f, 2.895f, 0);
|
||||
else
|
||||
player->TeleportTo(607, 2577.003f, 980.261f, 15.0f, 0.807f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 2577.003f, 980.261f, 15.0f, 0.807f, 0);
|
||||
}
|
||||
else
|
||||
player->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "WhoListCacheMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "World.h"
|
||||
@@ -56,7 +57,7 @@ void WhoListCacheMgr::Update()
|
||||
|
||||
_whoListStorage.emplace_back(player->GetGUID(), player->GetTeamId(), player->GetSession()->GetSecurity(), player->GetLevel(),
|
||||
player->getClass(), player->getRace(),
|
||||
(player->IsSpectator() ? 4395 /*Dalaran*/ : player->GetZoneId()), player->getGender(), player->IsVisible(),
|
||||
(player->IsSpectator() ? AREA_DALARAN : player->GetZoneId()), player->getGender(), player->IsVisible(),
|
||||
widePlayerName, wideGuildName, playerName, guildName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
}
|
||||
case CONDITION_WORLD_STATE:
|
||||
{
|
||||
condMeets = ConditionValue2 == sWorld->getWorldState(ConditionValue1);
|
||||
condMeets = ConditionValue2 == sWorldState->getWorldState(ConditionValue1);
|
||||
break;
|
||||
}
|
||||
case CONDITION_PHASEMASK:
|
||||
|
||||
@@ -737,7 +737,7 @@ WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid
|
||||
|
||||
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
|
||||
{
|
||||
if (mapid != 530 && mapid != 571) // speed for most cases
|
||||
if (mapid != MAP_OUTLAND && mapid != MAP_NORTHREND) // speed for most cases
|
||||
return mapid;
|
||||
|
||||
if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId))
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef _OBJECT_H
|
||||
#define _OBJECT_H
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "Common.h"
|
||||
#include "DataMap.h"
|
||||
#include "EventProcessor.h"
|
||||
@@ -588,7 +589,7 @@ public:
|
||||
|
||||
[[nodiscard]] bool IsInWintergrasp() const
|
||||
{
|
||||
return GetMapId() == 571 && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f;
|
||||
return GetMapId() == MAP_NORTHREND && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f;
|
||||
}
|
||||
|
||||
uint32 LastUsedScriptID;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Pet.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "CharmInfo.h"
|
||||
#include "Common.h"
|
||||
@@ -81,7 +82,7 @@ void Pet::AddToWorld()
|
||||
}
|
||||
|
||||
// pussywizard: apply ICC buff to pets
|
||||
if (GetOwnerGUID().IsPlayer() && GetMapId() == 631 && FindMap() && FindMap()->ToInstanceMap() && FindMap()->ToInstanceMap()->GetInstanceScript() && FindMap()->ToInstanceMap()->GetInstanceScript()->GetData(251 /*DATA_BUFF_AVAILABLE*/))
|
||||
if (GetOwnerGUID().IsPlayer() && GetMapId() == MAP_ICECROWN_CITADEL && FindMap() && FindMap()->ToInstanceMap() && FindMap()->ToInstanceMap()->GetInstanceScript() && FindMap()->ToInstanceMap()->GetInstanceScript()->GetData(251 /*DATA_BUFF_AVAILABLE*/))
|
||||
if (Unit* owner = GetOwner())
|
||||
if (Player* plr = owner->ToPlayer())
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Player.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "AchievementMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
@@ -1485,7 +1486,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977))
|
||||
if (IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && GetMapId() == MAP_EBON_HOLD && !IsGameMaster() && !HasSpell(50977))
|
||||
{
|
||||
SendTransferAborted(mapid, TRANSFER_ABORT_UNIQUE_MESSAGE, 1);
|
||||
return false;
|
||||
@@ -1730,7 +1731,7 @@ void Player::RemoveFromWorld()
|
||||
m_session->DoLootRelease(lguid);
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<AreaTableIDs>(m_zoneUpdateId));
|
||||
}
|
||||
|
||||
// Remove items from world before self - player must be found in Item::RemoveFromObjectUpdate
|
||||
@@ -1882,9 +1883,9 @@ void Player::Regenerate(Powers power)
|
||||
ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (GetLevel() * 0.066f));
|
||||
|
||||
if (recentCast) // Trinity Updates Mana in intervals of 2s, which is correct
|
||||
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER) * ManaIncreaseRate * 0.001f * m_regenTimer;
|
||||
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER + AsUnderlyingType(POWER_MANA)) * ManaIncreaseRate * 0.001f * m_regenTimer;
|
||||
else
|
||||
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER) * ManaIncreaseRate * 0.001f * m_regenTimer;
|
||||
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER + AsUnderlyingType(POWER_MANA)) * ManaIncreaseRate * 0.001f * m_regenTimer;
|
||||
}
|
||||
break;
|
||||
case POWER_RAGE: // Regenerate rage
|
||||
@@ -1897,7 +1898,14 @@ void Player::Regenerate(Powers power)
|
||||
}
|
||||
break;
|
||||
case POWER_ENERGY: // Regenerate energy (rogue)
|
||||
addvalue += 0.01f * m_regenTimer * sWorld->getRate(RATE_POWER_ENERGY);
|
||||
// Regen per second
|
||||
addvalue += (GetFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER + AsUnderlyingType(POWER_ENERGY)) + 10.f);
|
||||
// Regen per millisecond
|
||||
addvalue *= 0.001f;
|
||||
// Milliseconds passed
|
||||
addvalue *= m_regenTimer;
|
||||
// Rate
|
||||
addvalue *= sWorld->getRate(RATE_POWER_ENERGY);
|
||||
break;
|
||||
case POWER_RUNIC_POWER:
|
||||
{
|
||||
@@ -1918,8 +1926,8 @@ void Player::Regenerate(Powers power)
|
||||
break;
|
||||
}
|
||||
|
||||
// Mana regen calculated in Player::UpdateManaRegen()
|
||||
if (power != POWER_MANA)
|
||||
// Mana regen calculated in Player::UpdateManaRegen(), energy regen calculated in Player::UpdateEnergyRegen()
|
||||
if (power != POWER_MANA && power != POWER_ENERGY)
|
||||
{
|
||||
AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
|
||||
@@ -1947,7 +1955,6 @@ void Player::Regenerate(Powers power)
|
||||
addvalue += m_powerFraction[power];
|
||||
uint32 integerValue = uint32(std::fabs(addvalue));
|
||||
|
||||
bool forcedUpdate = false;
|
||||
if (addvalue < 0.0f)
|
||||
{
|
||||
if (curValue > integerValue)
|
||||
@@ -1959,7 +1966,6 @@ void Player::Regenerate(Powers power)
|
||||
{
|
||||
curValue = 0;
|
||||
m_powerFraction[power] = 0;
|
||||
forcedUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1970,22 +1976,15 @@ void Player::Regenerate(Powers power)
|
||||
{
|
||||
curValue = maxValue;
|
||||
m_powerFraction[power] = 0;
|
||||
forcedUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_powerFraction[power] = addvalue - integerValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_regenTimerCount >= 2000 || forcedUpdate)
|
||||
{
|
||||
if (m_regenTimerCount >= 2000 || curValue == 0 || curValue == maxValue)
|
||||
SetPower(power, curValue, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateUInt32Value(static_cast<uint16>(UNIT_FIELD_POWER1) + power, curValue);
|
||||
}
|
||||
UpdateUInt32Value(UNIT_FIELD_POWER1 + AsUnderlyingType(power), curValue);
|
||||
}
|
||||
|
||||
void Player::RegenerateHealth()
|
||||
@@ -2404,7 +2403,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
|
||||
// Favored experience increase START
|
||||
uint32 zone = GetZoneId();
|
||||
float favored_exp_mult = 0;
|
||||
if ((zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714) && HasAnyAuras(32096 /*Thrallmar's Favor*/, 32098 /*Honor Hold's Favor*/))
|
||||
if ((zone == AREA_HELLFIRE_PENINSULA || zone == AREA_HELLFIRE_RAMPARTS || zone == AREA_MAGTHERIDONS_LAIR || zone == AREA_THE_BLOOD_FURNACE || zone == AREA_THE_SHATTERED_HALLS) && HasAnyAuras(32096 /*Thrallmar's Favor*/, 32098 /*Honor Hold's Favor*/))
|
||||
favored_exp_mult = 0.05f; // Thrallmar's Favor and Honor Hold's Favor
|
||||
|
||||
xp = uint32(xp * (1 + favored_exp_mult));
|
||||
@@ -8249,7 +8248,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// 8 Arena season id
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ARENA_SEASON_ID, sArenaSeasonMgr->GetCurrentSeason());
|
||||
|
||||
if (mapId == 530) // Outland
|
||||
if (mapId == MAP_OUTLAND)
|
||||
{
|
||||
packet.Worldstates.reserve(3);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_NA_UI_TOWER_SLIDER_DISPLAY, 0);
|
||||
@@ -8266,18 +8265,18 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// insert <field> <value>
|
||||
switch (zoneId)
|
||||
{
|
||||
case 1: // Dun Morogh
|
||||
case 11: // Wetlands
|
||||
case 12: // Elwynn Forest
|
||||
case 38: // Loch Modan
|
||||
case 40: // Westfall
|
||||
case 51: // Searing Gorge
|
||||
case 1519: // Stormwind City
|
||||
case 1537: // Ironforge
|
||||
case 2257: // Deeprun Tram
|
||||
case 3703: // Shattrath City
|
||||
case AREA_DUN_MOROGH:
|
||||
case AREA_WETLANDS:
|
||||
case AREA_ELWYNN_FOREST:
|
||||
case AREA_LOCH_MODAN:
|
||||
case AREA_WESTFALL:
|
||||
case AREA_SEARING_GORGE:
|
||||
case AREA_STORMWIND_CITY:
|
||||
case AREA_IRONFORGE:
|
||||
case AREA_DEEPRUN_TRAM:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
break;
|
||||
case 139: // Eastern Plaguelands
|
||||
case AREA_EASTERN_PLAGUELANDS:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_EP)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8318,7 +8317,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_EP_PLAGUEWOODTOWER_H, 0);
|
||||
|
||||
break;
|
||||
case 1377: // Silithus
|
||||
case AREA_SILITHUS:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_SI)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8335,7 +8334,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_AHNQIRAJ_SANDWORM_SW, 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_AHNQIRAJ_SANDWORM_E, 0);
|
||||
break;
|
||||
case 2597: // Alterac Valley
|
||||
case AREA_ALTERAC_VALLEY:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_AV)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8418,7 +8417,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_AV_AID_A_C, 1);
|
||||
}
|
||||
break;
|
||||
case 3277: // Warsong Gulch
|
||||
case AREA_WARSONG_GULCH:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_WS)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8434,7 +8433,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_WS_FLAG_STATE_ALLIANCE, 1);
|
||||
}
|
||||
break;
|
||||
case 3358: // Arathi Basin
|
||||
case AREA_ARATHI_BASIN:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_AB)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8474,7 +8473,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_AB_RESOURCES_WARNING, 1400); // warning limit (1400)
|
||||
}
|
||||
break;
|
||||
case 3820: // Eye of the Storm
|
||||
case AREA_EYE_OF_THE_STORM:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_EY)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8517,7 +8516,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
break;
|
||||
// any of these needs change! the client remembers the prev setting!
|
||||
// ON EVERY ZONE LEAVE, RESET THE OLD ZONE'S WORLD STATE, BUT AT LEAST THE UI STUFF!
|
||||
case 3483: // Hellfire Peninsula
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_HP)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8541,7 +8540,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_HP_STADIUM_H, 1);
|
||||
}
|
||||
break;
|
||||
case 3518: // Nagrand
|
||||
case AREA_NAGRAND:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_NA)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8577,7 +8576,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_NA_MAP_HALAA_ALLIANCE, 0);
|
||||
}
|
||||
break;
|
||||
case 3519: // Terokkar Forest
|
||||
case AREA_TEROKKAR_FOREST:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_TF)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8613,7 +8612,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_TF_UI_LOCKED_DISPLAY_ALLIANCE, 1);
|
||||
}
|
||||
break;
|
||||
case 3521: // Zangarmarsh
|
||||
case AREA_ZANGARMARSH:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_ZM)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8647,7 +8646,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_ZM_MAP_ALLIANCE_FLAG_READY, 0);
|
||||
}
|
||||
break;
|
||||
case 3698: // Nagrand Arena
|
||||
case AREA_NAGRAND_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_NA)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8658,7 +8657,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_NA_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 3702: // Blade's Edge Arena
|
||||
case AREA_BLADES_EDGE_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_BE)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8669,7 +8668,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_BE_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 3968: // Ruins of Lordaeron
|
||||
case AREA_RUINS_OF_LORDAERON:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_RL)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8680,7 +8679,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_RL_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4378: // Dalaran Sewers
|
||||
case AREA_DALARAN_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_DS)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8691,7 +8690,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_DS_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4384: // Strand of the Ancients
|
||||
case AREA_STRAND_OF_THE_ANCIENTS:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_SA)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8727,7 +8726,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// missing unknowns
|
||||
}
|
||||
break;
|
||||
case 4406: // Ring of Valor
|
||||
case ARENA_THE_RING_OF_VALOR:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_RV)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8738,7 +8737,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_RV_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4710: // Isle of Conquest
|
||||
case AREA_ISLE_OF_CONQUEST:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_IC)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8764,7 +8763,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_IC_HORDE_KEEP_CONTROLLED_H, 1);
|
||||
}
|
||||
break;
|
||||
case 4987: // The Ruby Sanctum
|
||||
case AREA_THE_RUBY_SANCTUM:
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8775,8 +8774,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_RUBY_SANCTUM_CORPOREALITY_TOGGLE, 0);
|
||||
}
|
||||
break;
|
||||
case 4812: // Icecrown Citadel
|
||||
if (instance && mapId == 631)
|
||||
case AREA_ICECROWN_CITADEL:
|
||||
if (instance && mapId == MAP_ICECROWN_CITADEL)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8788,8 +8787,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ICECROWN_CITADEL_ATTEMPTS_MAX, 50);
|
||||
}
|
||||
break;
|
||||
case 4100: // The Culling of Stratholme
|
||||
if (instance && mapId == 595)
|
||||
case AREA_THE_CULLING_OF_STRATHOLME:
|
||||
if (instance && mapId == MAP_THE_CULLING_OF_STRATHOLME)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8801,8 +8800,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CULLING_OF_STRATHOLME_TIME_GUARDIAN_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4228: // The Oculus
|
||||
if (instance && mapId == 578)
|
||||
case AREA_THE_OCULUS:
|
||||
if (instance && mapId == MAP_THE_OCULUS)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8811,8 +8810,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OCULUS_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4273: // Ulduar
|
||||
if (instance && mapId == 603)
|
||||
case AREA_ULDUAR:
|
||||
if (instance && mapId == MAP_ULDUAR)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8821,7 +8820,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ULDUAR_ALGALON_DESPAWN_TIMER, 0);
|
||||
}
|
||||
break;
|
||||
case 4415: // Violet Hold
|
||||
case AREA_THE_VIOLET_HOLD:
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8832,8 +8831,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_VIOLET_HOLD_WAVE_COUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4820: // Halls of Refection
|
||||
if (instance && mapId == 668)
|
||||
case AREA_HALLS_OF_REFLECTION:
|
||||
if (instance && mapId == MAP_HALLS_OF_REFLECTION)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8842,7 +8841,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_HALLS_OF_REFLECTION_WAVE_COUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4298: // Scarlet Enclave (DK starting zone)
|
||||
case AREA_PLAGUELANDS_THE_SCARLET_ENCLAVE: // (DK starting zone)
|
||||
// Get Mograine, GUID and ENTRY should NEVER change
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*this, ObjectGuid::Create<HighGuid::Unit>(29173, 130956)))
|
||||
{
|
||||
@@ -8858,7 +8857,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4197: // Wintergrasp
|
||||
case AREA_WINTERGRASP:
|
||||
if (battlefield && battlefield->GetTypeId() == BATTLEFIELD_WG)
|
||||
{
|
||||
battlefield->FillInitialWorldStates(packet);
|
||||
@@ -13607,7 +13606,7 @@ uint32 Player::CalculateTalentsPoints() const
|
||||
uint32 base_talent = GetLevel() < 10 ? 0 : GetLevel() - 9;
|
||||
|
||||
uint32 talentPointsForLevel = 0;
|
||||
if (!IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TALENT_POINT_CALC) || GetMapId() != 609)
|
||||
if (!IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TALENT_POINT_CALC) || GetMapId() != MAP_EBON_HOLD)
|
||||
{
|
||||
talentPointsForLevel = base_talent;
|
||||
}
|
||||
@@ -13636,7 +13635,7 @@ bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell)
|
||||
|
||||
// continent checked in SpellInfo::CheckLocation at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))
|
||||
if (v_map == MAP_NORTHREND && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))
|
||||
{
|
||||
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
|
||||
{
|
||||
|
||||
@@ -1986,6 +1986,7 @@ public:
|
||||
void ApplyManaRegenBonus(int32 amount, bool apply);
|
||||
void ApplyHealthRegenBonus(int32 amount, bool apply);
|
||||
void UpdateManaRegen();
|
||||
void UpdateEnergyRegen();
|
||||
void UpdateRuneRegen(RuneType rune);
|
||||
|
||||
[[nodiscard]] ObjectGuid GetLootGUID() const { return m_lootGuid; }
|
||||
|
||||
@@ -1259,8 +1259,8 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
|
||||
{
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerEnterZone(this, static_cast<WorldStateZoneId>(newZone));
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<AreaTableIDs>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerEnterZone(this, static_cast<AreaTableIDs>(newZone));
|
||||
}
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
|
||||
@@ -952,9 +952,19 @@ void Player::UpdateManaRegen()
|
||||
int32 modManaRegenInterrupt = GetTotalAuraModifier(SPELL_AURA_MOD_MANA_REGEN_INTERRUPT);
|
||||
if (modManaRegenInterrupt > 100)
|
||||
modManaRegenInterrupt = 100;
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER, power_regen_mp5 + CalculatePct(power_regen, modManaRegenInterrupt));
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER + AsUnderlyingType(POWER_MANA), power_regen_mp5 + CalculatePct(power_regen, modManaRegenInterrupt));
|
||||
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER, power_regen_mp5 + power_regen);
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER + AsUnderlyingType(POWER_MANA), power_regen_mp5 + power_regen);
|
||||
}
|
||||
|
||||
void Player::UpdateEnergyRegen()
|
||||
{
|
||||
float regenPerSecond = 10.f; // +10 energy per second
|
||||
regenPerSecond *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, POWER_ENERGY);
|
||||
regenPerSecond += static_cast<float>(GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, POWER_ENERGY)) / static_cast<float>((5 * IN_MILLISECONDS));
|
||||
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER + AsUnderlyingType(POWER_ENERGY), regenPerSecond - 10.f);
|
||||
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER + AsUnderlyingType(POWER_ENERGY), regenPerSecond - 10.f);
|
||||
}
|
||||
|
||||
void Player::UpdateRuneRegen(RuneType rune)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "Unit.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
@@ -4224,7 +4225,7 @@ bool Unit::isInBackInMap(Unit const* target, float distance, float arc) const
|
||||
|
||||
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
{
|
||||
if (c->GetMapId() == 618) // Ring of Valor
|
||||
if (c->GetMapId() == MAP_THE_RING_OF_VALOR)
|
||||
{
|
||||
// skip transport check, check for being below floor level
|
||||
if (this->GetPositionZ() < 28.0f)
|
||||
@@ -4234,7 +4235,7 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
if (bg->GetStartTime() < 80133) // 60000ms preparation time + 20133ms elevator rise time
|
||||
return false;
|
||||
}
|
||||
else if (c->GetMapId() == 631) // Icecrown Citadel
|
||||
else if (c->GetMapId() == MAP_ICECROWN_CITADEL)
|
||||
{
|
||||
// if static transport doesn't match - return false
|
||||
if (c->GetTransport() != this->GetTransport() && ((c->GetTransport() && c->GetTransport()->IsStaticTransport()) || (this->GetTransport() && this->GetTransport()->IsStaticTransport())))
|
||||
@@ -15635,29 +15636,23 @@ void Unit::SetMaxHealth(uint32 val)
|
||||
void Unit::SetPower(Powers power, uint32 val, bool withPowerUpdate /*= true*/, bool fromRegenerate /* = false */)
|
||||
{
|
||||
if (!fromRegenerate && GetPower(power) == val)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 maxPower = GetMaxPower(power);
|
||||
if (maxPower < val)
|
||||
{
|
||||
val = maxPower;
|
||||
}
|
||||
|
||||
if (fromRegenerate)
|
||||
{
|
||||
UpdateUInt32Value(static_cast<uint16>(UNIT_FIELD_POWER1) + power, val);
|
||||
UpdateUInt32Value(UNIT_FIELD_POWER1 + AsUnderlyingType(power), val);
|
||||
AddToObjectUpdateIfNeeded();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetStatInt32Value(static_cast<uint16>(UNIT_FIELD_POWER1) + power, val);
|
||||
}
|
||||
SetStatInt32Value(UNIT_FIELD_POWER1 + AsUnderlyingType(power), val);
|
||||
|
||||
if (withPowerUpdate)
|
||||
{
|
||||
WorldPacket data(SMSG_POWER_UPDATE);
|
||||
WorldPacket data(SMSG_POWER_UPDATE, 8 + 1 + 4);
|
||||
data << GetPackGUID();
|
||||
data << uint8(power);
|
||||
data << uint32(val);
|
||||
@@ -15669,14 +15664,10 @@ void Unit::SetPower(Powers power, uint32 val, bool withPowerUpdate /*= true*/, b
|
||||
{
|
||||
Player* player = ToPlayer();
|
||||
if (getPowerType() == power && player->NeedSendSpectatorData())
|
||||
{
|
||||
ArenaSpectator::SendCommand_UInt32Value(FindMap(), GetGUID(), "CPW", power == POWER_RAGE || power == POWER_RUNIC_POWER ? val / 10 : val);
|
||||
}
|
||||
|
||||
if (player->GetGroup())
|
||||
{
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_CUR_POWER);
|
||||
}
|
||||
}
|
||||
else if (Pet* pet = ToCreature()->ToPet())
|
||||
{
|
||||
@@ -15684,16 +15675,12 @@ void Unit::SetPower(Powers power, uint32 val, bool withPowerUpdate /*= true*/, b
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (owner && (owner->IsPlayer()) && owner->ToPlayer()->GetGroup())
|
||||
{
|
||||
owner->ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_CUR_POWER);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the pet's character sheet with happiness damage bonus
|
||||
if (pet->getPetType() == HUNTER_PET && power == POWER_HAPPINESS)
|
||||
{
|
||||
pet->UpdateDamagePhysical(BASE_ATTACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Vehicle.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldWG.h"
|
||||
#include "Log.h"
|
||||
#include "MoveSplineInit.h"
|
||||
@@ -159,7 +160,7 @@ void Vehicle::ApplyAllImmunities()
|
||||
//_me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_UNATTACKABLE, true);
|
||||
_me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SHIELD, true);
|
||||
_me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_IMMUNE_SHIELD, true);
|
||||
if (_me->GetZoneId() == BATTLEFIELD_WG_ZONEID || _me->ToCreature()->GetSpawnId() || (_me->FindMap() && _me->FindMap()->Instanceable()))
|
||||
if (_me->GetZoneId() == AREA_WINTERGRASP || _me->ToCreature()->GetSpawnId() || (_me->FindMap() && _me->FindMap()->Instanceable()))
|
||||
_me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_SCHOOL_ABSORB, true);
|
||||
|
||||
// ... Resistance, Split damage, Change stats ...
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "UnitAI.h"
|
||||
#include "World.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
#include "WorldState.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <time.h>
|
||||
|
||||
@@ -156,7 +157,7 @@ bool GameEventMgr::StartEvent(uint16 eventId, bool overwrite)
|
||||
auto itr = _gameEventSeasonalQuestsMap.find(eventId);
|
||||
if (itr != _gameEventSeasonalQuestsMap.end() && !itr->second.empty())
|
||||
{
|
||||
sWorld->setWorldState(eventId, GameTime::GetGameTime().count());
|
||||
sWorldState->setWorldState(eventId, GameTime::GetGameTime().count());
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -198,7 +199,7 @@ void GameEventMgr::StopEvent(uint16 eventId, bool overwrite)
|
||||
UnApplyEvent(eventId);
|
||||
|
||||
// When event is stopped, clean up its worldstate
|
||||
sWorld->setWorldState(eventId, 0);
|
||||
sWorldState->setWorldState(eventId, 0);
|
||||
|
||||
if (overwrite && !serverwide_evt)
|
||||
{
|
||||
@@ -1205,7 +1206,7 @@ uint32 GameEventMgr::Update() // return the next e
|
||||
else
|
||||
{
|
||||
// If event is inactive, periodically clean up its worldstate
|
||||
sWorld->setWorldState(itr, 0);
|
||||
sWorldState->setWorldState(itr, 0);
|
||||
|
||||
if (IsActiveEvent(itr))
|
||||
{
|
||||
@@ -1296,7 +1297,7 @@ void GameEventMgr::ApplyNewEvent(uint16 eventId)
|
||||
|
||||
// If event's worldstate is 0, it means the event hasn't been started yet. In that case, reset seasonal quests.
|
||||
// When event ends (if it expires or if it's stopped via commands) worldstate will be set to 0 again, ready for another seasonal quest reset.
|
||||
if (sWorld->getWorldState(eventId) == 0)
|
||||
if (sWorldState->getWorldState(eventId) == 0)
|
||||
{
|
||||
sWorld->ResetEventSeasonalQuests(eventId);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Group.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Config.h"
|
||||
@@ -2013,7 +2014,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
return ERR_IN_NON_RANDOM_BG;
|
||||
|
||||
// don't let Death Knights join BG queues when they are not allowed to be teleported yet
|
||||
if (member->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && member->GetMapId() == 609 && !member->IsGameMaster() && !member->HasSpell(50977))
|
||||
if (member->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && member->GetMapId() == MAP_EBON_HOLD && !member->IsGameMaster() && !member->HasSpell(50977))
|
||||
return ERR_GROUP_JOIN_BATTLEGROUND_FAIL;
|
||||
|
||||
if (!member->GetBGAccessByLevel(bgTemplate->GetBgTypeID()))
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "ArenaSeasonMgr.h"
|
||||
@@ -185,7 +186,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
err = ERR_BATTLEGROUND_QUEUED_FOR_RATED;
|
||||
}
|
||||
// don't let Death Knights join BG queues when they are not allowed to be teleported yet
|
||||
else if (_player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && _player->GetMapId() == 609 && !_player->IsGameMaster() && !_player->HasSpell(50977))
|
||||
else if (_player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && _player->GetMapId() == MAP_EBON_HOLD && !_player->IsGameMaster() && !_player->HasSpell(50977))
|
||||
{
|
||||
err = ERR_BATTLEGROUND_NONE;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "Battleground.h"
|
||||
@@ -2319,13 +2320,13 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
|
||||
if (newTeam == TEAM_ALLIANCE)
|
||||
{
|
||||
loc.WorldRelocate(0, -8867.68f, 673.373f, 97.9034f, 0.0f);
|
||||
zoneId = 1519;
|
||||
loc.WorldRelocate(MAP_EASTERN_KINGDOMS, -8867.68f, 673.373f, 97.9034f, 0.0f);
|
||||
zoneId = AREA_STORMWIND_CITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
loc.WorldRelocate(1, 1633.33f, -4439.11f, 15.7588f, 0.0f);
|
||||
zoneId = 1637;
|
||||
loc.WorldRelocate(MAP_KALIMDOR, 1633.33f, -4439.11f, 15.7588f, 0.0f);
|
||||
zoneId = AREA_ORGRIMMAR;
|
||||
}
|
||||
|
||||
stmt->SetData(1, loc.GetMapId());
|
||||
|
||||
@@ -1416,8 +1416,8 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
Map* homeMap571 = sMapMgr->CreateMap(571, nullptr);
|
||||
Map* homeMap0 = sMapMgr->CreateMap(0, nullptr);
|
||||
Map* homeMap571 = sMapMgr->CreateMap(MAP_NORTHREND, nullptr);
|
||||
Map* homeMap0 = sMapMgr->CreateMap(MAP_EASTERN_KINGDOMS, nullptr);
|
||||
ASSERT(homeMap0 && homeMap571);
|
||||
|
||||
std::map<Player*, Position> playerTeleport;
|
||||
@@ -1444,7 +1444,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
|
||||
oldMap->AfterPlayerUnlinkFromMap();
|
||||
p->SetMap(homeMap0);
|
||||
p->Relocate(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
if (!p->TeleportTo(571, 5790.20f, 2071.36f, 636.07f, 3.60f))
|
||||
if (!p->TeleportTo(MAP_NORTHREND, 5790.20f, 2071.36f, 636.07f, 3.60f))
|
||||
p->GetSession()->KickPlayer("HandleSetRaidDifficultyOpcode 1");
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ACORE_AREA_DEFINES_H
|
||||
#define ACORE_AREA_DEFINES_H
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
enum AreaTableIDs : uint32
|
||||
{
|
||||
AREA_DUN_MOROGH = 1,
|
||||
AREA_BADLANDS = 3,
|
||||
AREA_BLASTED_LANDS = 4,
|
||||
AREA_SWAMP_OF_SORROWS = 8,
|
||||
AREA_DUSKWOOD = 10,
|
||||
AREA_WETLANDS = 11,
|
||||
AREA_ELWYNN_FOREST = 12,
|
||||
AREA_DUROTAR = 14,
|
||||
AREA_DUSTWALLOW_MARSH = 15,
|
||||
AREA_THE_BARRENS = 17,
|
||||
AREA_WESTERN_PLAGUELANDS = 28,
|
||||
AREA_STRANGLETHORN_VALE = 33,
|
||||
AREA_LOCH_MODAN = 38,
|
||||
AREA_WESTFALL = 40,
|
||||
AREA_REDRIDGE_MOUNTAINS = 44,
|
||||
AREA_ARATHI_HIGHLANDS = 45,
|
||||
AREA_BURNING_STEPPES = 46,
|
||||
AREA_THE_HINTERLANDS = 47,
|
||||
AREA_SEARING_GORGE = 51,
|
||||
AREA_DRAGONBLIGHT = 65,
|
||||
AREA_ZUL_DRAK = 66,
|
||||
AREA_THE_STORM_PEAKS = 67,
|
||||
AREA_TIRISFAL_GLADES = 85,
|
||||
AREA_GOLDSHIRE = 87,
|
||||
AREA_WESTFALL_LIGHTHOUSE = 115,
|
||||
AREA_SILVERPINE_FOREST = 130,
|
||||
AREA_KHARANOS = 131,
|
||||
AREA_EASTERN_PLAGUELANDS = 139,
|
||||
AREA_TELDRASSIL = 141,
|
||||
AREA_DARKSHORE = 148,
|
||||
AREA_BRILL = 159,
|
||||
AREA_FELSTONE_FIELD = 199,
|
||||
AREA_DALSONS_TEARS = 200,
|
||||
AREA_GAHRRONS_WITHERING = 201,
|
||||
AREA_THE_WRITHING_HAUNT = 202,
|
||||
AREA_MULGORE = 215,
|
||||
AREA_HILLSBRAD_FOOTHILLS = 267,
|
||||
AREA_ASHENVALE = 331,
|
||||
AREA_FERALAS = 357,
|
||||
AREA_RAZOR_HILL = 362,
|
||||
AREA_CAMP_TAURAJO = 378,
|
||||
AREA_THE_CROSSROADS = 380,
|
||||
AREA_THE_MERCHANT_COAST = 391,
|
||||
AREA_GRIZZLY_HILLS = 394,
|
||||
AREA_THOUSAND_NEEDLES = 400,
|
||||
AREA_DESOLACE = 405,
|
||||
AREA_STONETALON_MOUNTAINS = 406,
|
||||
AREA_TANARIS = 440,
|
||||
AREA_MOONGLADE = 493,
|
||||
AREA_HOWLING_FJORD = 495,
|
||||
AREA_WINTERSPRING = 618,
|
||||
AREA_GATES_OF_IRONFORGE = 809,
|
||||
AREA_ROCKTUSK_FARM = 1296,
|
||||
AREA_SILITHUS = 1377,
|
||||
AREA_UNDERCITY = 1497,
|
||||
AREA_STORMWIND_CITY = 1519,
|
||||
AREA_IRONFORGE = 1537,
|
||||
AREA_ORGRIMMAR = 1637,
|
||||
AREA_THUNDER_BLUFF = 1638,
|
||||
AREA_DARNASSUS = 1657,
|
||||
AREA_STRATHOLME = 2017,
|
||||
AREA_SCHOLOMANCE = 2057,
|
||||
AREA_ALCAZ_ISLAND = 2079,
|
||||
AREA_DEEPRUN_TRAM = 2257,
|
||||
AREA_ALTERAC_VALLEY = 2597,
|
||||
AREA_CRYSTALSONG_FOREST = 2817,
|
||||
AREA_WARSONG_GULCH = 3277,
|
||||
AREA_ARATHI_BASIN = 3358,
|
||||
AREA_AHN_QIRAJ = 3428,
|
||||
AREA_RUINS_OF_AHN_QIRAJ = 3429,
|
||||
AREA_EVERSONG_WOODS = 3430,
|
||||
AREA_GHOSTLANDS = 3433,
|
||||
AREA_HELLFIRE_PENINSULA = 3483,
|
||||
AREA_NAGRAND = 3518,
|
||||
AREA_TEROKKAR_FOREST = 3519,
|
||||
AREA_SHADOWMOON_VALLEY = 3520,
|
||||
AREA_ZANGARMARSH = 3521,
|
||||
AREA_BLADES_EDGE_MOUNTAINS = 3522,
|
||||
AREA_NETHERSTORM = 3523,
|
||||
AREA_AZUREMYST_ISLE = 3524,
|
||||
AREA_BLOODMYST_ISLE = 3525,
|
||||
AREA_BOREAN_TUNDRA = 3537,
|
||||
AREA_THE_EXODAR = 3557,
|
||||
AREA_HELLFIRE_RAMPARTS = 3562,
|
||||
AREA_HELLFIRE_CITADEL = 3563,
|
||||
AREA_AZURE_WATCH = 3576,
|
||||
AREA_SERPENTSHRINE_CAVERN = 3607,
|
||||
AREA_HALAA = 3628,
|
||||
AREA_FALCONWING_SQUARE = 3665,
|
||||
AREA_NAGRAND_ARENA = 3698,
|
||||
AREA_BLADES_EDGE_ARENA = 3702,
|
||||
AREA_SHATTRATH_CITY = 3703,
|
||||
AREA_NORDRASSIL = 3710,
|
||||
AREA_SHOLAZAR_BASIN = 3711,
|
||||
AREA_THE_BLOOD_FURNACE = 3713,
|
||||
AREA_THE_SHATTERED_HALLS = 3714,
|
||||
AREA_THE_STEAMVAULT = 3715,
|
||||
AREA_THE_UNDERBOG = 3716,
|
||||
AREA_THE_SLAVE_PENS = 3717,
|
||||
AREA_SOCRETHARS_SEAT = 3742,
|
||||
AREA_SHADOW_LABYRINTH = 3789,
|
||||
AREA_AUCHENAI_CRYPTS = 3790,
|
||||
AREA_SETHEKK_HALLS = 3791,
|
||||
AREA_MANA_TOMBS = 3792,
|
||||
AREA_EYE_OF_THE_STORM = 3820,
|
||||
AREA_MAGTHERIDONS_LAIR = 3836,
|
||||
AREA_THE_BOTANICA = 3847,
|
||||
AREA_THE_ARCATRAZ = 3848,
|
||||
AREA_THE_MECHANAR = 3849,
|
||||
AREA_INVASION_POINT_OVERLORD = 3900,
|
||||
AREA_RUINS_OF_LORDAERON = 3968,
|
||||
AREA_SHATTERED_STRAITS = 4064,
|
||||
AREA_SUNWELL_PLATEAU = 4075,
|
||||
AREA_ISLE_OF_QUEL_DANAS = 4080,
|
||||
AREA_THE_CULLING_OF_STRATHOLME = 4100,
|
||||
AREA_NAXXANAR = 4128,
|
||||
AREA_MAGISTERS_TERRACE = 4131,
|
||||
AREA_WINTERGARDE_KEEP = 4177,
|
||||
AREA_WINTERGRASP = 4197,
|
||||
AREA_THE_OCULUS = 4228,
|
||||
AREA_ULDUAR = 4273,
|
||||
AREA_PLAGUELANDS_THE_SCARLET_ENCLAVE = 4298,
|
||||
AREA_DALARAN_ARENA = 4378,
|
||||
AREA_STRAND_OF_THE_ANCIENTS = 4384,
|
||||
AREA_DALARAN = 4395,
|
||||
ARENA_THE_RING_OF_VALOR = 4406,
|
||||
AREA_THE_VIOLET_HOLD = 4415,
|
||||
AREA_VALLEY_OF_ANCIENT_WINTERS = 4437,
|
||||
AREA_THE_SUNKEN_RING = 4538,
|
||||
AREA_THE_BROKEN_TEMPLE = 4539,
|
||||
AREA_SEWER_EXIT_PIPE = 4569,
|
||||
AREA_WINTERGRASP_FORTRESS = 4575,
|
||||
AREA_THE_CHILLED_QUAGMIRE = 4589,
|
||||
AREA_WESTSPARK_WORKSHOP = 4611,
|
||||
AREA_EASTSPARK_WORKSHOP = 4612,
|
||||
AREA_VARGOTHS_RETREAT = 4637,
|
||||
AREA_FORMATION_GROUNDS = 4652,
|
||||
AREA_THE_CONSERVATORY_OF_LIFE = 4656,
|
||||
AREA_ARGENT_TOURNAMENT_GROUNDS = 4658,
|
||||
AREA_THE_RING_OF_CHAMPIONS = 4669,
|
||||
AREA_THE_ASPIRANTS_RING = 4670,
|
||||
AREA_THE_ARGENT_VALIANTS_RING = 4671,
|
||||
AREA_THE_ALLIANCE_VALIANTS_RING = 4672,
|
||||
AREA_THE_HORDE_VALIANTS_RING = 4673,
|
||||
AREA_SUNREAVER_PAVILION = 4676,
|
||||
AREA_SILVER_COVENANT_PAVILION = 4677,
|
||||
AREA_ISLE_OF_CONQUEST = 4710,
|
||||
AREA_ICECROWN_CITADEL = 4812,
|
||||
AREA_HALLS_OF_REFLECTION = 4820,
|
||||
AREA_THE_FROZEN_THRONE = 4859,
|
||||
AREA_THE_FROST_QUEENS_LAIR = 4889,
|
||||
AREA_PUTRICIDES_LABORATORY_OF_ALCHEMICAL_HORRORS_AND_FUN = 4890,
|
||||
AREA_THE_SANCTUM_OF_BLOOD = 4891,
|
||||
AREA_FROSTMOURNE = 4910,
|
||||
AREA_THE_RUBY_SANCTUM = 4987
|
||||
};
|
||||
|
||||
enum MapIDs : uint32
|
||||
{
|
||||
MAP_EASTERN_KINGDOMS = 0,
|
||||
MAP_KALIMDOR = 1,
|
||||
MAP_SCOTT_TEST = 25,
|
||||
MAP_ALTERAC_VALLEY = 30,
|
||||
MAP_SHADOWFANG_KEEP = 33,
|
||||
MAP_STORMWIND_STOCKADE = 34,
|
||||
MAP_DEADMINES = 36,
|
||||
MAP_WAILING_CAVERNS = 43,
|
||||
MAP_RAZORFEN_KRAUL = 47,
|
||||
MAP_BLACKFATHOM_DEEPS = 48,
|
||||
MAP_ULDAMAN = 70,
|
||||
MAP_GNOMEREGAN = 90,
|
||||
MAP_SUNKEN_TEMPLE = 109,
|
||||
MAP_RAZORFEN_DOWNS = 129,
|
||||
MAP_SCARLET_MONASTERY = 189,
|
||||
MAP_ZUL_FARRAK = 209,
|
||||
MAP_BLACKROCK_SPIRE = 229,
|
||||
MAP_BLACKROCK_DEPTHS = 230,
|
||||
MAP_ONYXIAS_LAIR = 249,
|
||||
MAP_OPENING_OF_THE_DARK_PORTAL = 269,
|
||||
MAP_SCHOLOMANCE = 289,
|
||||
MAP_ZUL_GURUB = 309,
|
||||
MAP_STRATHOLME = 329,
|
||||
MAP_MARAUDON = 349,
|
||||
MAP_RAGEFIRE_CHASM = 389,
|
||||
MAP_MOLTEN_CORE = 409,
|
||||
MAP_DIRE_MAUL = 429,
|
||||
MAP_BLACKWING_LAIR = 469,
|
||||
MAP_WARSONG_GULCH = 489,
|
||||
MAP_RUINS_OF_AHN_QIRAJ = 509,
|
||||
MAP_ARATHI_BASIN = 529,
|
||||
MAP_OUTLAND = 530,
|
||||
MAP_AHN_QIRAJ_TEMPLE = 531,
|
||||
MAP_KARAZHAN = 532,
|
||||
MAP_NAXXRAMAS = 533,
|
||||
MAP_THE_BATTLE_FOR_MOUNT_HYJAL = 534,
|
||||
MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS = 540,
|
||||
MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE = 542,
|
||||
MAP_HELLFIRE_CITADEL_RAMPARTS = 543,
|
||||
MAP_MAGTHERIDONS_LAIR = 544,
|
||||
MAP_COILFANG_THE_STEAMVAULT = 545,
|
||||
MAP_COILFANG_THE_UNDERBOG = 546,
|
||||
MAP_COILFANG_THE_SLAVE_PENS = 547,
|
||||
MAP_COILFANG_SERPENTSHRINE_CAVERN = 548,
|
||||
MAP_TEMPEST_KEEP = 550,
|
||||
MAP_TEMPEST_KEEP_THE_ARCATRAZ = 552,
|
||||
MAP_TEMPEST_KEEP_THE_BOTANICA = 553,
|
||||
MAP_TEMPEST_KEEP_THE_MECHANAR = 554,
|
||||
MAP_AUCHINDOUN_SHADOW_LABYRINTH = 555,
|
||||
MAP_AUCHINDOUN_SETHEKK_HALLS = 556,
|
||||
MAP_AUCHINDOUN_MANA_TOMBS = 557,
|
||||
MAP_AUCHINDOUN_AUCHENAI_CRYPTS = 558,
|
||||
MAP_THE_ESCAPE_FROM_DURNHOLDE = 560,
|
||||
MAP_BLACK_TEMPLE = 564,
|
||||
MAP_GRUULS_LAIR = 565,
|
||||
MAP_EYE_OF_THE_STORM = 566,
|
||||
MAP_ZUL_AMAN = 568,
|
||||
MAP_NORTHREND = 571,
|
||||
MAP_UTGARDE_KEEP = 574,
|
||||
MAP_UTGARDE_PINNACLE = 575,
|
||||
MAP_THE_NEXUS = 576,
|
||||
MAP_THE_OCULUS = 578,
|
||||
MAP_THE_SUNWELL = 580,
|
||||
MAP_MAGISTERS_TERRACE = 585,
|
||||
MAP_THE_CULLING_OF_STRATHOLME = 595,
|
||||
MAP_HALLS_OF_STONE = 599,
|
||||
MAP_DRAK_THARON_KEEP = 600,
|
||||
MAP_AZJOL_NERUB = 601,
|
||||
MAP_HALLS_OF_LIGHTNING = 602,
|
||||
MAP_ULDUAR = 603,
|
||||
MAP_GUNDRAK = 604,
|
||||
MAP_STRAND_OF_THE_ANCIENTS = 607,
|
||||
MAP_VIOLET_HOLD = 608,
|
||||
MAP_EBON_HOLD = 609,
|
||||
MAP_THE_OBSIDIAN_SANCTUM = 615,
|
||||
MAP_THE_EYE_OF_ETERNITY = 616,
|
||||
MAP_THE_RING_OF_VALOR = 618,
|
||||
MAP_AHN_KAHET_THE_OLD_KINGDOM = 619,
|
||||
MAP_VAULT_OF_ARCHAVON = 624,
|
||||
MAP_ISLE_OF_CONQUEST = 628,
|
||||
MAP_ICECROWN_CITADEL = 631,
|
||||
MAP_THE_FORGE_OF_SOULS = 632,
|
||||
MAP_TRIAL_OF_THE_CRUSADER = 649,
|
||||
MAP_TRIAL_OF_THE_CHAMPION = 650,
|
||||
MAP_PIT_OF_SARON = 658,
|
||||
MAP_HALLS_OF_REFLECTION = 668,
|
||||
MAP_THE_RUBY_SANCTUM = 724
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -102,10 +102,10 @@ void Map::InitVisibilityDistance()
|
||||
|
||||
switch (GetId())
|
||||
{
|
||||
case 609: // Scarlet Enclave (DK starting zone)
|
||||
case MAP_EBON_HOLD: // Scarlet Enclave (DK starting zone)
|
||||
m_VisibleDistance = 125.0f;
|
||||
break;
|
||||
case 25: // Scott Test (box map)
|
||||
case MAP_SCOTT_TEST: // (box map)
|
||||
m_VisibleDistance = 200.0f;
|
||||
break;
|
||||
}
|
||||
@@ -1370,7 +1370,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
|
||||
if (liquid_level > ground_level && G3D::fuzzyGe(z, ground_level - GROUND_HEIGHT_TOLERANCE))
|
||||
{
|
||||
// hardcoded in client like this
|
||||
if (GetId() == 530 && liquid_type == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquid_type == 2)
|
||||
liquid_type = 15;
|
||||
|
||||
uint32 liquidFlagType = 0;
|
||||
@@ -1426,7 +1426,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
|
||||
{
|
||||
// hardcoded in client like this
|
||||
uint32 liquidEntry = map_data.Entry;
|
||||
if (GetId() == 530 && liquidEntry == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquidEntry == 2)
|
||||
liquidEntry = 15;
|
||||
|
||||
liquidData = map_data;
|
||||
@@ -1523,7 +1523,7 @@ void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y
|
||||
if (wmoData && wmoData->liquidInfo && wmoData->liquidInfo->level > wmoData->floorZ)
|
||||
{
|
||||
uint32 liquidType = wmoData->liquidInfo->type;
|
||||
if (GetId() == 530 && liquidType == 2) // gotta love blizzard hacks
|
||||
if (GetId() == MAP_OUTLAND && liquidType == 2) // gotta love blizzard hacks
|
||||
liquidType = 15;
|
||||
|
||||
uint32 liquidFlagType = 0;
|
||||
@@ -1572,7 +1572,7 @@ void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y
|
||||
if (gridLiquidData.Status != LIQUID_MAP_NO_WATER && (!wmoData || gridLiquidData.Level > wmoData->floorZ))
|
||||
{
|
||||
uint32 liquidEntry = gridLiquidData.Entry;
|
||||
if (GetId() == 530 && liquidEntry == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquidEntry == 2)
|
||||
liquidEntry = 15;
|
||||
|
||||
data.liquidInfo = gridLiquidData;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Formulas.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "Battleground.h"
|
||||
#include "Creature.h"
|
||||
#include "Log.h"
|
||||
@@ -98,22 +99,22 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
||||
{
|
||||
switch (player->GetMapId())
|
||||
{
|
||||
case MAP_BG_ALTERAC_VALLEY:
|
||||
case MAP_ALTERAC_VALLEY:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AV);
|
||||
break;
|
||||
case MAP_BG_WARSONG_GULCH:
|
||||
case MAP_WARSONG_GULCH:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_WSG);
|
||||
break;
|
||||
case MAP_BG_ARATHI_BASIN:
|
||||
case MAP_ARATHI_BASIN:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AB);
|
||||
break;
|
||||
case MAP_BG_EYE_OF_THE_STORM:
|
||||
case MAP_EYE_OF_THE_STORM:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_EOTS);
|
||||
break;
|
||||
case MAP_BG_STRAND_OF_THE_ANCIENTS:
|
||||
case MAP_STRAND_OF_THE_ANCIENTS:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_SOTA);
|
||||
break;
|
||||
case MAP_BG_ISLE_OF_CONQUEST:
|
||||
case MAP_ISLE_OF_CONQUEST:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_IC);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
_player->RepopAtGraveyard();
|
||||
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(_player, _player->GetZoneId());
|
||||
sWorldState->HandlePlayerLeaveZone(_player, static_cast<WorldStateZoneId>(_player->GetZoneId()));
|
||||
sWorldState->HandlePlayerLeaveZone(_player, static_cast<AreaTableIDs>(_player->GetZoneId()));
|
||||
|
||||
// pussywizard: remove from battleground queues on logout
|
||||
for (int i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "CellImpl.h"
|
||||
@@ -2018,7 +2019,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
if (modelid > 0)
|
||||
{
|
||||
bool allow = true;
|
||||
if (target->getTransForm() && !(target->GetMapId() == 560 /*The Escape From Durnholde*/))
|
||||
if (target->getTransForm() && !(target->GetMapId() == MAP_THE_ESCAPE_FROM_DURNHOLDE))
|
||||
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()))
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !transformSpellInfo->IsPositive())
|
||||
allow = false;
|
||||
@@ -4664,6 +4665,8 @@ void AuraEffect::HandleModPowerRegen(AuraApplication const* aurApp, uint8 mode,
|
||||
// Update manaregen value
|
||||
if (GetMiscValue() == POWER_MANA)
|
||||
target->ToPlayer()->UpdateManaRegen();
|
||||
else if (GetMiscValue() == POWER_ENERGY)
|
||||
target->ToPlayer()->UpdateEnergyRegen();
|
||||
else if (GetMiscValue() == POWER_RUNE)
|
||||
target->ToPlayer()->UpdateRuneRegen(RuneType(GetMiscValueB()));
|
||||
// other powers are not immediate effects - implemented in Player::Regenerate, Creature::Regenerate
|
||||
|
||||
@@ -1548,9 +1548,9 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
{
|
||||
case 23333: // Warsong Flag
|
||||
case 23335: // Silverwing Flag
|
||||
return map_id == 489 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return map_id == MAP_WARSONG_GULCH && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 34976: // Netherstorm Flag
|
||||
return map_id == 566 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return map_id == MAP_EYE_OF_THE_STORM && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 2584: // Waiting to Resurrect
|
||||
case 22011: // Spirit Heal Channel
|
||||
case 22012: // Spirit Heal
|
||||
@@ -1562,7 +1562,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
if (!mapEntry)
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
|
||||
return zone_id == 4197 || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return zone_id == AREA_WINTERGRASP || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
}
|
||||
case 32724: // Gold Team (Alliance)
|
||||
case 32725: // Green Team (Alliance)
|
||||
|
||||
@@ -5014,9 +5014,27 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
// Heart of the Crusader
|
||||
ApplySpellFix({ 20335, 20336, 20337 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_2].Effect = SPELL_EFFECT_APPLY_AURA;
|
||||
spellInfo->Effects[EFFECT_2].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
|
||||
spellInfo->Effects[EFFECT_2].ApplyAuraName = SPELL_AURA_DUMMY;
|
||||
spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA;
|
||||
spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
|
||||
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY;
|
||||
});
|
||||
|
||||
// Heart of the Crusader (Rank 1)
|
||||
ApplySpellFix({ 20335 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_1].TriggerSpell = 21183; // Heart of the Crusader (Rank 1)
|
||||
});
|
||||
|
||||
// Heart of the Crusader (Rank 2)
|
||||
ApplySpellFix({ 20336 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_1].TriggerSpell = 54498; // Heart of the Crusader (Rank 2)
|
||||
});
|
||||
|
||||
// Heart of the Crusader (Rank 3)
|
||||
ApplySpellFix({ 20337 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_1].TriggerSpell = 54499; // Heart of the Crusader (Rank 3)
|
||||
});
|
||||
|
||||
// Gordok Ogre Suit
|
||||
|
||||
@@ -565,9 +565,6 @@ public:
|
||||
[[nodiscard]] virtual float getFloatConfig(WorldFloatConfigs index) const = 0;
|
||||
virtual void setIntConfig(WorldIntConfigs index, uint32 value) = 0;
|
||||
[[nodiscard]] virtual uint32 getIntConfig(WorldIntConfigs index) const = 0;
|
||||
virtual void setWorldState(uint32 index, uint64 value) = 0;
|
||||
[[nodiscard]] virtual uint64 getWorldState(uint32 index) const = 0;
|
||||
virtual void LoadWorldStates() = 0;
|
||||
[[nodiscard]] virtual bool IsPvPRealm() const = 0;
|
||||
[[nodiscard]] virtual bool IsFFAPvPRealm() const = 0;
|
||||
virtual uint32 GetNextWhoListUpdateDelaySecs() = 0;
|
||||
|
||||
@@ -1301,15 +1301,15 @@ void World::SetInitialWorldSettings()
|
||||
if (!sConfigMgr->isDryRun())
|
||||
{
|
||||
///- Check the existence of the map files for all starting areas.
|
||||
if (!MapMgr::ExistMapAndVMap(0, -6240.32f, 331.033f)
|
||||
|| !MapMgr::ExistMapAndVMap(0, -8949.95f, -132.493f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, -618.518f, -4251.67f)
|
||||
|| !MapMgr::ExistMapAndVMap(0, 1676.35f, 1677.45f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, 10311.3f, 832.463f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, -2917.58f, -257.98f)
|
||||
if (!MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, -6240.32f, 331.033f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, -8949.95f, -132.493f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, -618.518f, -4251.67f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, 1676.35f, 1677.45f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, 10311.3f, 832.463f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, -2917.58f, -257.98f)
|
||||
|| (_int_configs[CONFIG_EXPANSION] && (
|
||||
!MapMgr::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
|
||||
!MapMgr::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
|
||||
!MapMgr::ExistMapAndVMap(MAP_OUTLAND, 10349.6f, -6357.29f) ||
|
||||
!MapMgr::ExistMapAndVMap(MAP_OUTLAND, -3961.64f, -13931.2f))))
|
||||
{
|
||||
LOG_ERROR("server.loading", "Failed to find map files for starting areas");
|
||||
exit(1);
|
||||
@@ -1754,8 +1754,9 @@ void World::SetInitialWorldSettings()
|
||||
LOG_INFO("server.loading", "Loading Creature Formations...");
|
||||
sFormationMgr->LoadCreatureFormations();
|
||||
|
||||
LOG_INFO("server.loading", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
|
||||
LoadWorldStates();
|
||||
LOG_INFO("server.loading", "Loading WorldStates..."); // must be loaded before battleground, outdoor PvP and conditions
|
||||
sWorldState->LoadWorldStates();
|
||||
sWorldState->Load();
|
||||
|
||||
LOG_INFO("server.loading", "Loading Conditions...");
|
||||
sConditionMgr->LoadConditions();
|
||||
@@ -1897,9 +1898,6 @@ void World::SetInitialWorldSettings()
|
||||
LOG_INFO("server.loading", "Loading Active Arena Season...");
|
||||
sArenaSeasonMgr->LoadActiveSeason();
|
||||
|
||||
LOG_INFO("server.loading", "Loading WorldState...");
|
||||
sWorldState->Load();
|
||||
|
||||
sTicketMgr->Initialize();
|
||||
|
||||
///- Initialize Battlegrounds
|
||||
@@ -2522,67 +2520,67 @@ void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 acc
|
||||
|
||||
void World::InitWeeklyQuestResetTime()
|
||||
{
|
||||
Seconds wstime = Seconds(sWorld->getWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME));
|
||||
_nextWeeklyQuestReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(4, 6));
|
||||
|
||||
if (wstime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME, _nextWeeklyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME, _nextWeeklyQuestReset.count());
|
||||
}
|
||||
}
|
||||
|
||||
void World::InitDailyQuestResetTime()
|
||||
{
|
||||
Seconds wstime = Seconds(sWorld->getWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME));
|
||||
_nextDailyQuestReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
|
||||
if (wstime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME, _nextDailyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME, _nextDailyQuestReset.count());
|
||||
}
|
||||
}
|
||||
|
||||
void World::InitMonthlyQuestResetTime()
|
||||
{
|
||||
Seconds wstime = Seconds(sWorld->getWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME));
|
||||
_nextMonthlyQuestReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
|
||||
if (wstime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME, _nextMonthlyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME, _nextMonthlyQuestReset.count());
|
||||
}
|
||||
}
|
||||
|
||||
void World::InitRandomBGResetTime()
|
||||
{
|
||||
Seconds wstime = Seconds(sWorld->getWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME));
|
||||
_nextRandomBGReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
|
||||
if (wstime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME, _nextRandomBGReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME, _nextRandomBGReset.count());
|
||||
}
|
||||
}
|
||||
|
||||
void World::InitCalendarOldEventsDeletionTime()
|
||||
{
|
||||
Seconds currentDeletionTime = Seconds(getWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME));
|
||||
Seconds currentDeletionTime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME));
|
||||
Seconds nextDeletionTime = currentDeletionTime > 0s ? currentDeletionTime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, getIntConfig(CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR)));
|
||||
|
||||
if (currentDeletionTime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, nextDeletionTime.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, nextDeletionTime.count());
|
||||
}
|
||||
}
|
||||
|
||||
void World::InitGuildResetTime()
|
||||
{
|
||||
Seconds wstime = Seconds(getWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME));
|
||||
Seconds wstime = Seconds(sWorldState->getWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME));
|
||||
_nextGuildReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
|
||||
if (wstime == 0s)
|
||||
{
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME, _nextGuildReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME, _nextGuildReset.count());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2597,7 +2595,7 @@ void World::ResetDailyQuests()
|
||||
itr->second->GetPlayer()->ResetDailyQuestStatus();
|
||||
|
||||
_nextDailyQuestReset = Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME, _nextDailyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME, _nextDailyQuestReset.count());
|
||||
|
||||
// change available dailies
|
||||
sPoolMgr->ChangeDailyQuests();
|
||||
@@ -2633,7 +2631,7 @@ void World::ResetWeeklyQuests()
|
||||
itr->second->GetPlayer()->ResetWeeklyQuestStatus();
|
||||
|
||||
_nextWeeklyQuestReset = Seconds(Acore::Time::GetNextTimeWithDayAndHour(4, 6));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME, _nextWeeklyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME, _nextWeeklyQuestReset.count());
|
||||
|
||||
// change available weeklies
|
||||
sPoolMgr->ChangeWeeklyQuests();
|
||||
@@ -2652,7 +2650,7 @@ void World::ResetMonthlyQuests()
|
||||
itr->second->GetPlayer()->ResetMonthlyQuestStatus();
|
||||
|
||||
_nextMonthlyQuestReset = Seconds(Acore::Time::GetNextTimeWithMonthAndHour(-1, 6));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME, _nextMonthlyQuestReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME, _nextMonthlyQuestReset.count());
|
||||
}
|
||||
|
||||
void World::ResetEventSeasonalQuests(uint16 event_id)
|
||||
@@ -2680,7 +2678,7 @@ void World::ResetRandomBG()
|
||||
itr->second->GetPlayer()->SetRandomWinner(false);
|
||||
|
||||
_nextRandomBGReset = Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME, _nextRandomBGReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME, _nextRandomBGReset.count());
|
||||
}
|
||||
|
||||
void World::CalendarDeleteOldEvents()
|
||||
@@ -2688,7 +2686,7 @@ void World::CalendarDeleteOldEvents()
|
||||
LOG_INFO("server.worldserver", "Calendar deletion of old events.");
|
||||
|
||||
_nextCalendarOldEventsDeletionTime = Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, getIntConfig(CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR)));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, _nextCalendarOldEventsDeletionTime.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, _nextCalendarOldEventsDeletionTime.count());
|
||||
sCalendarMgr->DeleteOldEvents();
|
||||
}
|
||||
|
||||
@@ -2697,7 +2695,7 @@ void World::ResetGuildCap()
|
||||
LOG_INFO("server.worldserver", "Guild Daily Cap reset.");
|
||||
|
||||
_nextGuildReset = Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
|
||||
sWorld->setWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME, _nextGuildReset.count());
|
||||
sWorldState->setWorldState(WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME, _nextGuildReset.count());
|
||||
|
||||
sGuildMgr->ResetTimes();
|
||||
}
|
||||
@@ -2730,57 +2728,6 @@ void World::UpdateAreaDependentAuras()
|
||||
}
|
||||
}
|
||||
|
||||
void World::LoadWorldStates()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
QueryResult result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
_worldstates[fields[0].Get<uint32>()] = fields[1].Get<uint32>();
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} World States in {} ms", _worldstates.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
// Setting a worldstate will save it to DB
|
||||
void World::setWorldState(uint32 index, uint64 timeValue)
|
||||
{
|
||||
auto const& it = _worldstates.find(index);
|
||||
if (it != _worldstates.end())
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_WORLDSTATE);
|
||||
stmt->SetData(0, uint32(timeValue));
|
||||
stmt->SetData(1, index);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_WORLDSTATE);
|
||||
stmt->SetData(0, index);
|
||||
stmt->SetData(1, uint32(timeValue));
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
_worldstates[index] = timeValue;
|
||||
}
|
||||
|
||||
uint64 World::getWorldState(uint32 index) const
|
||||
{
|
||||
auto const& itr = _worldstates.find(index);
|
||||
return itr != _worldstates.end() ? itr->second : 0;
|
||||
}
|
||||
|
||||
void World::ProcessQueryCallbacks()
|
||||
{
|
||||
_queryProcessor.ProcessReadyCallbacks();
|
||||
|
||||
@@ -241,10 +241,6 @@ public:
|
||||
return index < INT_CONFIG_VALUE_COUNT ? _int_configs[index] : 0;
|
||||
}
|
||||
|
||||
void setWorldState(uint32 index, uint64 value) override;
|
||||
[[nodiscard]] uint64 getWorldState(uint32 index) const override;
|
||||
void LoadWorldStates() override;
|
||||
|
||||
/// Are we on a "Player versus Player" server?
|
||||
[[nodiscard]] bool IsPvPRealm() const override;
|
||||
[[nodiscard]] bool IsFFAPvPRealm() const override;
|
||||
@@ -324,8 +320,6 @@ private:
|
||||
uint32 _int_configs[INT_CONFIG_VALUE_COUNT];
|
||||
bool _bool_configs[BOOL_CONFIG_VALUE_COUNT];
|
||||
float _float_configs[FLOAT_CONFIG_VALUE_COUNT];
|
||||
typedef std::map<uint32, uint64> WorldStatesMap;
|
||||
WorldStatesMap _worldstates;
|
||||
AccountTypes _allowedSecurityLevel;
|
||||
LocaleConstant _defaultDbcLocale; // from config for one from loaded DBC locales
|
||||
uint32 _availableDbcLocaleMask; // by loaded DBC
|
||||
|
||||
@@ -95,6 +95,57 @@ void WorldState::Load()
|
||||
HandleSunsReachSubPhaseTransition(m_sunsReachData.m_subphaseMask, true);
|
||||
}
|
||||
|
||||
void WorldState::LoadWorldStates()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
QueryResult result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
_worldstates[fields[0].Get<uint32>()] = fields[1].Get<uint32>();
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} World States in {} ms", _worldstates.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
// Setting a worldstate will save it to DB
|
||||
void WorldState::setWorldState(uint32 index, uint64 timeValue)
|
||||
{
|
||||
auto const& it = _worldstates.find(index);
|
||||
if (it != _worldstates.end())
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_WORLDSTATE);
|
||||
stmt->SetData(0, uint32(timeValue));
|
||||
stmt->SetData(1, index);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_WORLDSTATE);
|
||||
stmt->SetData(0, index);
|
||||
stmt->SetData(1, uint32(timeValue));
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
_worldstates[index] = timeValue;
|
||||
}
|
||||
|
||||
uint64 WorldState::getWorldState(uint32 index) const
|
||||
{
|
||||
auto const& itr = _worldstates.find(index);
|
||||
return itr != _worldstates.end() ? itr->second : 0;
|
||||
}
|
||||
|
||||
void WorldState::Save(WorldStateSaveIds saveId)
|
||||
{
|
||||
switch (saveId)
|
||||
@@ -196,32 +247,32 @@ void WorldState::Update(uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldState::HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId)
|
||||
void WorldState::HandlePlayerEnterZone(Player* player, AreaTableIDs zoneId)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_SHATTRATH:
|
||||
case ZONEID_BOTANICA:
|
||||
case ZONEID_MECHANAR:
|
||||
case ZONEID_ARCATRAZ:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
case AREA_THE_BOTANICA:
|
||||
case AREA_THE_MECHANAR:
|
||||
case AREA_THE_ARCATRAZ:
|
||||
if (_adalSongOfBattleTimer)
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
break;
|
||||
case ZONEID_HELLFIRE_PENINSULA:
|
||||
case ZONEID_HELLFIRE_RAMPARTS:
|
||||
case ZONEID_HELLFIRE_CITADEL:
|
||||
case ZONEID_BLOOD_FURNACE:
|
||||
case ZONEID_SHATTERED_HALLS:
|
||||
case ZONEID_MAGTHERIDON_LAIR:
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
case AREA_HELLFIRE_RAMPARTS:
|
||||
case AREA_HELLFIRE_CITADEL:
|
||||
case AREA_THE_BLOOD_FURNACE:
|
||||
case AREA_THE_SHATTERED_HALLS:
|
||||
case AREA_MAGTHERIDONS_LAIR:
|
||||
if (_isMagtheridonHeadSpawnedAlliance && player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->CastSpell(player, SPELL_TROLLBANES_COMMAND, true);
|
||||
else if (_isMagtheridonHeadSpawnedHorde && player->GetTeamId() == TEAM_HORDE)
|
||||
player->CastSpell(player, SPELL_NAZGRELS_FAVOR, true);
|
||||
break;
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_sunsReachData.m_sunsReachReclamationMutex);
|
||||
m_sunsReachData.m_sunsReachReclamationPlayers.push_back(player->GetGUID());
|
||||
@@ -233,32 +284,32 @@ void WorldState::HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId)
|
||||
break;
|
||||
}
|
||||
};
|
||||
void WorldState::HandlePlayerLeaveZone(Player* player, WorldStateZoneId zoneId)
|
||||
void WorldState::HandlePlayerLeaveZone(Player* player, AreaTableIDs zoneId)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_SHATTRATH:
|
||||
case ZONEID_BOTANICA:
|
||||
case ZONEID_MECHANAR:
|
||||
case ZONEID_ARCATRAZ:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
case AREA_THE_BOTANICA:
|
||||
case AREA_THE_MECHANAR:
|
||||
case AREA_THE_ARCATRAZ:
|
||||
if (!_adalSongOfBattleTimer)
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
break;
|
||||
case ZONEID_HELLFIRE_PENINSULA:
|
||||
case ZONEID_HELLFIRE_RAMPARTS:
|
||||
case ZONEID_HELLFIRE_CITADEL:
|
||||
case ZONEID_BLOOD_FURNACE:
|
||||
case ZONEID_SHATTERED_HALLS:
|
||||
case ZONEID_MAGTHERIDON_LAIR:
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
case AREA_HELLFIRE_RAMPARTS:
|
||||
case AREA_HELLFIRE_CITADEL:
|
||||
case AREA_THE_BLOOD_FURNACE:
|
||||
case AREA_THE_SHATTERED_HALLS:
|
||||
case AREA_MAGTHERIDONS_LAIR:
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->RemoveAurasDueToSpell(SPELL_TROLLBANES_COMMAND);
|
||||
else if (player->GetTeamId() == TEAM_HORDE)
|
||||
player->RemoveAurasDueToSpell(SPELL_NAZGRELS_FAVOR);
|
||||
break;
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_sunsReachData.m_sunsReachReclamationMutex);
|
||||
player->RemoveAurasDueToSpell(SPELL_KIRU_SONG_OF_VICTORY);
|
||||
@@ -278,19 +329,19 @@ void WorldState::BuffMagtheridonTeam(TeamId team)
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
player->CastSpell(player, SPELL_TROLLBANES_COMMAND, true);
|
||||
else if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
else if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
player->CastSpell(player, SPELL_NAZGRELS_FAVOR, true);
|
||||
});
|
||||
break;
|
||||
case 540: // The Shattered Halls
|
||||
case 542: // The Blood Furnace
|
||||
case 543: // Ramparts
|
||||
case 544: // Magtheridon's Lair
|
||||
case MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS:
|
||||
case MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE:
|
||||
case MAP_HELLFIRE_CITADEL_RAMPARTS:
|
||||
case MAP_MAGTHERIDONS_LAIR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
@@ -311,19 +362,19 @@ void WorldState::DispelMagtheridonTeam(TeamId team)
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
player->RemoveAurasDueToSpell(SPELL_TROLLBANES_COMMAND);
|
||||
else if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
else if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
player->RemoveAurasDueToSpell(SPELL_NAZGRELS_FAVOR);
|
||||
});
|
||||
break;
|
||||
case 540: // The Shattered Halls
|
||||
case 542: // The Blood Furnace
|
||||
case 543: // Ramparts
|
||||
case 544: // Magtheridon's Lair
|
||||
case MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS:
|
||||
case MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE:
|
||||
case MAP_HELLFIRE_CITADEL_RAMPARTS:
|
||||
case MAP_MAGTHERIDONS_LAIR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
@@ -344,16 +395,16 @@ void WorldState::BuffAdalsSongOfBattle()
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_SHATTRATH)
|
||||
if (player->GetZoneId() == AREA_SHATTRATH_CITY)
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
});
|
||||
break;
|
||||
case 552: // Arcatraz
|
||||
case 553: // Botanica
|
||||
case 554: // Mechanar
|
||||
case MAP_TEMPEST_KEEP_THE_ARCATRAZ:
|
||||
case MAP_TEMPEST_KEEP_THE_BOTANICA:
|
||||
case MAP_TEMPEST_KEEP_THE_MECHANAR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
@@ -371,16 +422,16 @@ void WorldState::DispelAdalsSongOfBattle()
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_SHATTRATH)
|
||||
if (player->GetZoneId() == AREA_SHATTRATH_CITY)
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
});
|
||||
break;
|
||||
case 552: // Arcatraz
|
||||
case 553: // Botanica
|
||||
case 554: // Mechanar
|
||||
case MAP_TEMPEST_KEEP_THE_ARCATRAZ:
|
||||
case MAP_TEMPEST_KEEP_THE_BOTANICA:
|
||||
case MAP_TEMPEST_KEEP_THE_MECHANAR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
@@ -771,22 +822,22 @@ void WorldState::StartSunsReachPhase(bool initial)
|
||||
{
|
||||
case SUNS_REACH_PHASE_1_STAGING_AREA:
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_1);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_MEDIUM_RAIN, 0.75f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_MEDIUM_RAIN, 0.75f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_2_SANCTUM:
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_ONLY);
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_PERMANENT);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.5f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.5f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_3_ARMORY:
|
||||
if (initial)
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_PERMANENT);
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_ONLY); sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_PERMANENT);
|
||||
// TODO: Should be id 2 0.25f?
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.25f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.25f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_4_HARBOR:
|
||||
if (initial)
|
||||
@@ -795,8 +846,8 @@ void WorldState::StartSunsReachPhase(bool initial)
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_PERMANENT);
|
||||
}
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_4);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_FINE, 0.0f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_FINE, 0.0f);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
@@ -1040,10 +1091,10 @@ void WorldState::FillInitialWorldStates(WorldPackets::WorldState::InitWorldState
|
||||
{
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case ZONEID_SHATTRATH:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
{
|
||||
// Sunwell Reclamation
|
||||
switch (m_sunsReachData.m_phase)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef WORLD_STATE_H
|
||||
#define WORLD_STATE_H
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "Player.h"
|
||||
#include <atomic>
|
||||
|
||||
@@ -43,25 +44,6 @@ enum WorldStateEvent
|
||||
WORLD_STATE_CUSTOM_EVENT_ON_MAGTHERIDON_HEAD_DESPAWN = 184641,
|
||||
};
|
||||
|
||||
enum WorldStateZoneId
|
||||
{
|
||||
ZONEID_SHATTRATH = 3703,
|
||||
ZONEID_BOTANICA = 3847,
|
||||
ZONEID_ARCATRAZ = 3848,
|
||||
ZONEID_MECHANAR = 3849,
|
||||
|
||||
ZONEID_HELLFIRE_PENINSULA = 3483,
|
||||
ZONEID_HELLFIRE_RAMPARTS = 3562,
|
||||
ZONEID_HELLFIRE_CITADEL = 3563,
|
||||
ZONEID_BLOOD_FURNACE = 3713,
|
||||
ZONEID_SHATTERED_HALLS = 3714,
|
||||
ZONEID_MAGTHERIDON_LAIR = 3836,
|
||||
|
||||
ZONEID_ISLE_OF_QUEL_DANAS = 4080,
|
||||
ZONEID_MAGISTERS_TERRACE = 4131,
|
||||
ZONEID_SUNWELL_PLATEAU = 4075,
|
||||
};
|
||||
|
||||
enum WorldStateSpells
|
||||
{
|
||||
SPELL_ADAL_SONG_OF_BATTLE = 39953,
|
||||
@@ -177,10 +159,13 @@ class WorldState
|
||||
virtual ~WorldState();
|
||||
static WorldState* instance();
|
||||
void Load();
|
||||
void LoadWorldStates();
|
||||
void setWorldState(uint32 index, uint64 value);
|
||||
[[nodiscard]] uint64 getWorldState(uint32 index) const;
|
||||
void Save(WorldStateSaveIds saveId);
|
||||
void SaveHelper(std::string& stringToSave, WorldStateSaveIds saveId);
|
||||
void HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId);
|
||||
void HandlePlayerLeaveZone(Player* player, WorldStateZoneId zoneId);
|
||||
void HandlePlayerEnterZone(Player* player, AreaTableIDs zoneId);
|
||||
void HandlePlayerLeaveZone(Player* player, AreaTableIDs zoneId);
|
||||
bool IsConditionFulfilled(WorldStateCondition conditionId, WorldStateConditionState state = WORLD_STATE_CONDITION_STATE_NONE) const;
|
||||
void HandleConditionStateChange(WorldStateCondition conditionId, WorldStateConditionState state);
|
||||
void HandleExternalEvent(WorldStateEvent eventId, uint32 param);
|
||||
@@ -195,6 +180,8 @@ class WorldState
|
||||
void HandleSunwellGateTransition(uint32 newGate);
|
||||
void SetSunwellGateCounter(SunwellGateCounters index, uint32 value);
|
||||
private:
|
||||
typedef std::map<uint32, uint64> WorldStatesMap;
|
||||
WorldStatesMap _worldstates;
|
||||
void SendWorldstateUpdate(std::mutex& mutex, GuidVector const& guids, uint32 value, uint32 worldStateId);
|
||||
void StopSunsReachPhase(bool forward);
|
||||
void StartSunsReachPhase(bool initial = false);
|
||||
|
||||
@@ -2949,7 +2949,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->GetSession()->GetPlayer()->CastSpell(unit, 530, true);
|
||||
handler->GetSession()->GetPlayer()->CastSpell(unit, MAP_OUTLAND, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ private:
|
||||
class instance_blackrock_depths : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { }
|
||||
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", MAP_BLACKROCK_DEPTHS) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ DoorData const doorData[] =
|
||||
class instance_blackrock_spire : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_blackrock_spire() : InstanceMapScript(BRSScriptName, 229) { }
|
||||
instance_blackrock_spire() : InstanceMapScript(BRSScriptName, MAP_BLACKROCK_SPIRE) { }
|
||||
|
||||
struct instance_blackrock_spireMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceMapScript.h"
|
||||
@@ -269,7 +270,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (me->GetMapId() == 469)
|
||||
if (me->GetMapId() == MAP_BLACKWING_LAIR)
|
||||
{
|
||||
if (Creature* nefarian = me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true))
|
||||
{
|
||||
|
||||
+3
-4
@@ -75,7 +75,7 @@ uint32 const Entry[3] = { 12422, 12416, 12420 };
|
||||
class instance_blackwing_lair : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_blackwing_lair() : InstanceMapScript(BWLScriptName, 469) { }
|
||||
instance_blackwing_lair() : InstanceMapScript(BWLScriptName, MAP_BLACKWING_LAIR) { }
|
||||
|
||||
struct instance_blackwing_lair_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
@@ -504,8 +504,7 @@ class spell_bwl_shadowflame : public SpellScript
|
||||
|
||||
enum orb_of_command_misc
|
||||
{
|
||||
QUEST_BLACKHANDS_COMMAND = 7761,
|
||||
MAP_BWL = 469
|
||||
QUEST_BLACKHANDS_COMMAND = 7761
|
||||
};
|
||||
|
||||
const Position orbOfCommandTP = { -7672.46f, -1107.19f, 396.65f, 0.59f };
|
||||
@@ -519,7 +518,7 @@ public:
|
||||
{
|
||||
if (!player->IsAlive() && player->GetQuestRewardStatus(QUEST_BLACKHANDS_COMMAND))
|
||||
{
|
||||
player->TeleportTo(MAP_BWL, orbOfCommandTP.m_positionX, orbOfCommandTP.m_positionY, orbOfCommandTP.m_positionZ, orbOfCommandTP.m_orientation);
|
||||
player->TeleportTo(MAP_BLACKWING_LAIR, orbOfCommandTP.m_positionX, orbOfCommandTP.m_positionY, orbOfCommandTP.m_positionZ, orbOfCommandTP.m_orientation);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
if (urand(0, 1))
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
|
||||
{
|
||||
DoCast(target, SPELL_SHADOW_BOLT_RANDOM);
|
||||
}
|
||||
|
||||
+1
-1
@@ -353,7 +353,7 @@ public:
|
||||
}
|
||||
case EVENT_TELEPORT_RANDOM:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
|
||||
{
|
||||
DoCastSelf(SPELL_HATE_TO_ZERO, true);
|
||||
DoCast(target, SPELL_TELEPORT_RANDOM);
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ constexpr uint8 SAY_SPAWN = 1;
|
||||
class instance_molten_core : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_molten_core() : InstanceMapScript(MCScriptName, 409) {}
|
||||
instance_molten_core() : InstanceMapScript(MCScriptName, MAP_MOLTEN_CORE) {}
|
||||
|
||||
struct instance_molten_core_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
class instance_deadmines : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_deadmines() : InstanceMapScript("instance_deadmines", 36) { }
|
||||
instance_deadmines() : InstanceMapScript("instance_deadmines", MAP_DEADMINES) { }
|
||||
|
||||
struct instance_deadmines_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class instance_gnomeregan : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", 90) { }
|
||||
instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", MAP_GNOMEREGAN) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -214,7 +214,7 @@ struct boss_netherspite : public BossAI
|
||||
context.Repeat(90s);
|
||||
}).Schedule(15s, PORTAL_PHASE, [this](TaskContext context)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true);
|
||||
DoCastRandomTarget(SPELL_VOIDZONE, 0, 45.0f, true, true, false);
|
||||
context.Repeat(15s);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ struct boss_malchezaar : public BossAI
|
||||
|
||||
scheduler.Schedule(20s, 30s, [this](TaskContext context)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 1);
|
||||
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 0, 0.0f, true, false, false);
|
||||
context.Repeat();
|
||||
}).Schedule(20s, [this](TaskContext context)
|
||||
{
|
||||
|
||||
@@ -1210,7 +1210,7 @@ struct boss_romulo : public ScriptedAI
|
||||
|
||||
_scheduler.Schedule(15s, GROUP_COMBAT, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true, false))
|
||||
{
|
||||
if (target && !me->HasInArc(M_PI, target))
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ DoorData const doorData[] =
|
||||
class instance_karazhan : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_karazhan() : InstanceMapScript("instance_karazhan", 532) { }
|
||||
instance_karazhan() : InstanceMapScript("instance_karazhan", MAP_KARAZHAN) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f }
|
||||
class instance_magisters_terrace : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_magisters_terrace() : InstanceMapScript("instance_magisters_terrace", 585) { }
|
||||
instance_magisters_terrace() : InstanceMapScript("instance_magisters_terrace", MAP_MAGISTERS_TERRACE) { }
|
||||
|
||||
struct instance_magisters_terrace_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ float const CATHEDRAL_PULL_RANGE = 80.0f; // Distance from the Cathedral doors t
|
||||
class instance_scarlet_monastery : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) {}
|
||||
instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", MAP_SCARLET_MONASTERY) {}
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
if (victim && (target->GetGUID() == victim->GetGUID()))
|
||||
{
|
||||
me->AddThreat(victim, -1000000); // drop current player, add a ton to second. This should guarantee that we don't end up with both 1 and 2 in a cage...
|
||||
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 1, 200.0f)) // search in whole room
|
||||
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 0, 200.0f, false, false)) // search in whole room
|
||||
{
|
||||
me->AddThreat(newTarget, 1000000);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 20s);
|
||||
break;
|
||||
case EVENT_DOMINATE_MIND:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 20.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true, false))
|
||||
{
|
||||
me->CastSpell(target, SPELL_DOMINATE_MIND, false);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ Position KirtonosSpawn = Position(315.028, 70.5385, 102.15, 0.385971);
|
||||
class instance_scholomance : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_scholomance() : InstanceMapScript(ScholomanceScriptName, 289) { }
|
||||
instance_scholomance() : InstanceMapScript(ScholomanceScriptName, MAP_SCHOLOMANCE) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ enum Spells
|
||||
class instance_shadowfang_keep : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", 33) { }
|
||||
instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", MAP_SHADOWFANG_KEEP) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ Position const SlaughterPos = { 4032.20f, -3378.06f, 119.75f, 4.67f };
|
||||
class instance_stratholme : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_stratholme() : InstanceMapScript("instance_stratholme", 329) { }
|
||||
instance_stratholme() : InstanceMapScript("instance_stratholme", MAP_STRATHOLME) { }
|
||||
|
||||
struct instance_stratholme_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
class instance_sunken_temple : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", 109) { }
|
||||
instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", MAP_SUNKEN_TEMPLE) { }
|
||||
|
||||
struct instance_sunken_temple_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -227,6 +227,11 @@ struct boss_kiljaeden : public BossAI
|
||||
boss_kiljaeden(Creature* creature) : BossAI(creature, DATA_KILJAEDEN)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
scheduler.SetValidator([this]
|
||||
{
|
||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||
});
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
@@ -303,22 +308,22 @@ struct boss_kiljaeden : public BossAI
|
||||
|
||||
scheduler.CancelAll();
|
||||
|
||||
ScheduleBasicAbilities();
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY2);
|
||||
EmpowerOrb(false);
|
||||
}, 35s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
scheduler.Schedule(1s, [this](TaskContext)
|
||||
{
|
||||
Talk(SAY_KJ_REFLECTION);
|
||||
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
|
||||
}, 1s);
|
||||
});
|
||||
|
||||
scheduler.Schedule(1s + 200ms, [this](TaskContext)
|
||||
{
|
||||
DoCastSelf(SPELL_SHADOW_SPIKE);
|
||||
ScheduleBasicAbilities();
|
||||
});
|
||||
|
||||
ScheduleTimedEvent(15s, [&] {
|
||||
@@ -340,75 +345,80 @@ struct boss_kiljaeden : public BossAI
|
||||
ScheduleHealthCheckEvent(25, [&] {
|
||||
_phase = PHASE_SACRIFICE;
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
Talk(SAY_KJ_REFLECTION);
|
||||
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
|
||||
}, 1s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
DoCastSelf(SPELL_SHADOW_SPIKE);
|
||||
}, 2s);
|
||||
|
||||
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
|
||||
{
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FOCUS, 8s);
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FATE, 20s + 200ms);
|
||||
}
|
||||
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
{
|
||||
anveena->AI()->Talk(SAY_ANVEENA_KALEC, 18s);
|
||||
anveena->AI()->Talk(SAY_ANVEENA_GOODBYE, 25s);
|
||||
}
|
||||
|
||||
scheduler.CancelAll();
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
scheduler.Schedule(1s, [this](TaskContext)
|
||||
{
|
||||
scheduler.Schedule(1s, [this](TaskContext)
|
||||
{
|
||||
anveena->RemoveAllAuras();
|
||||
anveena->DespawnOrUnsummon(3500);
|
||||
}
|
||||
}, 28s);
|
||||
Talk(SAY_KJ_REFLECTION);
|
||||
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
|
||||
});
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
scheduler.Schedule(2s, [this](TaskContext)
|
||||
{
|
||||
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
|
||||
DoCastSelf(SPELL_CUSTOM_08_STATE, true);
|
||||
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
scheduler.DelayAll(7100ms);
|
||||
DoCastSelf(SPELL_SHADOW_SPIKE);
|
||||
});
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->RemoveAurasDueToSpell(SPELL_CUSTOM_08_STATE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
|
||||
ScheduleBasicAbilities();
|
||||
|
||||
ScheduleTimedEvent(25s, [&] {
|
||||
me->RemoveAurasDueToSpell(SPELL_ARMAGEDDON_PERIODIC);
|
||||
Talk(EMOTE_KJ_DARKNESS);
|
||||
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS);
|
||||
|
||||
me->m_Events.AddEventAtOffset([this]() {
|
||||
if (me->IsAlive() && me->IsInCombat())
|
||||
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
|
||||
}, 9s);
|
||||
}, 25s);
|
||||
|
||||
ScheduleTimedEvent(1500ms, [&] {
|
||||
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
|
||||
}, 20s);
|
||||
}, 7s);
|
||||
}
|
||||
Talk(SAY_KJ_PHASE5);
|
||||
}, 30s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY_ALL);
|
||||
EmpowerOrb(true);
|
||||
}, 61s);
|
||||
{
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FOCUS, 8s);
|
||||
kalec->AI()->Talk(SAY_KALECGOS_FATE, 20s + 200ms);
|
||||
}
|
||||
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
{
|
||||
anveena->AI()->Talk(SAY_ANVEENA_KALEC, 18s);
|
||||
anveena->AI()->Talk(SAY_ANVEENA_GOODBYE, 25s);
|
||||
}
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
{
|
||||
anveena->RemoveAllAuras();
|
||||
anveena->DespawnOrUnsummon(3500);
|
||||
}
|
||||
}, 28s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
|
||||
{
|
||||
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
|
||||
DoCastSelf(SPELL_CUSTOM_08_STATE, true);
|
||||
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
scheduler.CancelAll();
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->RemoveAurasDueToSpell(SPELL_CUSTOM_08_STATE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
|
||||
ScheduleBasicAbilities();
|
||||
|
||||
ScheduleTimedEvent(25s, [&] {
|
||||
me->RemoveAurasDueToSpell(SPELL_ARMAGEDDON_PERIODIC);
|
||||
Talk(EMOTE_KJ_DARKNESS);
|
||||
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS);
|
||||
|
||||
me->m_Events.AddEventAtOffset([this]() {
|
||||
if (me->IsAlive() && me->IsInCombat())
|
||||
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
|
||||
}, 9s);
|
||||
}, 25s);
|
||||
|
||||
ScheduleTimedEvent(1500ms, [&] {
|
||||
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
|
||||
}, 20s);
|
||||
}, 7s);
|
||||
}
|
||||
Talk(SAY_KJ_PHASE5);
|
||||
}, 30s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
|
||||
kalec->AI()->Talk(SAY_KALECGOS_READY_ALL);
|
||||
EmpowerOrb(true);
|
||||
}, 61s);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -461,8 +471,12 @@ struct boss_kiljaeden : public BossAI
|
||||
{
|
||||
if (me->GetReactState() == REACT_PASSIVE)
|
||||
return;
|
||||
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
me->DespawnOrUnsummon();
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* controller = instance->GetCreature(DATA_KJ_CONTROLLER))
|
||||
if (controller->IsAIEnabled)
|
||||
controller->AI()->Reset();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
|
||||
@@ -78,7 +78,7 @@ ObjectData const summonData[] =
|
||||
class instance_sunwell_plateau : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", 580) { }
|
||||
instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", MAP_THE_SUNWELL) { }
|
||||
|
||||
struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
class instance_the_stockade : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_the_stockade() : InstanceMapScript("instance_the_stockade", 34) { }
|
||||
instance_the_stockade() : InstanceMapScript("instance_the_stockade", MAP_STORMWIND_STOCKADE) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -36,7 +37,7 @@ enum Events
|
||||
class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_uldaman() : InstanceMapScript("instance_uldaman", 70) { }
|
||||
instance_uldaman() : InstanceMapScript("instance_uldaman", MAP_ULDAMAN) { }
|
||||
|
||||
struct instance_uldaman_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
@@ -156,11 +157,6 @@ class spell_uldaman_sub_boss_agro_keepers : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum UldamanStonedEnum
|
||||
{
|
||||
MAP_ULDAMAN = 70
|
||||
};
|
||||
|
||||
class spell_uldaman_stoned_aura : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_uldaman_stoned_aura);
|
||||
|
||||
@@ -84,7 +84,7 @@ struct boss_akilzon : public BossAI
|
||||
|
||||
scheduler.Schedule(10s, 20s, GROUP_STATIC_DISRUPTION, [this](TaskContext context)
|
||||
{
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
@@ -99,7 +99,7 @@ struct boss_akilzon : public BossAI
|
||||
|
||||
ScheduleTimedEvent(20s, 30s, [&] {
|
||||
if (scheduler.GetNextGroupOccurrence(GROUP_ELECTRICAL_STORM) > 5s)
|
||||
DoCastRandomTarget(SPELL_GUST_OF_WIND, 1);
|
||||
DoCastRandomTarget(SPELL_GUST_OF_WIND, 0, 0.0f, true, false, false);
|
||||
}, 20s, 30s);
|
||||
|
||||
ScheduleTimedEvent(10s, 20s, [&] {
|
||||
|
||||
@@ -205,7 +205,7 @@ struct boss_zuljin : public BossAI
|
||||
if (me->HasAura(SPELL_LYNX_RUSH_HASTE))
|
||||
return;
|
||||
|
||||
DoCastRandomTarget(SPELL_CLAW_RAGE_CHARGE, 1);
|
||||
DoCastRandomTarget(SPELL_CLAW_RAGE_CHARGE, 0, 0.0f, true, false, true);
|
||||
}, 15s, 20s);
|
||||
|
||||
ScheduleTimedEvent(14s, [&] {
|
||||
|
||||
@@ -96,7 +96,7 @@ BossBoundaryData const boundaries =
|
||||
class instance_zulaman : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_zulaman() : InstanceMapScript("instance_zulaman", 568) { }
|
||||
instance_zulaman() : InstanceMapScript("instance_zulaman", MAP_ZUL_AMAN) { }
|
||||
|
||||
struct instance_zulaman_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ struct boss_hazzarah : public BossAI
|
||||
case EVENT_CHAIN_BURN:
|
||||
if (me->GetPowerPct(POWER_MANA) > 5.f) // totally guessed
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; }))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA && u != me->GetVictim(); }))
|
||||
{
|
||||
DoCast(target, SPELL_CHAIN_BURN);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_VANISH, 38s, 45s);
|
||||
return;
|
||||
case EVENT_AMBUSH:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
|
||||
{
|
||||
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation());
|
||||
DoCast(target, SPELL_AMBUSH, true);
|
||||
|
||||
@@ -47,7 +47,7 @@ ObjectData const creatureData[] =
|
||||
class instance_zulgurub : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_zulgurub(): InstanceMapScript(ZGScriptName, 309) { }
|
||||
instance_zulgurub(): InstanceMapScript(ZGScriptName, MAP_ZUL_GURUB) { }
|
||||
|
||||
struct instance_zulgurub_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ struct boss_twilight_corrupter : public ScriptedAI
|
||||
_scheduler
|
||||
.Schedule(12s, 18s, [this](TaskContext context)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_CREATURE_OF_NIGHTMARE, 1, 100.f);
|
||||
DoCastRandomTarget(SPELL_CREATURE_OF_NIGHTMARE, 0, 100.f, true, false, false);
|
||||
context.Repeat(35s, 45s);
|
||||
})
|
||||
.Schedule(9s, 16s, [this](TaskContext context)
|
||||
|
||||
@@ -27,6 +27,7 @@ npc_the_scourge_cauldron
|
||||
npc_andorhal_tower
|
||||
EndContentData */
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -74,7 +75,7 @@ public:
|
||||
|
||||
switch (me->GetAreaId())
|
||||
{
|
||||
case 199: //felstone
|
||||
case AREA_FELSTONE_FIELD:
|
||||
if (player->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE ||
|
||||
player->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -82,7 +83,7 @@ public:
|
||||
DoDie();
|
||||
}
|
||||
break;
|
||||
case 200: //dalson
|
||||
case AREA_DALSONS_TEARS:
|
||||
if (player->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE ||
|
||||
player->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -90,7 +91,7 @@ public:
|
||||
DoDie();
|
||||
}
|
||||
break;
|
||||
case 201: //gahrron
|
||||
case AREA_GAHRRONS_WITHERING:
|
||||
if (player->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE ||
|
||||
player->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -98,7 +99,7 @@ public:
|
||||
DoDie();
|
||||
}
|
||||
break;
|
||||
case 202: //writhing
|
||||
case AREA_THE_WRITHING_HAUNT:
|
||||
if (player->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE ||
|
||||
player->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameEventMgr.h"
|
||||
@@ -154,8 +155,8 @@ struct npc_brewfest_bark_trigger : public ScriptedAI
|
||||
bool allow = false;
|
||||
uint32 quest = 0;
|
||||
Player* player = who->ToPlayer();
|
||||
// Kalimdor
|
||||
if (me->GetMapId() == 1)
|
||||
|
||||
if (me->GetMapId() == MAP_KALIMDOR)
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_BARK_FOR_DROHN) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -168,7 +169,7 @@ struct npc_brewfest_bark_trigger : public ScriptedAI
|
||||
quest = QUEST_BARK_FOR_VOODOO;
|
||||
}
|
||||
}
|
||||
else if (me->GetMapId() == 0)
|
||||
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_BARK_FOR_BARLEY) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -374,7 +375,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
}
|
||||
case EVENT_SPAWN_MOLE_MACHINE:
|
||||
{
|
||||
if (me->GetMapId() == 1) // Kalimdor
|
||||
if (me->GetMapId() == MAP_KALIMDOR)
|
||||
{
|
||||
float rand = 8 + rand_norm() * 12;
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
@@ -383,7 +384,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
if (Creature* cr = me->SummonCreature(NPC_MOLE_MACHINE_TRIGGER, x, y, 21.3f, 0.0f))
|
||||
cr->CastSpell(cr, SPELL_SPAWN_MOLE_MACHINE, true);
|
||||
}
|
||||
else if (me->GetMapId() == 0) // EK
|
||||
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
|
||||
{
|
||||
float rand = rand_norm() * 20;
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
@@ -457,7 +458,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
herald->Yell(amount, LANG_UNIVERSAL);
|
||||
}
|
||||
|
||||
me->CastSpell(me, (me->GetMapId() == 1 ? SPELL_SUMMON_PLANS_H : SPELL_SUMMON_PLANS_A), true);
|
||||
me->CastSpell(me, (me->GetMapId() == MAP_KALIMDOR ? SPELL_SUMMON_PLANS_H : SPELL_SUMMON_PLANS_A), true);
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -473,7 +474,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
}
|
||||
|
||||
Creature* cr;
|
||||
if (me->GetMapId() == 1) // Kalimdor
|
||||
if (me->GetMapId() == MAP_KALIMDOR)
|
||||
{
|
||||
if ((cr = me->SummonCreature(NPC_DROHN_KEG, 1183.69f, -4315.15f, 21.1875f, 0.750492f)))
|
||||
{
|
||||
@@ -494,7 +495,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
revelerGUIDs.push_back(cr->GetGUID());
|
||||
}
|
||||
}
|
||||
else if (me->GetMapId() == 0) // Eastern Kingdom
|
||||
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
|
||||
{
|
||||
if ((cr = me->SummonCreature(NPC_BARLEYBREW_KEG, -5187.23f, -599.779f, 397.176f, 0.017453f)))
|
||||
{
|
||||
@@ -544,10 +545,10 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
entry = (me->GetMapId() == 1 ? NPC_NORMAL_DROHN : NPC_NORMAL_THUNDERBREW);
|
||||
entry = (me->GetMapId() == MAP_KALIMDOR ? NPC_NORMAL_DROHN : NPC_NORMAL_THUNDERBREW);
|
||||
break;
|
||||
case 1:
|
||||
entry = (me->GetMapId() == 1 ? NPC_NORMAL_VOODOO : NPC_NORMAL_BARLEYBREW);
|
||||
entry = (me->GetMapId() == MAP_KALIMDOR ? NPC_NORMAL_VOODOO : NPC_NORMAL_BARLEYBREW);
|
||||
break;
|
||||
case 2:
|
||||
entry = NPC_NORMAL_GORDOK;
|
||||
@@ -649,13 +650,13 @@ struct npc_dark_iron_guzzler : public ScriptedAI
|
||||
uint32 entry[3] = {0, 0, 0};
|
||||
uint32 shuffled[3] = {0, 0, 0};
|
||||
|
||||
if (me->GetMapId() == 1) // Kalimdor
|
||||
if (me->GetMapId() == MAP_KALIMDOR)
|
||||
{
|
||||
entry[0] = NPC_DROHN_KEG;
|
||||
entry[1] = NPC_VOODOO_KEG;
|
||||
entry[2] = NPC_GORDOK_KEG;
|
||||
}
|
||||
else// if (me->GetMapId() == 0) // EK
|
||||
else// if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
|
||||
{
|
||||
entry[0] = NPC_THUNDERBREW_KEG;
|
||||
entry[1] = NPC_BARLEYBREW_KEG;
|
||||
@@ -1231,7 +1232,7 @@ class spell_brewfest_toss_mug : public SpellScript
|
||||
return;
|
||||
|
||||
std::vector<Creature*> bakers;
|
||||
if (caster->GetMapId() == 1) // Kalimdor
|
||||
if (caster->GetMapId() == MAP_KALIMDOR)
|
||||
{
|
||||
if (Creature* creature = caster->FindNearestCreature(NPC_NORMAL_VOODOO, 40.0f))
|
||||
{
|
||||
@@ -1248,7 +1249,7 @@ class spell_brewfest_toss_mug : public SpellScript
|
||||
bakers.push_back(creature);
|
||||
}
|
||||
}
|
||||
else // EK
|
||||
else // Eastern Kingdoms
|
||||
{
|
||||
if (Creature* creature = caster->FindNearestCreature(NPC_NORMAL_THUNDERBREW, 40.0f))
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "firework_show.h"
|
||||
#include "firework_show_BootyBay.h"
|
||||
#include "firework_show_Exodar.h"
|
||||
@@ -32,16 +33,16 @@
|
||||
|
||||
// <mapId, zoneId>, show
|
||||
std::map<std::pair<uint32, uint32>, FireworkShow const *> const FireworkShowStore = {
|
||||
{ { 0, 1 }, &fireworkShowIronforge },
|
||||
{ { 0, 33 }, &fireworkShowBootyBay },
|
||||
{ { 0, 1497 }, &fireworkShowUndercity },
|
||||
{ { 0, 1519 }, &fireworkShowStormwind },
|
||||
{ { 1, 141 }, &fireworkShowTeldrassil },
|
||||
{ { 1, 1637 }, &fireworkShowOrgrimmar },
|
||||
{ { 1, 1638 }, &fireworkShowThunderBluff },
|
||||
{ { 530, 3430 }, &fireworkShowSilvermoon },
|
||||
{ { 530, 3557 }, &fireworkShowExodar },
|
||||
{ { 530, 3703 }, &fireworkShowShattrath },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_DUN_MOROGH }, &fireworkShowIronforge },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE }, &fireworkShowBootyBay },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_UNDERCITY }, &fireworkShowUndercity },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_STORMWIND_CITY }, &fireworkShowStormwind },
|
||||
{ { MAP_KALIMDOR, AREA_TELDRASSIL }, &fireworkShowTeldrassil },
|
||||
{ { MAP_KALIMDOR, AREA_ORGRIMMAR }, &fireworkShowOrgrimmar },
|
||||
{ { MAP_KALIMDOR, AREA_THUNDER_BLUFF }, &fireworkShowThunderBluff },
|
||||
{ { MAP_OUTLAND, AREA_EVERSONG_WOODS }, &fireworkShowSilvermoon },
|
||||
{ { MAP_OUTLAND, AREA_THE_EXODAR }, &fireworkShowExodar },
|
||||
{ { MAP_OUTLAND, AREA_SHATTRATH_CITY }, &fireworkShowShattrath },
|
||||
};
|
||||
|
||||
struct go_firework_show : public GameObjectAI
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectAI.h"
|
||||
@@ -371,42 +372,42 @@ struct npc_costumed_orphan_matron : public ScriptedAI
|
||||
{
|
||||
switch (me->GetAreaId())
|
||||
{
|
||||
case 87: // Goldshire
|
||||
case AREA_GOLDSHIRE:
|
||||
x = -9494.4f;
|
||||
y = 48.53f;
|
||||
z = 70.5f;
|
||||
o = 0.5f;
|
||||
path = 235431;
|
||||
break;
|
||||
case 131: // Kharanos
|
||||
case AREA_KHARANOS:
|
||||
x = -5558.34f;
|
||||
y = -499.46f;
|
||||
z = 414.12f;
|
||||
o = 2.08f;
|
||||
path = 235432;
|
||||
break;
|
||||
case 3576: // Azure Watch
|
||||
case AREA_AZURE_WATCH:
|
||||
x = -4163.58f;
|
||||
y = -12460.30f;
|
||||
z = 63.02f;
|
||||
o = 4.31f;
|
||||
path = 235433;
|
||||
break;
|
||||
case 362: // Razor Hill
|
||||
case AREA_RAZOR_HILL:
|
||||
x = 373.2f;
|
||||
y = -4723.4f;
|
||||
z = 31.2f;
|
||||
o = 3.2f;
|
||||
path = 235434;
|
||||
break;
|
||||
case 159: // Brill
|
||||
case AREA_BRILL:
|
||||
x = 2195.2f;
|
||||
y = 264.0f;
|
||||
z = 55.62f;
|
||||
o = 0.15f;
|
||||
path = 235435;
|
||||
break;
|
||||
case 3665: // Falcon Wing Square
|
||||
case AREA_FALCONWING_SQUARE:
|
||||
x = 9547.91f;
|
||||
y = -6809.9f;
|
||||
z = 27.96f;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GameObjectScript.h"
|
||||
@@ -59,91 +60,87 @@ static bool BonfireStampedOutState[COUNT_GO_BONFIRE_ALLIANCE + COUNT_GO_BONFIRE_
|
||||
|
||||
// <mapId, zoneId, teamId>, <state>
|
||||
const std::map<std::tuple<uint32, uint32, TeamId>, bool*> BonfireStateStore = {
|
||||
// Map 0
|
||||
{ { 0, 1, TEAM_ALLIANCE }, &BonfireStampedOutState[0] },
|
||||
{ { 0, 3, TEAM_HORDE }, &BonfireStampedOutState[1] },
|
||||
{ { 0, 4, TEAM_ALLIANCE }, &BonfireStampedOutState[2] },
|
||||
{ { 0, 8, TEAM_HORDE }, &BonfireStampedOutState[3] },
|
||||
{ { 0, 10, TEAM_ALLIANCE }, &BonfireStampedOutState[4] },
|
||||
{ { 0, 11, TEAM_ALLIANCE }, &BonfireStampedOutState[5] },
|
||||
{ { 0, 12, TEAM_ALLIANCE }, &BonfireStampedOutState[6] },
|
||||
{ { 0, 28, TEAM_ALLIANCE }, &BonfireStampedOutState[7] },
|
||||
{ { 0, 33, TEAM_ALLIANCE }, &BonfireStampedOutState[8] },
|
||||
{ { 0, 33, TEAM_HORDE }, &BonfireStampedOutState[9] },
|
||||
{ { 0, 38, TEAM_ALLIANCE }, &BonfireStampedOutState[10] },
|
||||
{ { 0, 40, TEAM_ALLIANCE }, &BonfireStampedOutState[11] },
|
||||
{ { 0, 44, TEAM_ALLIANCE }, &BonfireStampedOutState[12] },
|
||||
{ { 0, 45, TEAM_ALLIANCE }, &BonfireStampedOutState[13] },
|
||||
{ { 0, 45, TEAM_HORDE }, &BonfireStampedOutState[14] },
|
||||
{ { 0, 46, TEAM_ALLIANCE }, &BonfireStampedOutState[15] },
|
||||
{ { 0, 46, TEAM_HORDE }, &BonfireStampedOutState[16] },
|
||||
{ { 0, 47, TEAM_ALLIANCE }, &BonfireStampedOutState[17] },
|
||||
{ { 0, 47, TEAM_HORDE }, &BonfireStampedOutState[18] },
|
||||
{ { 0, 85, TEAM_HORDE }, &BonfireStampedOutState[19] },
|
||||
{ { 0, 130, TEAM_HORDE }, &BonfireStampedOutState[20] },
|
||||
{ { 0, 267, TEAM_ALLIANCE }, &BonfireStampedOutState[21] },
|
||||
{ { 0, 267, TEAM_HORDE }, &BonfireStampedOutState[22] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_DUN_MOROGH, TEAM_ALLIANCE }, &BonfireStampedOutState[0] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_BADLANDS, TEAM_HORDE }, &BonfireStampedOutState[1] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_BLASTED_LANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[2] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_SWAMP_OF_SORROWS, TEAM_HORDE }, &BonfireStampedOutState[3] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_DUSKWOOD, TEAM_ALLIANCE }, &BonfireStampedOutState[4] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_WETLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[5] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_ELWYNN_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[6] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_WESTERN_PLAGUELANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[7] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE, TEAM_ALLIANCE }, &BonfireStampedOutState[8] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE, TEAM_HORDE }, &BonfireStampedOutState[9] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_LOCH_MODAN, TEAM_ALLIANCE }, &BonfireStampedOutState[10] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_WESTFALL, TEAM_ALLIANCE }, &BonfireStampedOutState[11] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_REDRIDGE_MOUNTAINS, TEAM_ALLIANCE }, &BonfireStampedOutState[12] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_ARATHI_HIGHLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[13] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_ARATHI_HIGHLANDS, TEAM_HORDE }, &BonfireStampedOutState[14] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_BURNING_STEPPES, TEAM_ALLIANCE }, &BonfireStampedOutState[15] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_BURNING_STEPPES, TEAM_HORDE }, &BonfireStampedOutState[16] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_THE_HINTERLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[17] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_THE_HINTERLANDS, TEAM_HORDE }, &BonfireStampedOutState[18] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_TIRISFAL_GLADES, TEAM_HORDE }, &BonfireStampedOutState[19] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_SILVERPINE_FOREST, TEAM_HORDE }, &BonfireStampedOutState[20] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_HILLSBRAD_FOOTHILLS, TEAM_ALLIANCE }, &BonfireStampedOutState[21] },
|
||||
{ { MAP_EASTERN_KINGDOMS, AREA_HILLSBRAD_FOOTHILLS, TEAM_HORDE }, &BonfireStampedOutState[22] },
|
||||
|
||||
// Map 1
|
||||
{ { 1, 14, TEAM_HORDE }, &BonfireStampedOutState[23] },
|
||||
{ { 1, 15, TEAM_ALLIANCE }, &BonfireStampedOutState[24] },
|
||||
{ { 1, 15, TEAM_HORDE }, &BonfireStampedOutState[25] },
|
||||
{ { 1, 17, TEAM_HORDE }, &BonfireStampedOutState[26] },
|
||||
{ { 1, 141, TEAM_ALLIANCE }, &BonfireStampedOutState[27] },
|
||||
{ { 1, 148, TEAM_ALLIANCE }, &BonfireStampedOutState[28] },
|
||||
{ { 1, 215, TEAM_HORDE }, &BonfireStampedOutState[29] },
|
||||
{ { 1, 331, TEAM_ALLIANCE }, &BonfireStampedOutState[30] },
|
||||
{ { 1, 331, TEAM_HORDE }, &BonfireStampedOutState[31] },
|
||||
{ { 1, 357, TEAM_ALLIANCE }, &BonfireStampedOutState[32] },
|
||||
{ { 1, 357, TEAM_HORDE }, &BonfireStampedOutState[33] },
|
||||
{ { 1, 400, TEAM_HORDE }, &BonfireStampedOutState[34] },
|
||||
{ { 1, 405, TEAM_ALLIANCE }, &BonfireStampedOutState[35] },
|
||||
{ { 1, 405, TEAM_HORDE }, &BonfireStampedOutState[36] },
|
||||
{ { 1, 406, TEAM_HORDE }, &BonfireStampedOutState[37] },
|
||||
{ { 1, 440, TEAM_ALLIANCE }, &BonfireStampedOutState[38] },
|
||||
{ { 1, 440, TEAM_HORDE }, &BonfireStampedOutState[39] },
|
||||
{ { 1, 618, TEAM_ALLIANCE }, &BonfireStampedOutState[40] },
|
||||
{ { 1, 618, TEAM_HORDE }, &BonfireStampedOutState[41] },
|
||||
{ { 1, 1377, TEAM_ALLIANCE }, &BonfireStampedOutState[42] },
|
||||
{ { 1, 1377, TEAM_HORDE }, &BonfireStampedOutState[43] },
|
||||
{ { MAP_KALIMDOR, AREA_DUROTAR, TEAM_HORDE }, &BonfireStampedOutState[23] },
|
||||
{ { MAP_KALIMDOR, AREA_DUSTWALLOW_MARSH, TEAM_ALLIANCE }, &BonfireStampedOutState[24] },
|
||||
{ { MAP_KALIMDOR, AREA_DUSTWALLOW_MARSH, TEAM_HORDE }, &BonfireStampedOutState[25] },
|
||||
{ { MAP_KALIMDOR, AREA_THE_BARRENS, TEAM_HORDE }, &BonfireStampedOutState[26] },
|
||||
{ { MAP_KALIMDOR, AREA_TELDRASSIL, TEAM_ALLIANCE }, &BonfireStampedOutState[27] },
|
||||
{ { MAP_KALIMDOR, AREA_DARKSHORE, TEAM_ALLIANCE }, &BonfireStampedOutState[28] },
|
||||
{ { MAP_KALIMDOR, AREA_MULGORE, TEAM_HORDE }, &BonfireStampedOutState[29] },
|
||||
{ { MAP_KALIMDOR, AREA_ASHENVALE, TEAM_ALLIANCE }, &BonfireStampedOutState[30] },
|
||||
{ { MAP_KALIMDOR, AREA_ASHENVALE, TEAM_HORDE }, &BonfireStampedOutState[31] },
|
||||
{ { MAP_KALIMDOR, AREA_FERALAS, TEAM_ALLIANCE }, &BonfireStampedOutState[32] },
|
||||
{ { MAP_KALIMDOR, AREA_FERALAS, TEAM_HORDE }, &BonfireStampedOutState[33] },
|
||||
{ { MAP_KALIMDOR, AREA_THOUSAND_NEEDLES, TEAM_HORDE }, &BonfireStampedOutState[34] },
|
||||
{ { MAP_KALIMDOR, AREA_DESOLACE, TEAM_ALLIANCE }, &BonfireStampedOutState[35] },
|
||||
{ { MAP_KALIMDOR, AREA_DESOLACE, TEAM_HORDE }, &BonfireStampedOutState[36] },
|
||||
{ { MAP_KALIMDOR, AREA_STONETALON_MOUNTAINS, TEAM_HORDE }, &BonfireStampedOutState[37] },
|
||||
{ { MAP_KALIMDOR, AREA_TANARIS, TEAM_ALLIANCE }, &BonfireStampedOutState[38] },
|
||||
{ { MAP_KALIMDOR, AREA_TANARIS, TEAM_HORDE }, &BonfireStampedOutState[39] },
|
||||
{ { MAP_KALIMDOR, AREA_WINTERSPRING, TEAM_ALLIANCE }, &BonfireStampedOutState[40] },
|
||||
{ { MAP_KALIMDOR, AREA_WINTERSPRING, TEAM_HORDE }, &BonfireStampedOutState[41] },
|
||||
{ { MAP_KALIMDOR, AREA_SILITHUS, TEAM_ALLIANCE }, &BonfireStampedOutState[42] },
|
||||
{ { MAP_KALIMDOR, AREA_SILITHUS, TEAM_HORDE }, &BonfireStampedOutState[43] },
|
||||
|
||||
// Map 530
|
||||
{ { 530, 3430, TEAM_HORDE }, &BonfireStampedOutState[44] },
|
||||
{ { 530, 3433, TEAM_HORDE }, &BonfireStampedOutState[45] },
|
||||
{ { 530, 3483, TEAM_ALLIANCE }, &BonfireStampedOutState[46] },
|
||||
{ { 530, 3483, TEAM_HORDE }, &BonfireStampedOutState[47] },
|
||||
{ { 530, 3518, TEAM_ALLIANCE }, &BonfireStampedOutState[48] },
|
||||
{ { 530, 3518, TEAM_HORDE }, &BonfireStampedOutState[49] },
|
||||
{ { 530, 3519, TEAM_ALLIANCE }, &BonfireStampedOutState[50] },
|
||||
{ { 530, 3519, TEAM_HORDE }, &BonfireStampedOutState[51] },
|
||||
{ { 530, 3520, TEAM_ALLIANCE }, &BonfireStampedOutState[52] },
|
||||
{ { 530, 3520, TEAM_HORDE }, &BonfireStampedOutState[53] },
|
||||
{ { 530, 3521, TEAM_ALLIANCE }, &BonfireStampedOutState[54] },
|
||||
{ { 530, 3521, TEAM_HORDE }, &BonfireStampedOutState[55] },
|
||||
{ { 530, 3522, TEAM_ALLIANCE }, &BonfireStampedOutState[56] },
|
||||
{ { 530, 3522, TEAM_HORDE }, &BonfireStampedOutState[57] },
|
||||
{ { 530, 3523, TEAM_ALLIANCE }, &BonfireStampedOutState[58] },
|
||||
{ { 530, 3523, TEAM_HORDE }, &BonfireStampedOutState[59] },
|
||||
{ { 530, 3524, TEAM_ALLIANCE }, &BonfireStampedOutState[60] },
|
||||
{ { 530, 3525, TEAM_ALLIANCE }, &BonfireStampedOutState[61] },
|
||||
{ { MAP_OUTLAND, AREA_EVERSONG_WOODS, TEAM_HORDE }, &BonfireStampedOutState[44] },
|
||||
{ { MAP_OUTLAND, AREA_GHOSTLANDS, TEAM_HORDE }, &BonfireStampedOutState[45] },
|
||||
{ { MAP_OUTLAND, AREA_HELLFIRE_PENINSULA, TEAM_ALLIANCE }, &BonfireStampedOutState[46] },
|
||||
{ { MAP_OUTLAND, AREA_HELLFIRE_PENINSULA, TEAM_HORDE }, &BonfireStampedOutState[47] },
|
||||
{ { MAP_OUTLAND, AREA_NAGRAND, TEAM_ALLIANCE }, &BonfireStampedOutState[48] },
|
||||
{ { MAP_OUTLAND, AREA_NAGRAND, TEAM_HORDE }, &BonfireStampedOutState[49] },
|
||||
{ { MAP_OUTLAND, AREA_TEROKKAR_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[50] },
|
||||
{ { MAP_OUTLAND, AREA_TEROKKAR_FOREST, TEAM_HORDE }, &BonfireStampedOutState[51] },
|
||||
{ { MAP_OUTLAND, AREA_SHADOWMOON_VALLEY, TEAM_ALLIANCE }, &BonfireStampedOutState[52] },
|
||||
{ { MAP_OUTLAND, AREA_SHADOWMOON_VALLEY, TEAM_HORDE }, &BonfireStampedOutState[53] },
|
||||
{ { MAP_OUTLAND, AREA_ZANGARMARSH, TEAM_ALLIANCE }, &BonfireStampedOutState[54] },
|
||||
{ { MAP_OUTLAND, AREA_ZANGARMARSH, TEAM_HORDE }, &BonfireStampedOutState[55] },
|
||||
{ { MAP_OUTLAND, AREA_BLADES_EDGE_MOUNTAINS, TEAM_ALLIANCE }, &BonfireStampedOutState[56] },
|
||||
{ { MAP_OUTLAND, AREA_BLADES_EDGE_MOUNTAINS, TEAM_HORDE }, &BonfireStampedOutState[57] },
|
||||
{ { MAP_OUTLAND, AREA_NETHERSTORM, TEAM_ALLIANCE }, &BonfireStampedOutState[58] },
|
||||
{ { MAP_OUTLAND, AREA_NETHERSTORM, TEAM_HORDE }, &BonfireStampedOutState[59] },
|
||||
{ { MAP_OUTLAND, AREA_AZUREMYST_ISLE, TEAM_ALLIANCE }, &BonfireStampedOutState[60] },
|
||||
{ { MAP_OUTLAND, AREA_BLOODMYST_ISLE, TEAM_ALLIANCE }, &BonfireStampedOutState[61] },
|
||||
|
||||
// Map 571
|
||||
{ { 571, 65, TEAM_ALLIANCE }, &BonfireStampedOutState[62] },
|
||||
{ { 571, 65, TEAM_HORDE }, &BonfireStampedOutState[63] },
|
||||
{ { 571, 66, TEAM_ALLIANCE }, &BonfireStampedOutState[64] },
|
||||
{ { 571, 66, TEAM_HORDE }, &BonfireStampedOutState[65] },
|
||||
{ { 571, 67, TEAM_ALLIANCE }, &BonfireStampedOutState[66] },
|
||||
{ { 571, 67, TEAM_HORDE }, &BonfireStampedOutState[67] },
|
||||
{ { 571, 394, TEAM_ALLIANCE }, &BonfireStampedOutState[68] },
|
||||
{ { 571, 394, TEAM_HORDE }, &BonfireStampedOutState[69] },
|
||||
{ { 571, 495, TEAM_ALLIANCE }, &BonfireStampedOutState[70] },
|
||||
{ { 571, 495, TEAM_HORDE }, &BonfireStampedOutState[71] },
|
||||
{ { 571, 2817, TEAM_ALLIANCE }, &BonfireStampedOutState[72] },
|
||||
{ { 571, 2817, TEAM_HORDE }, &BonfireStampedOutState[73] },
|
||||
{ { 571, 3537, TEAM_ALLIANCE }, &BonfireStampedOutState[74] },
|
||||
{ { 571, 3537, TEAM_HORDE }, &BonfireStampedOutState[75] },
|
||||
{ { 571, 3711, TEAM_ALLIANCE }, &BonfireStampedOutState[76] },
|
||||
{ { 571, 3711, TEAM_HORDE }, &BonfireStampedOutState[77] },
|
||||
{ { MAP_NORTHREND, AREA_DRAGONBLIGHT, TEAM_ALLIANCE }, &BonfireStampedOutState[62] },
|
||||
{ { MAP_NORTHREND, AREA_DRAGONBLIGHT, TEAM_HORDE }, &BonfireStampedOutState[63] },
|
||||
{ { MAP_NORTHREND, AREA_ZUL_DRAK, TEAM_ALLIANCE }, &BonfireStampedOutState[64] },
|
||||
{ { MAP_NORTHREND, AREA_ZUL_DRAK, TEAM_HORDE }, &BonfireStampedOutState[65] },
|
||||
{ { MAP_NORTHREND, AREA_THE_STORM_PEAKS, TEAM_ALLIANCE }, &BonfireStampedOutState[66] },
|
||||
{ { MAP_NORTHREND, AREA_THE_STORM_PEAKS, TEAM_HORDE }, &BonfireStampedOutState[67] },
|
||||
{ { MAP_NORTHREND, AREA_GRIZZLY_HILLS, TEAM_ALLIANCE }, &BonfireStampedOutState[68] },
|
||||
{ { MAP_NORTHREND, AREA_GRIZZLY_HILLS, TEAM_HORDE }, &BonfireStampedOutState[69] },
|
||||
{ { MAP_NORTHREND, AREA_HOWLING_FJORD, TEAM_ALLIANCE }, &BonfireStampedOutState[70] },
|
||||
{ { MAP_NORTHREND, AREA_HOWLING_FJORD, TEAM_HORDE }, &BonfireStampedOutState[71] },
|
||||
{ { MAP_NORTHREND, AREA_CRYSTALSONG_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[72] },
|
||||
{ { MAP_NORTHREND, AREA_CRYSTALSONG_FOREST, TEAM_HORDE }, &BonfireStampedOutState[73] },
|
||||
{ { MAP_NORTHREND, AREA_BOREAN_TUNDRA, TEAM_ALLIANCE }, &BonfireStampedOutState[74] },
|
||||
{ { MAP_NORTHREND, AREA_BOREAN_TUNDRA, TEAM_HORDE }, &BonfireStampedOutState[75] },
|
||||
{ { MAP_NORTHREND, AREA_SHOLAZAR_BASIN, TEAM_ALLIANCE }, &BonfireStampedOutState[76] },
|
||||
{ { MAP_NORTHREND, AREA_SHOLAZAR_BASIN, TEAM_HORDE }, &BonfireStampedOutState[77] },
|
||||
};
|
||||
|
||||
uint32 const GoBonfireAlliance[COUNT_GO_BONFIRE_ALLIANCE] = { 187564, 187914, 187916, 187917, 187919, 187920, 187921, 187922, 187923, 187924, 187925, 187926, 187927, 187928, 187929, 187930, 187931, 187932, 187933, 187934, 187935, 187936, 187937, 187938, 187939, 187940, 187941, 187942, 187943, 187944, 187945, 187946, 194032, 194035, 194036, 194038, 194040, 194044, 194045, 194049 };
|
||||
@@ -1254,22 +1251,22 @@ class spell_midsummer_summon_ahune_lieutenant : public SpellScript
|
||||
|
||||
switch (zoneId)
|
||||
{
|
||||
case 331: // Ashenvale
|
||||
case AREA_ASHENVALE:
|
||||
npcEntry = 26116; // Frostwave Lieutenant
|
||||
break;
|
||||
case 405: // Desolace
|
||||
case AREA_DESOLACE:
|
||||
npcEntry = 26178; // Hailstone Lieutenant
|
||||
break;
|
||||
case 33: // Stranglethorn Vale
|
||||
case AREA_STRANGLETHORN_VALE:
|
||||
npcEntry = 26204; // Chillwind Lieutenant
|
||||
break;
|
||||
case 51: // Searing Gorge
|
||||
case AREA_SEARING_GORGE:
|
||||
npcEntry = 26214; // Frigid Lieutenant
|
||||
break;
|
||||
case 1377: // Silithus
|
||||
case AREA_SILITHUS:
|
||||
npcEntry = 26215; // Glacial Lieutenant
|
||||
break;
|
||||
case 3483: // Hellfire Peninsula
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
npcEntry = 26216; // Glacial Templar
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
class instance_blackfathom_deeps : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", 48) { }
|
||||
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", MAP_BLACKFATHOM_DEEPS) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
}).Schedule(25s, 32s, [this](TaskContext context)
|
||||
{
|
||||
Talk(SAY_SLEEP);
|
||||
DoCastRandomTarget(SPELL_SLEEP, 1, 0.0f, true, false, false);
|
||||
DoCastRandomTarget(SPELL_SLEEP, 0, 0.0f, true, false, false);
|
||||
context.Repeat(35s, 48s);
|
||||
}).Schedule(30s, 48s, [this](TaskContext context)
|
||||
{
|
||||
|
||||
@@ -139,8 +139,6 @@ enum HyjalMisc
|
||||
|
||||
CONTEXT_GROUP_WAVES = 1,
|
||||
|
||||
AREA_NORDRASSIL = 3710,
|
||||
|
||||
SPELL_ETERNAL_SILENCE = 42201,
|
||||
|
||||
GUID_GAIN_SOUL_CHARGE_PLAYER = 1
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "Chat.h"
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -72,7 +73,7 @@ Milliseconds hyjalNightElfWaveTimers[1][MAX_WAVES_NIGHT_ELF]
|
||||
class instance_hyjal : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_hyjal() : InstanceMapScript("instance_hyjal", 534) { }
|
||||
instance_hyjal() : InstanceMapScript("instance_hyjal", MAP_THE_BATTLE_FOR_MOUNT_HYJAL) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
+7
-3
@@ -955,7 +955,7 @@ public:
|
||||
eventInRun = false;
|
||||
ScheduleNextEvent(currentEvent, 0);
|
||||
break;
|
||||
//After waypoint 23
|
||||
// After waypoint 23
|
||||
case EVENT_ACTION_PHASE3+3:
|
||||
SetRun(true);
|
||||
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
|
||||
@@ -971,10 +971,12 @@ public:
|
||||
cr->AI()->Talk(SAY_PHASE305);
|
||||
ScheduleNextEvent(currentEvent, 1000);
|
||||
break;
|
||||
// Trio citizen transformation right as we enter Town Hall
|
||||
case EVENT_ACTION_PHASE3+6:
|
||||
if (Creature* cr = GetEventNpc(NPC_CITY_MAN))
|
||||
{
|
||||
cr->UpdateEntry(NPC_INFINITE_HUNTER, nullptr, false);
|
||||
cr->SetFullHealth();
|
||||
cr->SetImmuneToAll(true);
|
||||
cr->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -984,6 +986,7 @@ public:
|
||||
if (Creature* cr = GetEventNpc(NPC_CITY_MAN4))
|
||||
{
|
||||
cr->UpdateEntry(NPC_INFINITE_AGENT, nullptr, false);
|
||||
cr->SetFullHealth();
|
||||
cr->SetImmuneToAll(true);
|
||||
cr->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -993,18 +996,19 @@ public:
|
||||
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
|
||||
{
|
||||
cr->UpdateEntry(NPC_INFINITE_ADVERSARY, nullptr, false);
|
||||
cr->SetFullHealth();
|
||||
cr->SetReactState(REACT_AGGRESSIVE);
|
||||
cr->SetInCombatWithZone();
|
||||
cr->AddThreat(me, 0.0f);
|
||||
}
|
||||
if (Creature* cr = GetEventNpc(NPC_INFINITE_AGENT)) // it is infinite agent now :)
|
||||
if (Creature* cr = GetEventNpc(NPC_INFINITE_AGENT))
|
||||
{
|
||||
cr->SetImmuneToAll(false);
|
||||
cr->SetReactState(REACT_AGGRESSIVE);
|
||||
cr->SetInCombatWithZone();
|
||||
cr->AddThreat(me, 0.0f);
|
||||
}
|
||||
if (Creature* cr = GetEventNpc(NPC_INFINITE_HUNTER)) // it is infinite hunter now :)
|
||||
if (Creature* cr = GetEventNpc(NPC_INFINITE_HUNTER))
|
||||
{
|
||||
cr->SetImmuneToAll(false);
|
||||
cr->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
class instance_culling_of_stratholme : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", 595) { }
|
||||
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", MAP_THE_CULLING_OF_STRATHOLME) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
|
||||
{
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ struct boss_lieutenant_drake : public BossAI
|
||||
context.Repeat(25s);
|
||||
}).Schedule(1s, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 40.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, false, false))
|
||||
{
|
||||
DoCast(target, SPELL_EXPLODING_SHOT);
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ const Position thrallPositions[THRALL_POSITIONS_COUNT] =
|
||||
class instance_old_hillsbrad : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", 560) { }
|
||||
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", MAP_THE_ESCAPE_FROM_DURNHOLDE) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ ObjectData const creatureData[] =
|
||||
class instance_the_black_morass : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", 269) { }
|
||||
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", MAP_OPENING_OF_THE_DARK_PORTAL) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
class instance_dire_maul : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_dire_maul() : InstanceMapScript(DMScriptName, 429) { }
|
||||
instance_dire_maul() : InstanceMapScript(DMScriptName, MAP_DIRE_MAUL) { }
|
||||
|
||||
struct instance_dire_maul_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
class instance_maraudon : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_maraudon() : InstanceMapScript("instance_maraudon", 349) { }
|
||||
instance_maraudon() : InstanceMapScript("instance_maraudon", MAP_MARAUDON) { }
|
||||
|
||||
struct instance_maraudon_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ ObjectData const creatureData[] =
|
||||
class instance_onyxias_lair : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", 249) { }
|
||||
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", MAP_ONYXIAS_LAIR) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
class instance_ragefire_chasm : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", 389) { }
|
||||
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", MAP_RAGEFIRE_CHASM) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
class instance_razorfen_downs : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", 129) { }
|
||||
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", MAP_RAZORFEN_DOWNS) { }
|
||||
|
||||
struct instance_razorfen_downs_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
class instance_razorfen_kraul : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", 47) { }
|
||||
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", MAP_RAZORFEN_KRAUL) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ struct boss_kurinnaxx : public BossAI
|
||||
context.Repeat(8s, 10s);
|
||||
}).Schedule(5s, 15s, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.f, true, false))
|
||||
{
|
||||
target->CastSpell(target, SPELL_SAND_TRAP, true, nullptr, nullptr, me->GetGUID());
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ std::array<uint32, 8> RajaxxWavesData[] =
|
||||
class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) { }
|
||||
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", MAP_RUINS_OF_AHN_QIRAJ) { }
|
||||
|
||||
struct instance_ruins_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user