Core/Misc: fixed warnings and building connection patcher with boost versions below 1.61
This commit is contained in:
1 parent
abd3d58d57
commit
15f09fb82b
104 files changed
+297
-471
No files matched your search
@@ -1413,12 +1413,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
bool repeat = e.action.wpStart.repeat != 0;
|
||||
|
||||
// ensure that SMART_ESCORT_TARGETS contains at least one player reference
|
||||
bool stored = false;
|
||||
for (WorldObject* target : targets)
|
||||
{
|
||||
if (IsPlayer(target))
|
||||
{
|
||||
stored = true;
|
||||
StoreTargetList(targets, SMART_ESCORT_TARGETS);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ class BattlegroundBFG : public Battleground
|
||||
/* Scorekeeping */
|
||||
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
|
||||
/* Nodes occupying */
|
||||
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
@@ -318,7 +318,6 @@ class BattlegroundBFG : public Battleground
|
||||
uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
|
||||
bool m_IsInformedNearVictory;
|
||||
uint32 m_HonorTics;
|
||||
uint32 m_ReputationTics;
|
||||
// need for achievements
|
||||
bool m_TeamScores500Disadvantage[BG_TEAMS_COUNT];
|
||||
};
|
||||
|
||||
@@ -492,7 +492,7 @@ WorldSafeLocsEntry const* BattlegroundTP::GetClosestGraveyard(Player* player)
|
||||
|
||||
if (isRated())
|
||||
{
|
||||
if (player->GetAreaId() == 5680 && team == TEAM_HORDE || player->GetAreaId() == 5681 && team == TEAM_ALLIANCE)
|
||||
if ((player->GetAreaId() == 5680 && team == TEAM_HORDE) || (player->GetAreaId() == 5681 && team == TEAM_ALLIANCE))
|
||||
return sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_START_ALLIANCE + team]);
|
||||
else
|
||||
return sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_MIDDLE_ALLIANCE + team]);
|
||||
|
||||
@@ -403,14 +403,11 @@ void LFGMgr::Update(uint32 diff)
|
||||
uint32 tankCount = 0;
|
||||
uint32 healerCount = 0;
|
||||
|
||||
for (uint32 dungeonId : GetDungeonsByRandom(dungeon->ID))
|
||||
for (auto it : rolesPerDungeonId)
|
||||
{
|
||||
for (auto it : rolesPerDungeonId)
|
||||
{
|
||||
dpsCount += it.second.currentDps;
|
||||
healerCount += it.second.currentHealers;
|
||||
tankCount += it.second.currentTanks;
|
||||
}
|
||||
dpsCount += it.second.currentDps;
|
||||
healerCount += it.second.currentHealers;
|
||||
tankCount += it.second.currentTanks;
|
||||
}
|
||||
|
||||
uint32 dpsCountAbsolute = dpsCount ? std::floor(dpsCount / 3) : 0;
|
||||
@@ -1603,14 +1600,11 @@ void LFGMgr::FinishDungeon(ObjectGuid gguid, const uint32 dungeonId, Map const*
|
||||
player->RewardQuest(quest, 0, nullptr, false);
|
||||
}
|
||||
|
||||
uint8 tmpRole = 0;
|
||||
if (Group *group = player->GetGroup())
|
||||
tmpRole = group->GetLfgRoles(player->GetGUID());
|
||||
|
||||
Quest const* shortageQuest = nullptr;
|
||||
if (IsEnligibleForShortageRewards(guid))
|
||||
{
|
||||
if (shortageQuest = sObjectMgr->GetQuestTemplate(reward->shortageQuest))
|
||||
shortageQuest = sObjectMgr->GetQuestTemplate(reward->shortageQuest);
|
||||
if (shortageQuest)
|
||||
{
|
||||
player->RewardQuest(shortageQuest, 0, nullptr, false);
|
||||
SetEnligibleForShortageRewards(guid, false);
|
||||
|
||||
@@ -389,7 +389,7 @@ void Creature::RemoveCorpse(bool setSpawnTime)
|
||||
uint32 respawnDelay = m_respawnDelay;
|
||||
m_respawnTime = std::max<time_t>(time(nullptr) + respawnDelay, m_respawnTime);
|
||||
|
||||
SaveRespawnTime(0, false);
|
||||
SaveRespawnTime();
|
||||
}
|
||||
|
||||
if (TempSummon* summon = ToTempSummon())
|
||||
@@ -1850,11 +1850,7 @@ void Creature::setDeathState(DeathState s)
|
||||
m_respawnTime = time(nullptr) + respawnDelay;
|
||||
}
|
||||
|
||||
// always save boss respawn time at death to prevent crash cheating
|
||||
if (sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY) || isWorldBoss())
|
||||
SaveRespawnTime();
|
||||
else if (!m_respawnCompatibilityMode)
|
||||
SaveRespawnTime(0, false);
|
||||
SaveRespawnTime();
|
||||
|
||||
ReleaseSpellFocus(nullptr, false); // remove spellcast focus
|
||||
DoNotReacquireSpellFocusTarget(); // cancel delayed re-target
|
||||
@@ -2384,7 +2380,7 @@ bool Creature::_IsTargetAcceptable(Unit const* target) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void Creature::SaveRespawnTime(uint32 forceDelay, bool savetodb)
|
||||
void Creature::SaveRespawnTime(uint32 forceDelay)
|
||||
{
|
||||
if (IsSummon() || !m_spawnId || (m_creatureData && !m_creatureData->dbData))
|
||||
return;
|
||||
@@ -2915,7 +2911,7 @@ void Creature::UpdateMovementFlags()
|
||||
{
|
||||
SetCanFly(false);
|
||||
SetDisableGravity(false);
|
||||
if (IsAlive() && CanHover() || HasAuraType(SPELL_AURA_HOVER))
|
||||
if ((IsAlive() && CanHover()) || HasAuraType(SPELL_AURA_HOVER))
|
||||
SetHover(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
|
||||
time_t GetRespawnTimeEx() const;
|
||||
void SetRespawnTime(uint32 respawn);
|
||||
void Respawn(bool force = false);
|
||||
void SaveRespawnTime(uint32 forceDelay = 0, bool savetodb = true) override;
|
||||
void SaveRespawnTime(uint32 forceDelay = 0);
|
||||
|
||||
uint32 GetRespawnDelay() const { return m_respawnDelay; }
|
||||
void SetRespawnDelay(uint32 delay) { m_respawnDelay = delay; }
|
||||
|
||||
@@ -442,7 +442,7 @@ void GameObject::Update(uint32 diff)
|
||||
SetRespawnTime(WEEK);
|
||||
else
|
||||
m_respawnTime = (now > linkedRespawntime ? now : linkedRespawntime) + urand(5, MINUTE); // else copy time from master and add a little
|
||||
SaveRespawnTime(); // also save to DB immediately
|
||||
SaveRespawnTime();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ void GameObject::Update(uint32 diff)
|
||||
|
||||
// Set respawn timer
|
||||
if (!m_respawnCompatibilityMode && m_respawnTime > 0)
|
||||
SaveRespawnTime(0, false);
|
||||
SaveRespawnTime();
|
||||
|
||||
if (isSpawned())
|
||||
{
|
||||
@@ -718,22 +718,12 @@ void GameObject::Update(uint32 diff)
|
||||
|
||||
// if option not set then object will be saved at grid unload
|
||||
// Otherwise just save respawn time to map object memory
|
||||
if (sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
SaveRespawnTime();
|
||||
SaveRespawnTime();
|
||||
|
||||
if (!m_respawnCompatibilityMode)
|
||||
{
|
||||
// Respawn time was just saved if set to save to DB
|
||||
// If not, we save only to map memory
|
||||
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
SaveRespawnTime(0, false);
|
||||
|
||||
// Then despawn
|
||||
if (m_respawnCompatibilityMode)
|
||||
DestroyForNearbyPlayers();
|
||||
else
|
||||
AddObjectToRemoveList();
|
||||
return;
|
||||
}
|
||||
|
||||
DestroyForNearbyPlayers(); // old UpdateObjectVisibility()
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1088,7 +1078,7 @@ Unit* GameObject::GetOwner() const
|
||||
return ObjectAccessor::GetUnit(*this, GetOwnerGUID());
|
||||
}
|
||||
|
||||
void GameObject::SaveRespawnTime(uint32 forceDelay, bool savetodb)
|
||||
void GameObject::SaveRespawnTime(uint32 forceDelay)
|
||||
{
|
||||
if (m_goData && (forceDelay || m_respawnTime > GameTime::GetGameTime()) && m_spawnedByDefault)
|
||||
{
|
||||
@@ -2642,7 +2632,7 @@ bool GameObject::IsAtInteractDistance(Player const* player, SpellInfo const* spe
|
||||
if (GetGoType() == GAMEOBJECT_TYPE_SPELL_FOCUS)
|
||||
return maxRange * maxRange >= GetExactDistSq(player);
|
||||
|
||||
if (GameObjectDisplayInfoEntry const* displayInfo = sGameObjectDisplayInfoStore.LookupEntry(GetGOInfo()->displayId))
|
||||
if (sGameObjectDisplayInfoStore.LookupEntry(GetGOInfo()->displayId))
|
||||
return IsAtInteractDistance(*player, maxRange);
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>
|
||||
uint32 GetUseCount() const { return m_usetimes; }
|
||||
uint32 GetUniqueUseCount() const { return m_unique_users.size(); }
|
||||
|
||||
void SaveRespawnTime(uint32 forceDelay = 0, bool savetodb = true) override;
|
||||
void SaveRespawnTime(uint32 forceDelay = 0);
|
||||
|
||||
Loot loot;
|
||||
|
||||
|
||||
@@ -371,7 +371,6 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
void PlayDirectSound(uint32 sound_id, Player* target = nullptr);
|
||||
void PlayDirectMusic(uint32 music_id, Player* target = nullptr);
|
||||
|
||||
virtual void SaveRespawnTime(uint32 /*forceDelay*/ = 0, bool /*saveToDB*/ = true) { }
|
||||
void AddObjectToRemoveList();
|
||||
|
||||
float GetGridActivationRange() const;
|
||||
|
||||
@@ -1715,7 +1715,7 @@ bool Pet::resetTalents()
|
||||
return true;
|
||||
}
|
||||
|
||||
void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/)
|
||||
void Pet::resetTalentsForAllPetsOf(Player* /*owner*/, Pet* /*onlinePet*/ /*= nullptr*/)
|
||||
{
|
||||
/*
|
||||
// not need after this call
|
||||
|
||||
@@ -5771,7 +5771,7 @@ bool Player::UpdateFishingSkill()
|
||||
return false;
|
||||
}
|
||||
|
||||
void Player::GiveXpForGather(uint32 const& skillId, uint32 const& reqSkillValue)
|
||||
void Player::GiveXpForGather(uint32 const& skillId)
|
||||
{
|
||||
// Skip if the profession is no gather profession
|
||||
if (skillId != SKILL_HERBALISM && skillId != SKILL_MINING && skillId != SKILL_ARCHAEOLOGY)
|
||||
@@ -7276,7 +7276,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo
|
||||
uint32 surplousJusticePoints = 0;
|
||||
if (totalCap && count > int32(totalCap))
|
||||
{
|
||||
if (id = CURRENCY_TYPE_JUSTICE_POINTS)
|
||||
if (id == CURRENCY_TYPE_JUSTICE_POINTS)
|
||||
surplousJusticePoints = (oldTotalCount + count - totalCap) / precision;
|
||||
count = totalCap;
|
||||
}
|
||||
@@ -17656,7 +17656,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder)
|
||||
// else - needs motiontransport
|
||||
if (transSpawnId)
|
||||
{
|
||||
if (map = sMapMgr->CreateMap(mapId, this, instanceId))
|
||||
map = sMapMgr->CreateMap(mapId, this, instanceId);
|
||||
if (map)
|
||||
{
|
||||
auto bounds = map->GetGameObjectBySpawnIdStore().equal_range(transSpawnId);
|
||||
if (bounds.first != bounds.second)
|
||||
@@ -19047,7 +19048,7 @@ void Player::UpdateMountCapabilities()
|
||||
AuraEffect* mountEffect = auraList.front();
|
||||
if (MountCapabilityEntry const* mountCapability = mountEffect->GetBase()->GetUnitOwner()->GetMountCapability(uint32(mountEffect->GetMiscValueB())))
|
||||
{
|
||||
if (mountCapability->Id != mountEffect->GetAmount())
|
||||
if (mountCapability->Id != uint32(mountEffect->GetAmount()))
|
||||
{
|
||||
Unit* target = mountEffect->GetBase()->GetApplicationOfTarget(GetGUID())->GetTarget();
|
||||
if (MountCapabilityEntry const* oldMountCapability = sMountCapabilityStore.LookupEntry(mountEffect->GetAmount()))
|
||||
@@ -24369,7 +24370,7 @@ void Player::SendAurasForTarget(Unit* target) const
|
||||
|
||||
void Player::SetDailyQuestStatus(uint32 quest_id)
|
||||
{
|
||||
if (Quest const* qQuest = sObjectMgr->GetQuestTemplate(quest_id))
|
||||
if (sObjectMgr->GetQuestTemplate(quest_id))
|
||||
{
|
||||
for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
|
||||
{
|
||||
@@ -28095,7 +28096,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
pet->InitPetCreateSpells();
|
||||
pet->SavePetToDB(PET_SAVE_NEW_PET);
|
||||
PetSpellInitialize();
|
||||
GetSession()->SendPetAdded(pet->GetSlot(), pet->GetCharmInfo()->GetPetNumber(), pet->GetEntry(), pet->GetDisplayId(), pet->getLevel(), pet->GetName());
|
||||
GetSession()->SendPetAdded(pet->GetSlot(), pet->GetCharmInfo()->GetPetNumber(), pet->GetEntry(), pet->getLevel(), pet->GetName());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1783,7 +1783,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool UpdateCraftSkill(uint32 spellid);
|
||||
bool UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator = 1);
|
||||
bool UpdateFishingSkill();
|
||||
void GiveXpForGather(uint32 const& skillId, uint32 const& reqSkillValue);
|
||||
void GiveXpForGather(uint32 const& skillId);
|
||||
|
||||
void SurveyDigSite();
|
||||
void NotifyRequestResearchHistory();
|
||||
|
||||
@@ -34,9 +34,8 @@
|
||||
#include "ZoneScript.h"
|
||||
|
||||
Transport::Transport() : GameObject(),
|
||||
_passengerTeleportItr(_passengers.begin()), _currentTransportTime(0), _destinationStopFrameTime(0),
|
||||
_lastStopFrameTime(0), _finalStopFrameTime(0), _isDynamicTransport(false),
|
||||
_initialRelocate(false)
|
||||
_passengerTeleportItr(_passengers.begin()), _destinationStopFrameTime(0), _currentTransportTime(0),
|
||||
_lastStopFrameTime(0), _finalStopFrameTime(0), _isDynamicTransport(false), _initialRelocate(false)
|
||||
{
|
||||
m_updateFlag |= UPDATEFLAG_TRANSPORT | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION;
|
||||
}
|
||||
@@ -153,7 +152,7 @@ void Transport::RemovePassenger(WorldObject* passenger)
|
||||
}
|
||||
}
|
||||
|
||||
bool Transport::Create(ObjectGuid::LowType guidlow, uint32 entry, Map* map, uint32 /*phaseMask*/, Position const& pos, QuaternionData const& rotation, uint32 animprogress, GOState go_state, uint32 artKit /*= 0*/, bool dynamic, ObjectGuid::LowType spawnid)
|
||||
bool Transport::Create(ObjectGuid::LowType guidlow, uint32 entry, Map* map, uint32 /*phaseMask*/, Position const& pos, QuaternionData const& rotation, uint32 animprogress, GOState /*go_state*/, uint32 artKit /*= 0*/, bool dynamic, ObjectGuid::LowType spawnid)
|
||||
{
|
||||
ASSERT(map);
|
||||
SetMap(map);
|
||||
@@ -285,7 +284,7 @@ bool Transport::CreateTransport(ObjectGuid::LowType guidlow, uint32 entry, uint3
|
||||
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (!goinfo)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (Position: %s) ang: %f", guidlow, mapid, pos.ToString().c_str());
|
||||
TC_LOG_ERROR("sql.sql", "Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f", guidlow, mapid, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1016,7 +1016,6 @@ void Guardian::UpdateResistances(uint32 school)
|
||||
void Guardian::UpdateArmor()
|
||||
{
|
||||
float value = 0.0f;
|
||||
float bonus_armor = 0.0f;
|
||||
UnitMods unitMod = UNIT_MOD_ARMOR;
|
||||
|
||||
value = GetModifierValue(unitMod, BASE_VALUE);
|
||||
|
||||
@@ -8070,7 +8070,6 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
||||
return 0;
|
||||
|
||||
int32 TakenFlatBenefit = 0;
|
||||
float TakenTotalCasterMod = 0.0f;
|
||||
|
||||
// ..taken
|
||||
TakenFlatBenefit += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_TAKEN, attacker->GetMeleeDamageSchoolMask());
|
||||
@@ -14692,7 +14691,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
||||
data->append(fieldBuffer);
|
||||
}
|
||||
|
||||
void Unit::DestroyForPlayer(Player* target, bool onDeath /*= false*/) const
|
||||
void Unit::DestroyForPlayer(Player* target, bool /*onDeath = false*/) const
|
||||
{
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@ class Object;
|
||||
class Pet;
|
||||
class Player;
|
||||
class Transport;
|
||||
class MapTransport;
|
||||
class Unit;
|
||||
class WorldObject;
|
||||
|
||||
|
||||
@@ -279,9 +279,6 @@ void ObjectGridUnloader::Visit(GridRefManager<T> &m)
|
||||
while (!m.isEmpty())
|
||||
{
|
||||
T *obj = m.getFirst()->GetSource();
|
||||
// if option set then object already saved at this moment
|
||||
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
obj->SaveRespawnTime();
|
||||
//Some creatures may summon other temp summons in CleanupsBeforeDelete()
|
||||
//So we need this even after cleaner (maybe we can remove cleaner)
|
||||
//Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
|
||||
|
||||
@@ -433,7 +433,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
|
||||
|
||||
plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
|
||||
|
||||
AreaTableEntry const* zone = sAreaTableStore.LookupEntry(plrMover->GetAreaId());
|
||||
if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()))
|
||||
{
|
||||
if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player)))
|
||||
|
||||
@@ -958,9 +958,9 @@ void WorldSession::SendPetSlotUpdated(int32 petNumberA, int32 petSlotA, int32 pe
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendPetAdded(int32 petSlot, int32 petNumber, int32 creatureID, int32 displayID, int32 level, std::string name)
|
||||
void WorldSession::SendPetAdded(int32 petSlot, int32 petNumber, int32 creatureID, int32 level, std::string name)
|
||||
{
|
||||
WorldPacket data(SMSG_PET_ADDED, 4 + 4 + 1 + 4 + 4 + name.size());
|
||||
WorldPacket data(SMSG_PET_ADDED, 4 + 4 + 1 + 4 + 4 + name.length());
|
||||
|
||||
data << uint32(level);
|
||||
data << uint32(petSlot);
|
||||
|
||||
@@ -48,9 +48,9 @@ struct TC_GAME_API LootStoreItem
|
||||
// Constructor
|
||||
// displayid is filled in IsValid() which must be called after
|
||||
LootStoreItem(uint32 _itemid, uint32 _reference, float _chance, bool _needs_quest, bool _is_currency, uint16 _lootmode, uint8 _groupid, int32 _mincount, uint8 _maxcount)
|
||||
: itemid(_itemid), reference(_reference), chance(_chance), needs_quest(_needs_quest), is_currency(_is_currency),
|
||||
lootmode(_lootmode), groupid(_groupid), mincount(_mincount), maxcount(_maxcount)
|
||||
{ }
|
||||
: itemid(_itemid), reference(_reference), chance(_chance), lootmode(_lootmode), needs_quest(_needs_quest),
|
||||
is_currency(_is_currency), groupid(_groupid), mincount(_mincount), maxcount(_maxcount)
|
||||
{ }
|
||||
|
||||
bool Roll(bool rate) const; // Checks if the entry takes it's chance (at loot generation)
|
||||
bool IsValid(LootStore const& store, uint32 entry) const; // Checks correctness of values
|
||||
|
||||
@@ -1058,12 +1058,7 @@ void Map::RemoveFromMap(T *obj, bool remove)
|
||||
obj->ResetMap();
|
||||
|
||||
if (remove)
|
||||
{
|
||||
// if option set then object already saved at this moment
|
||||
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
obj->SaveRespawnTime();
|
||||
DeleteFromWorld(obj);
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -1103,12 +1098,7 @@ void Map::RemoveFromMap(MapTransport* obj, bool remove)
|
||||
obj->ResetMap();
|
||||
|
||||
if (remove)
|
||||
{
|
||||
// if option set then object already saved at this moment
|
||||
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
obj->SaveRespawnTime();
|
||||
DeleteFromWorld(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void Map::PlayerRelocation(Player* player, float x, float y, float z, float orientation)
|
||||
|
||||
@@ -116,7 +116,6 @@ void FleeingMovementGenerator<T>::SetTargetLocation(T* owner)
|
||||
GetPoint(owner, destination);
|
||||
|
||||
// Add LOS check for target point
|
||||
Position mypos = owner->GetPosition();
|
||||
if (!owner->IsWithinLOS(destination.GetPositionX(), destination.GetPositionY(), destination.GetPositionZ()))
|
||||
{
|
||||
_timer.Reset(200);
|
||||
|
||||
@@ -205,7 +205,7 @@ void PoolGroup<Creature>::Despawn1Object(ObjectGuid::LowType guid)
|
||||
++itr;
|
||||
// For dynamic spawns, save respawn time here
|
||||
if (!creature->GetRespawnCompatibilityMode())
|
||||
creature->SaveRespawnTime(0, false);
|
||||
creature->SaveRespawnTime();
|
||||
creature->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ void PoolGroup<GameObject>::Despawn1Object(ObjectGuid::LowType guid)
|
||||
|
||||
// For dynamic spawns, save respawn time here
|
||||
if (!go->GetRespawnCompatibilityMode())
|
||||
go->SaveRespawnTime(0, false);
|
||||
go->SaveRespawnTime();
|
||||
go->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class WorldPacket : public ByteBuffer
|
||||
{
|
||||
}
|
||||
|
||||
WorldPacket(WorldPacket&& packet, std::chrono::steady_clock::time_point receivedTime) : ByteBuffer(std::move(packet)), m_opcode(packet.m_opcode), m_receivedTime(receivedTime), _connection(packet._connection), _compressionStream(nullptr)
|
||||
WorldPacket(WorldPacket&& packet, std::chrono::steady_clock::time_point receivedTime) : ByteBuffer(std::move(packet)), m_opcode(packet.m_opcode), _connection(packet._connection), _compressionStream(nullptr), m_receivedTime(receivedTime)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ class TC_GAME_API WorldSession
|
||||
bool CheckStableMaster(ObjectGuid guid);
|
||||
void UpdatePetSlot(uint32 petNumber, uint8 oldPetSlot, uint8 newPetSlot);
|
||||
void SendPetSlotUpdated(int32 petNumberA, int32 petSlotA, int32 petNumberB, int32 petSlotB);
|
||||
void SendPetAdded(int32 petSlot, int32 petNumber, int32 creatureID, int32 displayID, int32 level, std::string name);
|
||||
void SendPetAdded(int32 petSlot, int32 petNumber, int32 creatureID, int32 level, std::string name);
|
||||
|
||||
// Account Data
|
||||
AccountData* GetAccountData(AccountDataType type) { return &m_accountData[type]; }
|
||||
|
||||
@@ -51,9 +51,9 @@ std::string const WorldSocket::ServerConnectionInitialize("WORLD OF WARCRAFT CON
|
||||
std::string const WorldSocket::ClientConnectionInitialize("WORLD OF WARCRAFT CONNECTION - CLIENT TO SERVER");
|
||||
|
||||
WorldSocket::WorldSocket(tcp::socket&& socket) : Socket(std::move(socket)),
|
||||
_authSeed(rand32()), _OverSpeedPings(0), _worldSession(nullptr), _authed(false),
|
||||
_sendBufferSize(4096), _initialized(false), _type(CONNECTION_TYPE_REALM),
|
||||
_compressionStream(nullptr)
|
||||
_type(CONNECTION_TYPE_REALM), _authSeed(rand32()), _OverSpeedPings(0), _worldSession(nullptr),
|
||||
_authed(false), _compressionStream(nullptr), _sendBufferSize(4096),
|
||||
_initialized(false)
|
||||
{
|
||||
_headerBuffer.Resize(2);
|
||||
}
|
||||
|
||||
@@ -1839,7 +1839,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
|
||||
if (PowerType != POWER_MANA)
|
||||
{
|
||||
int32 oldPower = target->GetPower(PowerType);
|
||||
// reset power to default values only at power change
|
||||
if (target->getPowerType() != PowerType)
|
||||
target->setPowerType(PowerType);
|
||||
@@ -3859,7 +3858,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const* aurApp, u
|
||||
target->HandleBaseModValue(RANGED_CRIT_PERCENTAGE, FLAT_MOD, float(GetAmount()), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
|
||||
{
|
||||
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
|
||||
return;
|
||||
@@ -4194,7 +4193,7 @@ void AuraEffect::HandleAuraModAttackPowerOfArmor(AuraApplication const* aurApp,
|
||||
target->ToPlayer()->UpdateAttackPowerAndDamage(false);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleOverrideSpellPowerByApPct(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
void AuraEffect::HandleOverrideSpellPowerByApPct(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
|
||||
{
|
||||
if (!(mode & (AURA_EFFECT_HANDLE_REAL)))
|
||||
return;
|
||||
@@ -5123,7 +5122,7 @@ void AuraEffect::HandlePreventResurrection(AuraApplication const* aurApp, uint8
|
||||
aurApp->GetTarget()->SetByteFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_FLAGS, PLAYER_FIELD_BYTE_RELEASE_TIMER);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModSpellPowerPct(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
void AuraEffect::HandleAuraModSpellPowerPct(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
|
||||
{
|
||||
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
|
||||
return;
|
||||
|
||||
@@ -1709,7 +1709,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
player->UpdateGatherSkill(skillId, pureSkillValue, reqSkillValue))
|
||||
{
|
||||
gameObjTarget->AddToSkillupList(player->GetGUID().GetCounter());
|
||||
player->GiveXpForGather(skillId, reqSkillValue);
|
||||
player->GiveXpForGather(skillId);
|
||||
}
|
||||
}
|
||||
else if (itemTarget)
|
||||
@@ -2591,7 +2591,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
|
||||
pet->SavePetToDB(PET_SAVE_NEW_PET);
|
||||
if (uint8 slot = pet->GetSlot() <= PET_SLOT_LAST_ACTIVE_SLOT)
|
||||
{
|
||||
m_caster->ToPlayer()->GetSession()->SendPetAdded(pet->GetSlot(), pet->GetCharmInfo()->GetPetNumber(), creatureTarget->GetEntry(), creatureTarget->GetDisplayId(), creatureTarget->getLevel(), pet->GetName());
|
||||
m_caster->ToPlayer()->GetSession()->SendPetAdded(pet->GetSlot(), pet->GetCharmInfo()->GetPetNumber(), creatureTarget->GetEntry(), creatureTarget->getLevel(), pet->GetName());
|
||||
m_caster->ToPlayer()->PetSpellInitialize();
|
||||
}
|
||||
else
|
||||
@@ -4741,7 +4741,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
float fx, fy, fz, fo;
|
||||
float fx = 0.f, fy = 0.f, fz = 0.f, fo = 0.f;
|
||||
|
||||
if (m_targets.HasDst())
|
||||
destTarget->GetPosition(fx, fy, fz, fo);
|
||||
|
||||
@@ -1131,13 +1131,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = 2;
|
||||
}
|
||||
|
||||
m_bool_configs[CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY] = sConfigMgr->GetBoolDefault("SaveRespawnTimeImmediately", true);
|
||||
if (!m_bool_configs[CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY])
|
||||
{
|
||||
TC_LOG_WARN("server.loading", "SaveRespawnTimeImmediately triggers assertions when disabled, overridden to Enabled");
|
||||
m_bool_configs[CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY] = true;
|
||||
}
|
||||
|
||||
m_bool_configs[CONFIG_WEATHER] = sConfigMgr->GetBoolDefault("ActivateWeather", true);
|
||||
|
||||
m_int_configs[CONFIG_DISABLE_BREATHING] = sConfigMgr->GetIntDefault("DisableWaterBreath", SEC_CONSOLE);
|
||||
|
||||
@@ -117,7 +117,6 @@ enum WorldBoolConfigs
|
||||
CONFIG_GM_LOWER_SECURITY,
|
||||
CONFIG_SKILL_PROSPECTING,
|
||||
CONFIG_SKILL_MILLING,
|
||||
CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY,
|
||||
CONFIG_WEATHER,
|
||||
CONFIG_QUEST_IGNORE_RAID,
|
||||
CONFIG_CHAT_PARTY_RAID_WARNINGS,
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -342,17 +342,19 @@ public:
|
||||
|
||||
switch (Battlenet::AccountMgr::LinkWithGameAccount(bnetAccountName, gameAccountName))
|
||||
{
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_LINKED, bnetAccountName.c_str(), gameAccountName.c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_OR_BNET_DOES_NOT_EXIST, bnetAccountName.c_str(), gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_ACCOUNT_BAD_LINK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_ALREADY_LINKED, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_LINKED, bnetAccountName.c_str(), gameAccountName.c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_OR_BNET_DOES_NOT_EXIST, bnetAccountName.c_str(), gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_ACCOUNT_BAD_LINK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_ALREADY_LINKED, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -371,17 +373,19 @@ public:
|
||||
|
||||
switch (Battlenet::AccountMgr::UnlinkGameAccount(gameAccountName))
|
||||
{
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_UNLINKED, gameAccountName.c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_ACCOUNT_BAD_LINK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_NOT_LINKED, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_UNLINKED, gameAccountName.c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
case AccountOpResult::AOR_ACCOUNT_BAD_LINK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_BNET_NOT_LINKED, gameAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -158,12 +158,12 @@ public:
|
||||
if (objectInfo->type == GAMEOBJECT_TYPE_TRANSPORT)
|
||||
{
|
||||
object = new Transport();
|
||||
ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::Transport>();
|
||||
guidLow = map->GenerateLowGuid<HighGuid::Transport>();
|
||||
}
|
||||
else
|
||||
{
|
||||
object = new GameObject();
|
||||
ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
|
||||
guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
|
||||
}
|
||||
|
||||
if (!object->Create(guidLow, objectInfo->entry, map, 0, *player, QuaternionData(), 255, GO_STATE_READY))
|
||||
|
||||
@@ -272,7 +272,7 @@ class spell_argaloth_consuming_darkness_AuraScript : public AuraScript
|
||||
PrepareAuraScript(spell_argaloth_consuming_darkness_AuraScript);
|
||||
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (AuraEffect* aurEff = GetEffect(EFFECT_0))
|
||||
{
|
||||
|
||||
@@ -541,7 +541,7 @@ class npc_feludius : public CreatureScript
|
||||
me->MakeInterruptable(false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (Creature* controller = _instance->GetCreature(DATA_ASCENDANT_COUNCIL_CONTROLLER))
|
||||
controller->AI()->DoAction(ACTION_START_ENCOUNTER);
|
||||
@@ -723,7 +723,7 @@ class npc_ignacious : public CreatureScript
|
||||
me->MakeInterruptable(false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (Creature* controller = _instance->GetCreature(DATA_ASCENDANT_COUNCIL_CONTROLLER))
|
||||
controller->AI()->DoAction(ACTION_START_ENCOUNTER);
|
||||
@@ -1003,7 +1003,7 @@ class npc_arion : public CreatureScript
|
||||
_summons.Summon(summon);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(25, damage))
|
||||
if (Creature* controller = _instance->GetCreature(DATA_ASCENDANT_COUNCIL_CONTROLLER))
|
||||
@@ -1198,7 +1198,7 @@ class npc_terrastra : public CreatureScript
|
||||
_summons.Summon(summon);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(25, damage))
|
||||
if (Creature* controller = _instance->GetCreature(DATA_ASCENDANT_COUNCIL_CONTROLLER))
|
||||
@@ -1863,7 +1863,7 @@ class npc_ascendant_council_flame_strike : public CreatureScript
|
||||
summoner->CastSpell(me, SPELL_FLAME_STRIKE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caste*/r, SpellInfo const* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_FLAME_STRIKE)
|
||||
{
|
||||
@@ -1872,7 +1872,7 @@ class npc_ascendant_council_flame_strike : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (target->GetEntry() == NPC_FROZEN_ORB)
|
||||
{
|
||||
@@ -1995,7 +1995,7 @@ class spell_feludius_heart_of_ice : public AuraScript
|
||||
});
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
target->RemoveAurasDueToSpell(SPELL_BURNING_BLOOD);
|
||||
@@ -2041,7 +2041,7 @@ class spell_feludius_frost_imbued_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_feludius_frost_imbued_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
return (GetTarget()->GetDistance(caster) > 10.0f);
|
||||
@@ -2124,7 +2124,7 @@ class spell_ignacious_burning_blood : public AuraScript
|
||||
});
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
target->RemoveAurasDueToSpell(SPELL_HEART_OF_ICE);
|
||||
@@ -2170,7 +2170,7 @@ class spell_ignacious_flame_imbued_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_ignacious_flame_imbued_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
return (GetTarget()->GetDistance(caster) > 10.0f);
|
||||
@@ -2273,7 +2273,7 @@ class spell_arion_lashing_winds : public SpellScript
|
||||
});
|
||||
}
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
void HandleHit(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
@@ -2537,7 +2537,7 @@ class spell_terrastra_harden_skin : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_SHATTER });
|
||||
}
|
||||
|
||||
void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
|
||||
void OnAbsorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
|
||||
{
|
||||
absorbAmount = CalculatePct(dmgInfo.GetDamage(), GetSpellInfo()->Effects[EFFECT_2].BasePoints);
|
||||
_absorbedDamage += absorbAmount;
|
||||
|
||||
@@ -317,7 +317,7 @@ struct boss_chogall : public BossAI
|
||||
_allowDeath = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
@@ -1215,7 +1215,7 @@ class spell_chogall_conversion : public SpellScript
|
||||
Trinity::Containers::RandomResize(targets, GetCaster()->GetMap()->Is25ManRaid() ? 4 : 2);
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
|
||||
@@ -274,7 +274,7 @@ class boss_halfus_wyrmbreaker : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -676,7 +676,7 @@ class spell_halfus_fireball : public SpellScriptLoader
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
void HandleHit(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
|
||||
+14
-14
@@ -305,7 +305,7 @@ class boss_theralion : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -331,7 +331,7 @@ class boss_theralion : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
|
||||
@@ -570,7 +570,7 @@ class boss_valiona : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -596,7 +596,7 @@ class boss_valiona : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
|
||||
@@ -848,7 +848,7 @@ class npc_theralion_and_valiona_unstable_twilight : public CreatureScript
|
||||
{
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
o =+ frand(0.0f, float(M_PI * 2));
|
||||
o += frand(0.0f, float(M_PI * 2));
|
||||
x += cos(o) * 5.0f;
|
||||
y += sin(o) * 5.0f;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z, true);
|
||||
@@ -1008,7 +1008,7 @@ class spell_theralion_dazzling_destruction : public SpellScriptLoader
|
||||
targets.remove_if(IsInTwilightPhaseCheck());
|
||||
}
|
||||
|
||||
void HandleActionEffect(SpellEffIndex effIndex)
|
||||
void HandleActionEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TRIGGER_ACTION_VALIONA, true);
|
||||
}
|
||||
@@ -1166,9 +1166,9 @@ class spell_theralion_engulfing_magic_targeting : public SpellScriptLoader
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
if (GetCaster()->GetMap()->Is25ManRaid() && targets.size() > 3)
|
||||
if (caster->GetMap()->Is25ManRaid() && targets.size() > 3)
|
||||
Trinity::Containers::RandomResize(targets, 3);
|
||||
else if (!GetCaster()->GetMap()->Is25ManRaid())
|
||||
else if (!caster->GetMap()->Is25ManRaid())
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
}
|
||||
@@ -1272,7 +1272,7 @@ class spell_valiona_blackout: public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_BLACKOUT_DAMAGE });
|
||||
}
|
||||
|
||||
void OnAuraRemoveHandler(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void OnAuraRemoveHandler(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL
|
||||
|| GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
|
||||
@@ -1638,7 +1638,7 @@ class spell_valiona_summon_twilight_portal : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_SUMMON_TWILIGHT_PORTAL });
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
@@ -1673,7 +1673,7 @@ class spell_valiona_summon_twilight_sentry : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_SUMMON_TWILIGHT_SENTRY });
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
@@ -1715,7 +1715,7 @@ class spell_valiona_twilight_flames : public SpellScriptLoader
|
||||
targets.remove_if(IsInTwilightPhaseCheck());
|
||||
}
|
||||
|
||||
void HandleActionEffect(SpellEffIndex effIndex)
|
||||
void HandleActionEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(caster, SPELL_TRIGGER_ACTION_THERALION, true);
|
||||
@@ -1941,7 +1941,7 @@ class spell_theralion_and_valiona_shifting_reality : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
@@ -1971,7 +1971,7 @@ class spell_theralion_and_valiona_collapsing_twilight_portal : public SpellScrip
|
||||
{
|
||||
PrepareAuraScript(spell_theralion_and_valiona_collapsing_twilight_portal_AuraScript);
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
if (target->GetObjectScale() >= 1.03f)
|
||||
|
||||
+2
-2
@@ -156,7 +156,7 @@ struct boss_ascendant_lord_obsidius : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
void SetData(uint32 type, uint32 /*data*/) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -357,7 +357,7 @@ class spell_obsidius_shadow_of_obsidius : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_obsidius_shadow_of_obsidius);
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
amount = -1;
|
||||
}
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ struct boss_corla_herald_of_twilight : public BossAI
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ struct boss_karsh_steelbender : public BossAI
|
||||
{
|
||||
boss_karsh_steelbender(Creature* creature) : BossAI(creature, DATA_KARSH_STEELBENDER) { }
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
DoCastSelf(SPELL_QUICKSILVER_ARMOR);
|
||||
DoCastSelf(SPELL_QUICKSILVER_ARMOR_DAMAGE_REDUCTION);
|
||||
@@ -279,7 +279,7 @@ class spell_karsh_superheated_quicksilver_armor_proc : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_SUPERHEATED_QUICKSILVER_ARMOR });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
return (GetTarget()->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_SUPERHEATED_QUICKSILVER_ARMOR, GetTarget())));
|
||||
}
|
||||
|
||||
+5
-14
@@ -18,6 +18,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "blackrock_caverns.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellScript.h"
|
||||
@@ -125,7 +126,7 @@ struct boss_romogg_bonecrusher : public BossAI
|
||||
events.ScheduleEvent(EVENT_QUAKE, 24s);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
summons.DespawnAll();
|
||||
@@ -199,17 +200,9 @@ private:
|
||||
uint8 _killedElementals;
|
||||
};
|
||||
|
||||
struct npc_romogg_chains_of_woe : public ScriptedAI
|
||||
struct npc_romogg_chains_of_woe : public NullCreatureAI
|
||||
{
|
||||
npc_romogg_chains_of_woe(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
npc_romogg_chains_of_woe(Creature* creature) : NullCreatureAI(creature) { }
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
@@ -218,8 +211,6 @@ struct npc_romogg_chains_of_woe : public ScriptedAI
|
||||
DoCastSelf(SPELL_CHAINS_OF_WOE_CHANNELED);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override { }
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
@@ -314,7 +305,7 @@ class spell_romogg_call_for_help : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_romogg_call_for_help);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Creature* creature = GetHitCreature())
|
||||
if (creature->IsAIEnabled)
|
||||
|
||||
-5
@@ -39,14 +39,9 @@ class instance_blackrock_caverns : public InstanceMapScript
|
||||
{
|
||||
instance_blackrock_caverns_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
Initialize();
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_lastRazAreaIndex = RAZ_AREA_INDEX_ROMOGG;
|
||||
}
|
||||
|
||||
|
||||
+7
-10
@@ -35,17 +35,14 @@ struct go_bwd_ancient_bell : public GameObjectAI
|
||||
if (_instance->GetData(DATA_ATRAMEDES_INTRO) == DONE)
|
||||
return true;
|
||||
|
||||
if (GameObject* bell = me->ToGameObject())
|
||||
{
|
||||
_instance->SetData(DATA_ATRAMEDES_INTRO, DONE);
|
||||
me->SendCustomAnim(0);
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
_instance->SetData(DATA_ATRAMEDES_INTRO, DONE);
|
||||
me->SendCustomAnim(0);
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
if (Creature* column = _instance->GetCreature(DATA_COLUMN_OF_LIGHT))
|
||||
column->DespawnOrUnsummon();
|
||||
|
||||
if (Creature* column = _instance->GetCreature(DATA_COLUMN_OF_LIGHT))
|
||||
column->DespawnOrUnsummon();
|
||||
me->DespawnOrUnsummon(7s + 400ms);
|
||||
|
||||
me->DespawnOrUnsummon(7s + 400ms);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private:
|
||||
@@ -80,7 +77,7 @@ class spell_bwd_dragon_orb : public SpellScript
|
||||
dest.Relocate(DragonOrb2Offset);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_bwd_dragon_orb::SetDest, EFFECT_0, TARGET_DEST_CASTER_RANDOM);
|
||||
}
|
||||
|
||||
+3
-3
@@ -352,7 +352,7 @@ struct boss_chimaeron : public BossAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CAUSTIC_SLIME:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
if (SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
DoCastAOE(SPELL_CAUSTIC_SLIME_TARGETING, true);
|
||||
events.Repeat(5s);
|
||||
break;
|
||||
@@ -404,7 +404,7 @@ struct npc_chimaeron_finkle_einhorn : public ScriptedAI
|
||||
{
|
||||
npc_chimaeron_finkle_einhorn(Creature* creature) : ScriptedAI(creature), _instance(me->GetInstanceScript()), _bileOTronActivated(false) { }
|
||||
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
bool GossipSelect(Player* /*player*/, uint32 menuId, uint32 /*gossipListId*/) override
|
||||
{
|
||||
if (menuId == GOSSIP_MENU_ID_RESTRICTIONS && !_bileOTronActivated)
|
||||
{
|
||||
@@ -717,7 +717,7 @@ class spell_chimaeron_finkles_mixture : public AuraScript
|
||||
Remove();
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
amount = -1;
|
||||
}
|
||||
|
||||
+6
-4
@@ -280,7 +280,7 @@ struct boss_magmaw : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
@@ -503,13 +503,15 @@ struct boss_magmaw : public BossAI
|
||||
private:
|
||||
void SetupBody()
|
||||
{
|
||||
if (_pincer1 = DoSummon(NPC_MAGMAWS_PINCER_1, me->GetPosition()))
|
||||
_pincer1 = DoSummon(NPC_MAGMAWS_PINCER_1, me->GetPosition());
|
||||
if (_pincer1)
|
||||
{
|
||||
_pincer1->EnterVehicle(me, SEAT_MAGMAWS_PINCER_1);
|
||||
_pincer1->SetDisplayId(_pincer1->GetCreatureTemplate()->Modelid3);
|
||||
}
|
||||
|
||||
if (_pincer2 = DoSummon(NPC_MAGMAWS_PINCER_2, me->GetPosition()))
|
||||
_pincer2 = DoSummon(NPC_MAGMAWS_PINCER_2, me->GetPosition());
|
||||
if (_pincer2)
|
||||
{
|
||||
_pincer2->EnterVehicle(me, SEAT_MAGMAWS_PINCER_2);
|
||||
_pincer2->SetDisplayId(_pincer2->GetCreatureTemplate()->Modelid3);
|
||||
@@ -1205,7 +1207,7 @@ class achievement_parasite_evening : public AchievementCriteriaScript
|
||||
public:
|
||||
achievement_parasite_evening() : AchievementCriteriaScript("achievement_parasite_evening") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* target) override
|
||||
bool OnCheck(Player* /*source*/, Unit* target) override
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
+3
-4
@@ -1074,7 +1074,6 @@ class spell_maloriak_release_experiments : public SpellScript
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
targets.remove_if(Trinity::UnitAuraCheck(false, SPELL_DROWNED_STATE));
|
||||
|
||||
if (!targets.empty() && GetSpellInfo()->Id == SPELL_RELEASE_ABERRATIONS)
|
||||
@@ -1125,7 +1124,7 @@ class spell_maloriak_magma_jets_periodic : public AuraScript
|
||||
Remove();
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_maloriak_magma_jets_periodic::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
@@ -1167,7 +1166,7 @@ class spell_maloriak_vile_swill: public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_VILE_SWILL_SUMMON });
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* target = GetTarget();
|
||||
@@ -1175,7 +1174,7 @@ class spell_maloriak_vile_swill: public AuraScript
|
||||
target->CastSpell(destination.GetPositionX(), destination.GetPositionY(), destination.GetPositionZ(), SPELL_VILE_SWILL_SUMMON, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_maloriak_vile_swill::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
+1
-1
@@ -944,9 +944,9 @@ struct npc_nefarians_end_lord_victor_nefarius : public PassiveAI
|
||||
}
|
||||
|
||||
private:
|
||||
bool _started;
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
bool _started;
|
||||
};
|
||||
|
||||
struct npc_nefarians_end_animated_bone_warrior : public ScriptedAI
|
||||
|
||||
+2
-2
@@ -1129,7 +1129,7 @@ private:
|
||||
{
|
||||
if (Creature* golem = _instance->GetCreature(i))
|
||||
if (!golem->HasAura(SPELL_INACTIVE))
|
||||
if (!preferedGolem || golem->GetPower(POWER_ENERGY) && golem->GetPower(POWER_ENERGY) <= preferedGolem->GetPower(POWER_ENERGY))
|
||||
if (!preferedGolem || (golem->GetPower(POWER_ENERGY) && golem->GetPower(POWER_ENERGY) <= preferedGolem->GetPower(POWER_ENERGY)))
|
||||
preferedGolem = golem;
|
||||
}
|
||||
|
||||
@@ -1495,7 +1495,7 @@ class spell_omnotron_barrier : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_BACKDRAFT });
|
||||
}
|
||||
|
||||
void HandleAbsorbRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void HandleAbsorbRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
|
||||
if (Unit* caster = GetCaster())
|
||||
|
||||
-5
@@ -111,11 +111,6 @@ class instance_blackwing_descent : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, gameobjectData);
|
||||
LoadDoorData(doorData);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_deadDwarfSpirits = 0;
|
||||
_atramedesIntroState = NOT_STARTED;
|
||||
_entranceSequenceDone = false;
|
||||
|
||||
@@ -117,7 +117,7 @@ Position const FirewallPlatterCyclicPath[FirewallPlatterCyclicPathSize] =
|
||||
struct boss_glubtok : public BossAI
|
||||
{
|
||||
boss_glubtok(Creature* creature) : BossAI(creature, DATA_GLUBTOK),
|
||||
_defeated(false), _nextBlossomBunny(NPC_FIRE_BLOSSOM_BUNNY), _lastFists(FISTS_OF_FLAME) { }
|
||||
_defeated(false), _lastFists(FISTS_OF_FLAME), _nextBlossomBunny(NPC_FIRE_BLOSSOM_BUNNY) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -720,8 +720,7 @@ class spell_helix_ride_face_targeting : public SpellScript
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
targets.remove_if([caster](WorldObject const* obj)->bool
|
||||
targets.remove_if([](WorldObject const* obj)->bool
|
||||
{
|
||||
Unit const* target = obj->ToUnit();
|
||||
return !target || !target->HasAura(SPELL_HELIX_RIDE);
|
||||
@@ -730,7 +729,7 @@ class spell_helix_ride_face_targeting : public SpellScript
|
||||
// Make sure that we will always leap to a different player if available
|
||||
if (targets.size() > 1)
|
||||
{
|
||||
targets.remove_if([caster](WorldObject const* obj)->bool
|
||||
targets.remove_if([](WorldObject const* obj)->bool
|
||||
{
|
||||
Unit const* target = obj->ToUnit();
|
||||
return target->GetVehicleBase();
|
||||
|
||||
@@ -582,7 +582,7 @@ class npc_vanessa_note_from_vanessa : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_TALK_NOTE_FALLS_TO_THE_GROUND, Seconds(5));
|
||||
}
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
|
||||
bool GossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) override
|
||||
{
|
||||
if (_instance->GetData(DATA_VANESSA_VAN_CLEEF_ENCOUNTER) != IN_PROGRESS)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ struct npc_deadmines_defias_watcher : public ScriptedAI
|
||||
me->SetFullHealth();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (!_isOnFire && me->HealthBelowPctDamaged(30, damage))
|
||||
{
|
||||
@@ -563,7 +563,7 @@ class spell_deadmines_on_fire : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_EXPLOSIVE_SUICIDE });
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_EXPLOSIVE_SUICIDE, true);
|
||||
}
|
||||
@@ -613,7 +613,7 @@ class spell_deadmines_magma_trap_throw_to_location : public SpellScriptLoader
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Position const* pos = GetHitDest())
|
||||
if (GetHitDest())
|
||||
GetHitDest()->Relocate(-225.1973f, -563.7677f, 51.23737f);
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ struct npc_gilneas_forsaken_catapult : public VehicleAI
|
||||
_preparedDespawn = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
_events.ScheduleEvent(EVENT_FIERY_BOULDER, Milliseconds(1), Seconds(7));
|
||||
@@ -394,15 +394,15 @@ struct npc_gilneas_forsaken_catapult : public VehicleAI
|
||||
_events.ScheduleEvent(EVENT_CHECK_AREA, Milliseconds(1));
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_LAUNCH_INTERNAL:
|
||||
DoCastSelf(SPELL_LAUNCH_INTERNAL_2, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case SPELL_LAUNCH_INTERNAL:
|
||||
DoCastSelf(SPELL_LAUNCH_INTERNAL_2, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -279,15 +279,7 @@ class npc_drahga_valiona : public CreatureScript
|
||||
|
||||
struct npc_drahga_valionaAI : public ScriptedAI
|
||||
{
|
||||
npc_drahga_valionaAI(Creature* creature) : ScriptedAI(creature), _summons(me), _instance(me->GetInstanceScript())
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_finished = false;
|
||||
}
|
||||
npc_drahga_valionaAI(Creature* creature) : ScriptedAI(creature), _instance(me->GetInstanceScript()), _summons(me), _finished(false) { }
|
||||
|
||||
void IsSummonedBy(Unit* /*summon*/) override
|
||||
{
|
||||
@@ -475,13 +467,13 @@ class npc_drahga_invoked_flaming_spirit : public CreatureScript
|
||||
me->SetWalk(true);
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/)
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
DoZoneInCombat();
|
||||
_events.ScheduleEvent(EVENT_CHASE_PLAYER, Seconds(2));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->DespawnOrUnsummon(Seconds(3));
|
||||
}
|
||||
@@ -492,7 +484,7 @@ class npc_drahga_invoked_flaming_spirit : public CreatureScript
|
||||
DoCastSelf(SPELL_QUIETE_SUICIDE, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -124,15 +124,7 @@ class boss_erudax : public CreatureScript
|
||||
|
||||
struct boss_erudaxAI : public BossAI
|
||||
{
|
||||
boss_erudaxAI(Creature* creature) : BossAI(creature, DATA_ERUDAX)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_achievementEnligible = true;
|
||||
}
|
||||
boss_erudaxAI(Creature* creature) : BossAI(creature, DATA_ERUDAX), _achievementEnligible(true) { }
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
@@ -144,12 +136,6 @@ class boss_erudax : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_SUMMON_SHADOW_GALE_STALKER, Seconds(21) + Milliseconds(500));
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* killed) override
|
||||
{
|
||||
if (killed->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "grim_batol.h"
|
||||
|
||||
@@ -314,18 +315,14 @@ class npc_throngus_cave_in : public CreatureScript
|
||||
public:
|
||||
npc_throngus_cave_in() : CreatureScript("npc_throngus_cave_in") { }
|
||||
|
||||
struct npc_throngus_cave_inAI : public ScriptedAI
|
||||
struct npc_throngus_cave_inAI : public NullCreatureAI
|
||||
{
|
||||
npc_throngus_cave_inAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_throngus_cave_inAI(Creature* creature) : NullCreatureAI(creature) { }
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
DoCastAOE(SPELL_CAVE_IN_VISUAL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -49,7 +49,7 @@ struct npc_grim_batol_twilight_beguiler : public ScriptedAI
|
||||
{
|
||||
npc_grim_batol_twilight_beguiler(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
_events.SetPhase(PHASE_COSMETIC);
|
||||
@@ -64,7 +64,7 @@ struct npc_grim_batol_twilight_beguiler : public ScriptedAI
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_GRONN_KNOCKBACK_COSMETIC)
|
||||
{
|
||||
|
||||
@@ -58,17 +58,12 @@ class instance_grim_batol : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_initialized = false;
|
||||
_destroyedNets = 0;
|
||||
_batteredRedDrakeState = STATE_EMPRISONED;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* /*player*/)
|
||||
void OnPlayerEnter(Player* /*player*/) override
|
||||
{
|
||||
if (_initialized)
|
||||
return;
|
||||
@@ -230,12 +225,12 @@ class instance_grim_batol : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void WriteSaveDataMore(std::ostringstream& data)
|
||||
void WriteSaveDataMore(std::ostringstream& data) override
|
||||
{
|
||||
data << _batteredRedDrakeState;
|
||||
}
|
||||
|
||||
void ReadSaveDataMore(std::istringstream& data)
|
||||
void ReadSaveDataMore(std::istringstream& data) override
|
||||
{
|
||||
data >> _batteredRedDrakeState;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class instance_magisters_terrace : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* obj, uint32 eventId) override
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) override
|
||||
{
|
||||
if (eventId == EVENT_SPAWN_KALECGOS)
|
||||
if (!GetCreature(DATA_KALECGOS) && _events.Empty())
|
||||
|
||||
@@ -173,42 +173,37 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
switch (IsHeroic())
|
||||
if (IsHeroic())
|
||||
{
|
||||
case true:
|
||||
if (me->HealthBelowPctDamaged(90, damage) && _worgenCounter == 0)
|
||||
{
|
||||
if (me->HealthBelowPct(90) && _worgenCounter == 0)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
else if (me->HealthBelowPct(60) && _worgenCounter == 1)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
else if (me->HealthBelowPct(30) && _worgenCounter == 2)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
case false:
|
||||
else if (me->HealthBelowPctDamaged(60, damage) && _worgenCounter == 1)
|
||||
{
|
||||
if (me->HealthBelowPct(75) && _worgenCounter == 0)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
else if (me->HealthBelowPct(35) && _worgenCounter == 1)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
else if (me->HealthBelowPctDamaged(30, damage) && _worgenCounter == 2)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(75, damage) && _worgenCounter == 0)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
else if (me->HealthBelowPctDamaged(35, damage) && _worgenCounter == 1)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUMMON_WORGEN_SPIRIT, (Milliseconds(1)));
|
||||
_worgenCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,7 +261,7 @@ public:
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
|
||||
DoZoneInCombat();
|
||||
events.ScheduleEvent(EVENT_CLAW, Seconds(1) + Milliseconds(600));
|
||||
for (uint8 i = 0; i < 3; i++);
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
DoCast(me, SPELL_SUMMON_LUPINE_SPECTRE, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPct(20) && !_shielded)
|
||||
if (me->HealthBelowPctDamaged(20, damage) && !_shielded)
|
||||
{
|
||||
DoCast(me, SPELL_SHIELD_WALL);
|
||||
_shielded = true;
|
||||
|
||||
@@ -485,13 +485,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 pointId) override
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
bool WasWhisperedBefore(ObjectGuid guid) const
|
||||
{
|
||||
return _whisperedPlayers.count(guid) != 0;
|
||||
@@ -1104,12 +1097,7 @@ public:
|
||||
|
||||
struct npc_sfk_veteran_forsaken_trooperAI : public ScriptedAI
|
||||
{
|
||||
npc_sfk_veteran_forsaken_trooperAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript())
|
||||
{
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
npc_sfk_veteran_forsaken_trooperAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) { }
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
@@ -1131,16 +1119,17 @@ public:
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHEER:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER_NO_SHEATHE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case EVENT_CHEER:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER_NO_SHEATHE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
uint8 undeadNumber;
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1258,7 +1247,7 @@ class spell_sfk_shield_of_bones: public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_SHIELD_OF_BONES_TRIGGERED });
|
||||
}
|
||||
|
||||
void OnAuraRemoveHandler(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void OnAuraRemoveHandler(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
|
||||
if (Unit* caster = GetCaster())
|
||||
|
||||
@@ -83,7 +83,7 @@ struct boss_commander_ulthok : public BossAI
|
||||
events.ScheduleEvent(EVENT_DARK_FISSURE, 7s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
|
||||
@@ -206,7 +206,7 @@ struct boss_lady_nazjar : public BossAI
|
||||
events.ScheduleEvent(EVENT_SHOCK_BLAST, 13s, 16s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
|
||||
@@ -293,7 +293,7 @@ struct boss_ozumat : public BossAI
|
||||
break;
|
||||
case EVENT_CHANGE_SEAT:
|
||||
DoCastAOE(SPELL_SUMMON_CHEST_VISUAL);
|
||||
if (Creature* vehicle = instance->GetCreature(DATA_OZUMAT_VEHICLE))
|
||||
if (instance->GetCreature(DATA_OZUMAT_VEHICLE))
|
||||
me->ChangeSeat(SEAT_1);
|
||||
|
||||
events.ScheduleEvent(EVENT_SWIM_AWAY, 1s);
|
||||
|
||||
@@ -176,17 +176,11 @@ class instance_throne_of_the_tides : public InstanceMapScript
|
||||
{
|
||||
instance_throne_of_the_tides_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
Initialize();
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, gameobjectData);
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_eventIndex = EVENT_INDEX_NONE;
|
||||
_fallingRocksDummyGUID = ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
|
||||
@@ -55,12 +55,6 @@ struct npc_tott_ozumat_vehicle_big : public ScriptedAI
|
||||
_events.ScheduleEvent(EVENT_CHANGE_TO_SHOCK_SEAT, 2s);
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 seatId, bool apply) override
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
@@ -64,10 +64,6 @@ struct boss_akilzon : public BossAI
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
@@ -75,15 +71,6 @@ struct boss_akilzon : public BossAI
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
/*
|
||||
switch (eventId)
|
||||
{
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,10 +50,6 @@ struct boss_daakara : public BossAI
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -66,6 +66,8 @@ struct boss_halazzi : public BossAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -71,6 +71,8 @@ struct boss_hexlord_malacrass : public BossAI
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -64,8 +64,9 @@ struct boss_janalai : public BossAI
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,8 @@ struct boss_nalorakk : public BossAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -102,15 +102,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* go) override
|
||||
{
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
switch (type)
|
||||
|
||||
@@ -354,7 +354,7 @@ struct npc_zulaman_amanishi_guardian : public ScriptedAI
|
||||
instance->SetData(DATA_TRIGGER_AMANISHI_SAVAGES, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
_EnterEvadeMode();
|
||||
|
||||
@@ -582,7 +582,6 @@ class spell_venom_withdrawal : public SpellScript
|
||||
// Let's do our own knockback to make sure that we hit our sniffed position
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
float moveTimeHalf = 15.0f / Movement::gravity;
|
||||
float dist = 2 * moveTimeHalf * 15.0f;
|
||||
float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -15.0f);
|
||||
|
||||
Movement::MoveSplineInit init(GetHitUnit());
|
||||
|
||||
@@ -411,7 +411,7 @@ class spell_kilnara_wave_of_agony_dummy : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_kilnara_wave_of_agony_dummy);
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
|
||||
@@ -622,7 +622,7 @@ struct spell_jindo_call_spirit : public SpellScript
|
||||
return ValidateSpellInfo({ SPELL_SUMMON_SPIRIT });
|
||||
}
|
||||
|
||||
void HandleDummyEffect(SpellEffIndex effIndex)
|
||||
void HandleDummyEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_SPIRIT, false);
|
||||
}
|
||||
@@ -653,7 +653,7 @@ struct spell_jindo_body_slam : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_jindo_body_slam);
|
||||
|
||||
void HandleShieldBreakEffect(SpellEffIndex effIndex)
|
||||
void HandleShieldBreakEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* target = GetHitCreature();
|
||||
if (!target)
|
||||
|
||||
@@ -433,7 +433,7 @@ struct npc_zanzil_zanzili_berserker : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* victim, const SpellInfo* spellInfo)
|
||||
void SpellHitTarget(Unit* victim, const SpellInfo* spellInfo) override
|
||||
{
|
||||
if (!victim)
|
||||
return;
|
||||
@@ -528,7 +528,7 @@ class spell_zanzil_zanzils_resurrection_elixir : public AuraScript
|
||||
GetTarget()->CastSpell(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), GetSpellInfo()->Effects[EFFECT_1].TriggerSpell, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_zanzil_zanzils_resurrection_elixir::HandlePeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
@@ -66,11 +66,6 @@ class instance_zulgurub : public InstanceMapScript
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
LoadDoorData(doorData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_defeatedBossesCount = 0;
|
||||
_killedGurubashiSpiritWarriorMask = 0;
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ struct npc_zulgurub_gurubashi_berserker: public ScriptedAI
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* victim, const SpellInfo* spellInfo)
|
||||
void SpellHitTarget(Unit* victim, const SpellInfo* spellInfo) override
|
||||
{
|
||||
if (!victim)
|
||||
return;
|
||||
|
||||
@@ -131,7 +131,7 @@ struct npc_cameron : public ScriptedAI
|
||||
me->SetHomePosition(MovePosPositions.back());
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId, uint32 pathId)
|
||||
void WaypointReached(uint32 waypointId, uint32 pathId) override
|
||||
{
|
||||
switch (pathId)
|
||||
{
|
||||
|
||||
@@ -813,7 +813,7 @@ struct npc_brazie_spot : public ScriptedAI
|
||||
_currentEntry = me->GetEntry();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
@@ -1005,7 +1005,7 @@ struct npc_brazie_zombie : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
if (Unit* summoner = summon->GetSummoner())
|
||||
@@ -1224,7 +1224,7 @@ class spell_brazie_highlight : public SpellScript
|
||||
dest.Relocate(EmptySpotPositions[0]);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_brazie_highlight::SetDest, EFFECT_1, TARGET_DEST_NEARBY_ENTRY);
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ class spell_brazie_create_random_seed_sack : public SpellScript
|
||||
dest.Relocate(FreezyaSeedSummonPos);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_brazie_create_random_seed_sack::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
|
||||
}
|
||||
|
||||
@@ -85,16 +85,13 @@ class instance_halls_of_origination : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_brannIntroStarted = 0;
|
||||
_deadElementals = 0;
|
||||
_anraphetInitialized = false;
|
||||
_vaultOfLightState = NOT_STARTED;
|
||||
}
|
||||
|
||||
|
||||
void OnPlayerEnter(Player* /*player*/) override
|
||||
{
|
||||
if (!_anraphetInitialized)
|
||||
|
||||
@@ -138,7 +138,7 @@ class boss_siamat : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CALL_OF_SKY, Seconds(13));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
DespawnServants();
|
||||
|
||||
@@ -96,11 +96,6 @@ class instance_lost_city_of_the_tolvir : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
heroicAughSpawned = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ struct boss_alakir : public BossAI
|
||||
summons.DespawnEntry(NPC_SLIPSTREAM);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
if (instance->GetBossState(DATA_CONCLAVE_OF_WIND) == DONE)
|
||||
@@ -989,7 +989,7 @@ class spell_alakir_wind_burst : public AuraScript
|
||||
GetTarget()->SetCanFly(true, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_alakir_wind_burst::HandlePeriodic, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
@@ -1013,7 +1013,7 @@ class spell_alakir_lightning_clouds_periodic : public AuraScript
|
||||
target->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_LIGHTNING_CLOUDS_VISUAL_DEST);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_alakir_lightning_clouds_periodic::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ struct boss_anshal : public BossAI
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 1s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
@@ -488,7 +488,7 @@ struct boss_nezir : public BossAI
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 1s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
@@ -720,7 +720,7 @@ struct boss_rohash : public BossAI
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 1s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
@@ -1079,7 +1079,7 @@ class spell_conclave_of_wind_teleport_to_center : public SpellScript
|
||||
dest.Relocate(creature->GetHomePosition());
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_conclave_of_wind_teleport_to_center::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ class spell_conclave_of_wind_winds : public AuraScript
|
||||
owner->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, damage, owner, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_conclave_of_wind_winds::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ struct npc_slipstream : public NullCreatureAI
|
||||
me->SetExtraUnitMovementFlags(MOVEMENTFLAG2_NO_STRAFE | MOVEMENTFLAG2_NO_JUMPING);
|
||||
}
|
||||
|
||||
void OnSpellClick(Unit* clicker, bool& result)
|
||||
void OnSpellClick(Unit* clicker, bool& result) override
|
||||
{
|
||||
if (!clicker)
|
||||
return;
|
||||
|
||||
@@ -294,7 +294,7 @@ class npc_rock_borer : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
if (Creature* corborus = _instance->GetCreature(DATA_CORBORUS))
|
||||
corborus->AI()->JustSummoned(me);
|
||||
|
||||
@@ -207,7 +207,7 @@ class spell_ozruk_rupture : public AuraScript
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ozruk_rupture::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ class spell_ozuruk_rupture_summon : public SpellScript
|
||||
dest.Relocate({ x, y, z, pos.GetOrientation() });
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_ozuruk_rupture_summon::SetDest, EFFECT_0, TARGET_DEST_CASTER_FRONT);
|
||||
}
|
||||
|
||||
@@ -56,11 +56,6 @@ class instance_stonecore : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_initialSetupDone = false;
|
||||
_eventIndex = EVENT_INDEX_NONE;
|
||||
}
|
||||
|
||||
@@ -1443,8 +1443,6 @@ class spell_dk_army_of_the_dead : public AuraScript
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_army_of_the_dead::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
|
||||
}
|
||||
private:
|
||||
uint32 absorbPct;
|
||||
};
|
||||
|
||||
// -49588 Unholy Command
|
||||
|
||||
@@ -1158,7 +1158,7 @@ class spell_dru_solar_beam : public AuraScript
|
||||
GetTarget()->CastSpell(dyn->GetPositionX(), dyn->GetPositionY(), dyn->GetPositionZ(), SPELL_DRUID_SOLAR_BEAM_SILENCE, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dru_solar_beam::HandleEffectPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
@@ -1287,7 +1287,7 @@ class spell_dru_rejuvenation : public AuraScript
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_dru_rejuvenation::AfterApply, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_dru_rejuvenation::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
|
||||
@@ -1330,7 +1330,7 @@ class spell_dru_tree_of_life : public AuraScript
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_dru_tree_of_life::AfterApply, EFFECT_0, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_dru_tree_of_life::AfterRemove, EFFECT_0, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL);
|
||||
@@ -1446,7 +1446,7 @@ class spell_dru_wild_mushroom : public SpellScript
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterCast += SpellCastFn(spell_dru_wild_mushroom::HandleSummon);
|
||||
}
|
||||
|
||||
@@ -4536,7 +4536,7 @@ class spell_gen_armor_specialization : public SpellScriptLoader
|
||||
player->CastSpell(player, spellId, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_armor_specialization_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
@@ -4576,7 +4576,7 @@ class spell_gen_pvp_trinket : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_pvp_trinket_SpellScript::HandlePvPTrinketVisual);
|
||||
}
|
||||
@@ -4634,7 +4634,7 @@ class spell_gen_blink : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_gen_blink_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_blink_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
@@ -4664,7 +4664,7 @@ public:
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_gen_toxic_blow_dart_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
@@ -4725,7 +4725,7 @@ class spell_gen_projectile_goods : public SpellScriptLoader
|
||||
GetCaster()->CastSpell(GetHitUnit(), spellId, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_projectile_goods_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
@@ -4919,7 +4919,7 @@ class spell_gen_gilneas_prison_periodic_dummy : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_gilneas_prison_periodic_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
@@ -4958,7 +4958,7 @@ class spell_gen_throw_torch : public SpellScriptLoader
|
||||
player->KilledMonsterCredit(CREDIT_ROUND_UP_WORGEN);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_gen_throw_torch_SpellScript::HandleEffect);
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ class spell_warl_pet_scaling_06 : public AuraScript
|
||||
amount += int32(meleeHaste);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_06::CalculateMeleeHasteAmount, EFFECT_0, SPELL_AURA_MOD_CRIT_PCT);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_06::CalculateMeleeHasteAmount, EFFECT_1, SPELL_AURA_MELEE_SLOW);
|
||||
@@ -594,7 +594,7 @@ class spell_hun_pet_scaling_03 : public AuraScript
|
||||
amount = uint32(owner->GetResistance(SpellSchoolMask(GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue)) * 0.4);
|
||||
}
|
||||
|
||||
void CalculateArmorAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
|
||||
void CalculateArmorAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
canBeRecalculated = true;
|
||||
if (Pet* pet = GetUnitOwner()->ToPet())
|
||||
@@ -700,7 +700,7 @@ class spell_hun_pet_scaling_05 : public AuraScript
|
||||
amount += int32(meleeHaste);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_05::CalculateMeleeHasteAmount, EFFECT_0, SPELL_AURA_MOD_CRIT_PCT);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_05::CalculateMeleeHasteAmount, EFFECT_1, SPELL_AURA_MELEE_SLOW);
|
||||
@@ -972,7 +972,7 @@ class spell_dk_pet_scaling_05 : public AuraScript
|
||||
amount += owner->GetInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_05::CalculateAmountCritPct, EFFECT_0, SPELL_AURA_MOD_CRIT_PCT);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_05::CalculateAmountResistance, EFFECT_2, SPELL_AURA_MOD_TARGET_RESISTANCE);
|
||||
|
||||
@@ -1257,12 +1257,6 @@ class spell_pri_holy_word_sanctuary_triggered : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_holy_word_sanctuary_triggered);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_targets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitHeal() && _targets > 6)
|
||||
@@ -1281,7 +1275,7 @@ class spell_pri_holy_word_sanctuary_triggered : public SpellScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _targets;
|
||||
uint32 _targets = 0;
|
||||
};
|
||||
|
||||
// -81659 - Evangelism
|
||||
@@ -1430,7 +1424,7 @@ class spell_power_word_barrier : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_power_word_barrier);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
TempSummon* summon = GetCaster()->ToTempSummon();
|
||||
if (!summon)
|
||||
@@ -1457,7 +1451,7 @@ class spell_power_word_barrier : public AuraScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool _glyphEnabled;
|
||||
bool _glyphEnabled = false;
|
||||
};
|
||||
|
||||
// -89488 - Strength of Soul
|
||||
|
||||
@@ -1633,12 +1633,6 @@ class spell_sha_healing_rain_triggered : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sha_healing_rain_triggered);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_targets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
_targets = unitList.size();
|
||||
|
||||
@@ -269,14 +269,6 @@ Compression = 1
|
||||
|
||||
PlayerLimit = 0
|
||||
|
||||
#
|
||||
# SaveRespawnTimeImmediately
|
||||
# Description: Save respawn time for creatures at death and gameobjects at use/open.
|
||||
# Default: 1 - (Enabled, Save respawn time immediately)
|
||||
# 0 - (Disabled, Save respawn time at grid unloading)
|
||||
|
||||
SaveRespawnTimeImmediately = 1
|
||||
|
||||
#
|
||||
# MaxOverspeedPings
|
||||
# Description: Maximum overspeed ping count before character is disconnected.
|
||||
|
||||
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user