Core: Fix more warnings
--HG-- branch : trunk
This commit is contained in:
@@ -481,7 +481,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
|
||||
//disable npcflags
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
|
||||
sLog.outDebug("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
|
||||
sLog.outDebug("TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
|
||||
|
||||
CurrentWP = WaypointList.begin();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ void ArenaTeamMember::ModifyPersonalRating(Player* plr, int32 mod, uint32 slot)
|
||||
plr->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, personal_rating);
|
||||
}
|
||||
|
||||
void ArenaTeamMember::ModifyMatchmakerRating(int32 mod, uint32 slot)
|
||||
void ArenaTeamMember::ModifyMatchmakerRating(int32 mod, uint32 /*slot*/)
|
||||
{
|
||||
if (int32(matchmaker_rating) + mod < 0)
|
||||
matchmaker_rating = 0;
|
||||
|
||||
@@ -44,7 +44,7 @@ BattlegroundAV::~BattlegroundAV()
|
||||
{
|
||||
}
|
||||
|
||||
const uint16 BattlegroundAV::GetBonusHonor(uint8 kills) //TODO: move this function to Battleground.cpp (needs to find a way to get m_MaxLevel)
|
||||
uint16 BattlegroundAV::GetBonusHonor(uint8 kills) //TODO: move this function to Battleground.cpp (needs to find a way to get m_MaxLevel)
|
||||
{
|
||||
return Trinity::Honor::hk_honor_at_level(m_MaxLevel, kills);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
|
||||
DelCreature(node + 302);//NULL checks are in DelCreature! 0-302 spirit guides
|
||||
}
|
||||
|
||||
const BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
{
|
||||
sLog.outDebug("bg_AV getnodethroughobject %i",object);
|
||||
if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER)
|
||||
@@ -817,7 +817,7 @@ const BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
return BG_AV_Nodes(0);
|
||||
}
|
||||
|
||||
const uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
|
||||
uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
|
||||
{ //this function is the counterpart to GetNodeThroughObject()
|
||||
sLog.outDebug("bg_AV GetObjectThroughNode %i",node);
|
||||
if (m_Nodes[node].Owner == ALLIANCE)
|
||||
@@ -1101,7 +1101,7 @@ void BattlegroundAV::FillInitialWorldStates(WorldPacket& data)
|
||||
SendMineWorldStates(AV_SOUTH_MINE);
|
||||
}
|
||||
|
||||
const uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used for node worldstates and returns values which fit good into the worldstatesarray
|
||||
uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used for node worldstates and returns values which fit good into the worldstatesarray
|
||||
{
|
||||
//neutral stuff cant get handled (currently its only snowfall)
|
||||
ASSERT(team != AV_NEUTRAL_TEAM);
|
||||
|
||||
@@ -1582,23 +1582,23 @@ class BattlegroundAV : public Battleground
|
||||
void PopulateNode(BG_AV_Nodes node);
|
||||
void DePopulateNode(BG_AV_Nodes node);
|
||||
|
||||
const BG_AV_Nodes GetNodeThroughObject(uint32 object);
|
||||
const uint32 GetObjectThroughNode(BG_AV_Nodes node);
|
||||
BG_AV_Nodes GetNodeThroughObject(uint32 object);
|
||||
uint32 GetObjectThroughNode(BG_AV_Nodes node);
|
||||
const char* GetNodeName(BG_AV_Nodes node);
|
||||
const bool IsTower(BG_AV_Nodes node) { return m_Nodes[node].Tower; }
|
||||
bool IsTower(BG_AV_Nodes node) { return m_Nodes[node].Tower; }
|
||||
|
||||
/*mine*/
|
||||
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
|
||||
|
||||
/*worldstates*/
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
const uint8 GetWorldStateType(uint8 state, uint16 team);
|
||||
uint8 GetWorldStateType(uint8 state, uint16 team);
|
||||
void SendMineWorldStates(uint32 mine);
|
||||
void UpdateNodeWorldState(BG_AV_Nodes node);
|
||||
|
||||
/*general */
|
||||
Creature* AddAVCreature(uint16 cinfoid, uint16 type);
|
||||
const uint16 GetBonusHonor(uint8 kills); //TODO remove this when the core handles this right
|
||||
uint16 GetBonusHonor(uint8 kills); //TODO remove this when the core handles this right
|
||||
|
||||
/*variables */
|
||||
int32 m_Team_Scores[2];
|
||||
|
||||
@@ -102,7 +102,7 @@ bool ChatHandler::HandleGMTicketListClosedCommand(const char* /*args*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGMTicketListEscalatedCommand(const char* args)
|
||||
bool ChatHandler::HandleGMTicketListEscalatedCommand(const char* /*args*/)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_TICKETSHOWESCALATEDLIST);
|
||||
for (GmTicketList::iterator itr = sTicketMgr.m_GMTicketList.begin(); itr != sTicketMgr.m_GMTicketList.end(); ++itr)
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef std::map<uint32,uint32> AreaFlagByMapID;
|
||||
|
||||
struct WMOAreaTableTripple
|
||||
{
|
||||
WMOAreaTableTripple(int32 r, int32 a, int32 g) : rootId(r), adtId(a), groupId(g)
|
||||
WMOAreaTableTripple(int32 r, int32 a, int32 g) : groupId(g), rootId(r), adtId(a)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2360,7 +2360,7 @@ uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 us
|
||||
|
||||
time_t ptime = time(NULL);
|
||||
|
||||
if (vCount->lastIncrementTime + vItem->incrtime <= ptime)
|
||||
if (time_t(vCount->lastIncrementTime + vItem->incrtime) <= ptime)
|
||||
{
|
||||
ItemPrototype const* pProto = sObjectMgr.GetItemPrototype(vItem->item);
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ void Minion::RemoveFromWorld()
|
||||
|
||||
bool Minion::IsGuardianPet() const
|
||||
{
|
||||
return isPet() || m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET;
|
||||
return isPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET);
|
||||
}
|
||||
|
||||
Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner)
|
||||
|
||||
@@ -1000,7 +1000,7 @@ uint8 Item::GetGemCountWithLimitCategory(uint32 limitCategory) const
|
||||
bool Item::IsLimitedToAnotherMapOrZone(uint32 cur_mapId, uint32 cur_zoneId) const
|
||||
{
|
||||
ItemPrototype const* proto = GetProto();
|
||||
return proto && (proto->Map && proto->Map != cur_mapId || proto->Area && proto->Area != cur_zoneId);
|
||||
return proto && ((proto->Map && proto->Map != cur_mapId) || (proto->Area && proto->Area != cur_zoneId));
|
||||
}
|
||||
|
||||
// Though the client has the information in the item's data field,
|
||||
|
||||
@@ -2370,8 +2370,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
|
||||
float step = dist/10.0f;
|
||||
|
||||
int j = 0;
|
||||
for (j; j < 10; j++)
|
||||
for (uint8 j = 0; j < 10; ++j)
|
||||
{
|
||||
// do not allow too big z changes
|
||||
if (fabs(pos.m_positionZ - destz) > 6)
|
||||
|
||||
@@ -615,7 +615,7 @@ void Creature::Regenerate(Powers power)
|
||||
// Apply modifiers (if any).
|
||||
AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
|
||||
if ((*i)->GetMiscValue() == power)
|
||||
if (Powers((*i)->GetMiscValue()) == power)
|
||||
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
|
||||
|
||||
addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (isHunterPet()? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
|
||||
|
||||
@@ -2237,7 +2237,7 @@ void Player::Regenerate(Powers power)
|
||||
{
|
||||
AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
|
||||
if ((*i)->GetMiscValue() == power)
|
||||
if (Powers((*i)->GetMiscValue()) == power)
|
||||
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
|
||||
|
||||
// Butchery requires combat for this effect
|
||||
@@ -17484,7 +17484,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
|
||||
|
||||
if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_MAP, target_map, this))
|
||||
{
|
||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_INSTANCE_CLOSED));
|
||||
GetSession()->SendAreaTriggerMessage("%s", GetSession()->GetTrinityString(LANG_INSTANCE_CLOSED));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17505,7 +17505,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
|
||||
if (report)
|
||||
{
|
||||
if (missingQuest && !ar->questFailedText.empty())
|
||||
ChatHandler(GetSession()).PSendSysMessage(ar->questFailedText.c_str());
|
||||
ChatHandler(GetSession()).PSendSysMessage("%s", ar->questFailedText.c_str());
|
||||
else if (mapDiff->hasErrorMessage) // if (missingAchievement) covered by this case
|
||||
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty);
|
||||
else if (missingItem)
|
||||
@@ -18256,7 +18256,7 @@ void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint
|
||||
<< "',position_z='"<<z<<"',orientation='"<<o<<"',map='"<<mapid
|
||||
<< "',zone='"<<zone<<"',trans_x='0',trans_y='0',trans_z='0',"
|
||||
<< "transguid='0',taxi_path='' WHERE guid='"<< GUID_LOPART(guid) <<"'";
|
||||
sLog.outDebug(ss.str().c_str());
|
||||
sLog.outDebug("%s", ss.str().c_str());
|
||||
CharacterDatabase.Execute(ss.str().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -155,10 +155,10 @@ void Player::UpdateSpellDamageAndHealingBonus()
|
||||
|
||||
bool Player::UpdateAllStats()
|
||||
{
|
||||
for (int i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
for (int8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
{
|
||||
float value = GetTotalStatValue(Stats(i));
|
||||
SetStat(Stats(i), (int32)value);
|
||||
SetStat(Stats(i), int32(value));
|
||||
}
|
||||
|
||||
UpdateArmor();
|
||||
@@ -166,7 +166,7 @@ bool Player::UpdateAllStats()
|
||||
UpdateAttackPowerAndDamage(true);
|
||||
UpdateMaxHealth();
|
||||
|
||||
for (int i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
UpdateMaxPower(Powers(i));
|
||||
|
||||
UpdateAllRatings();
|
||||
@@ -790,10 +790,10 @@ bool Creature::UpdateAllStats()
|
||||
UpdateAttackPowerAndDamage();
|
||||
UpdateAttackPowerAndDamage(true);
|
||||
|
||||
for (int i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
UpdateMaxPower(Powers(i));
|
||||
|
||||
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
UpdateResistances(i);
|
||||
|
||||
return true;
|
||||
@@ -1036,13 +1036,13 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
|
||||
bool Guardian::UpdateAllStats()
|
||||
{
|
||||
for (int i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
UpdateStats(Stats(i));
|
||||
|
||||
for (int i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
UpdateMaxPower(Powers(i));
|
||||
|
||||
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
UpdateResistances(i);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -3274,7 +3274,11 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target)
|
||||
return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact
|
||||
|
||||
// weapon skill or (unarmed for base attack and fist weapons)
|
||||
uint32 skill = item && item->GetSkill() != SKILL_FIST_WEAPONS ? item->GetSkill() : SKILL_UNARMED;
|
||||
uint32 skill;
|
||||
if (item && item->GetSkill() != SKILL_FIST_WEAPONS)
|
||||
skill = item->GetSkill();
|
||||
else
|
||||
skill = SKILL_UNARMED;
|
||||
|
||||
// in PvP use full skill instead current skill value
|
||||
value = (target && target->IsControlledByPlayer())
|
||||
@@ -7350,9 +7354,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
{
|
||||
if (ToPlayer()->HasSpellCooldown(16166))
|
||||
{
|
||||
uint32 newCooldownDelay = ToPlayer()->GetSpellCooldownDelay(16166) - 2;
|
||||
if (newCooldownDelay < 0) newCooldownDelay = 0;
|
||||
ToPlayer()->AddSpellCooldown(16166,0, uint32(time(NULL) + newCooldownDelay));
|
||||
uint32 newCooldownDelay = ToPlayer()->GetSpellCooldownDelay(16166);
|
||||
if (newCooldownDelay < 3)
|
||||
newCooldownDelay = 0;
|
||||
else
|
||||
newCooldownDelay -= 2;
|
||||
ToPlayer()->AddSpellCooldown(16166,0, uint32(time(NULL) + newCooldownDelay));
|
||||
|
||||
WorldPacket data(SMSG_MODIFY_COOLDOWN, 4+8+4);
|
||||
data << uint32(16166); // Spell ID
|
||||
@@ -9636,7 +9643,7 @@ Guardian* Unit::GetGuardianPet() const
|
||||
if (pet->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
|
||||
return (Guardian*)pet;
|
||||
|
||||
sLog.outCrash("Unit::GetGuardianPet: Guardian " I64FMT " not exist.", pet_guid);
|
||||
sLog.outCrash("Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid);
|
||||
const_cast<Unit*>(this)->SetPetGUID(0);
|
||||
}
|
||||
|
||||
@@ -9848,7 +9855,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (!AddUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
|
||||
sLog.outCrash("Player %s is trying to charm unit %u, but it already has a charmed unit %u", GetName(), charm->GetEntry(), GetCharmGUID());
|
||||
sLog.outCrash("Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
|
||||
|
||||
charm->m_ControlledByPlayer = true;
|
||||
// TODO: maybe we can use this flag to check if controlled by player
|
||||
@@ -9861,7 +9868,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
|
||||
|
||||
if (!charm->AddUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
|
||||
sLog.outCrash("Unit %u is being charmed, but it already has a charmer %u", charm->GetEntry(), charm->GetCharmerGUID());
|
||||
sLog.outCrash("Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
|
||||
|
||||
if (charm->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
|
||||
{
|
||||
@@ -9876,11 +9883,11 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (!RemoveUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
|
||||
sLog.outCrash("Player %s is trying to uncharm unit %u, but it has another charmed unit %u", GetName(), charm->GetEntry(), GetCharmGUID());
|
||||
sLog.outCrash("Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
|
||||
}
|
||||
|
||||
if (!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
|
||||
sLog.outCrash("Unit %u is being uncharmed, but it has another charmer %u", charm->GetEntry(), charm->GetCharmerGUID());
|
||||
sLog.outCrash("Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
|
||||
|
||||
if (charm->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -10011,11 +10018,11 @@ void Unit::RemoveAllControlled()
|
||||
sLog.outError("Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
|
||||
}
|
||||
if (GetPetGUID())
|
||||
sLog.outCrash("Unit %u is not able to release its pet " I64FMT, GetEntry(), GetPetGUID());
|
||||
sLog.outCrash("Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID());
|
||||
if (GetMinionGUID())
|
||||
sLog.outCrash("Unit %u is not able to release its minion " I64FMT, GetEntry(), GetMinionGUID());
|
||||
sLog.outCrash("Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID());
|
||||
if (GetCharmGUID())
|
||||
sLog.outCrash("Unit %u is not able to release its charm " I64FMT, GetEntry(), GetCharmGUID());
|
||||
sLog.outCrash("Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID());
|
||||
}
|
||||
|
||||
Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
|
||||
@@ -11117,7 +11124,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
||||
{
|
||||
if (spellProto->Effect[j] == SPELL_EFFECT_HEALTH_LEECH ||
|
||||
spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH)
|
||||
(spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH))
|
||||
{
|
||||
CastingTime /= 2;
|
||||
break;
|
||||
@@ -14718,7 +14725,7 @@ void Unit::SetContestedPvP(Player *attackedPlayer)
|
||||
{
|
||||
Player* player = GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
|
||||
if (!player || (attackedPlayer && (attackedPlayer == player || player->duel && player->duel->opponent == attackedPlayer)))
|
||||
if (!player || (attackedPlayer && (attackedPlayer == player || (player->duel && player->duel->opponent == attackedPlayer))))
|
||||
return;
|
||||
|
||||
player->SetContestedPvPTimer(30000);
|
||||
@@ -15179,7 +15186,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
// only if not player and not controlled by player pet. And not at BG
|
||||
if ((durabilityLoss && !player && !pVictim->ToPlayer()->InBattleground()) || (player && sWorld.getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
|
||||
{
|
||||
sLog.outStaticDebug("We are dead, losing %u percent durability", sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH));
|
||||
sLog.outStaticDebug("We are dead, losing %f percent durability", sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH));
|
||||
pVictim->ToPlayer()->DurabilityLossAll(sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH),false);
|
||||
// durability lost message
|
||||
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
|
||||
|
||||
@@ -79,7 +79,12 @@ uint32 GameEventMgr::NextCheck(uint16 entry) const
|
||||
|
||||
// for CONDITIONS state world events, return the length of the wait period, so if the conditions are met, this check will be called again to set the timer as NEXTPHASE event
|
||||
if (mGameEvent[entry].state == GAMEEVENT_WORLD_CONDITIONS)
|
||||
return mGameEvent[entry].length ? mGameEvent[entry].length * 60 : max_ge_check_delay;
|
||||
{
|
||||
if (mGameEvent[entry].length)
|
||||
return mGameEvent[entry].length * 60 ;
|
||||
else
|
||||
return max_ge_check_delay;
|
||||
}
|
||||
|
||||
// outdated event: we return max
|
||||
if (currenttime > mGameEvent[entry].end)
|
||||
@@ -1710,7 +1715,7 @@ bool IsHolidayActive(HolidayIds id)
|
||||
GameEventMgr::ActiveEvents const& ae = sGameEventMgr.GetActiveEventList();
|
||||
|
||||
for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
|
||||
if (events[*itr].holiday_id == uint32(id))
|
||||
if (events[*itr].holiday_id == id)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -848,7 +848,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureInfo const* cInfo)
|
||||
|
||||
if (cInfo->expansion > (MAX_CREATURE_BASE_HP - 1))
|
||||
{
|
||||
sLog.outErrorDb("Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->expansion);
|
||||
sLog.outErrorDb("Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion);
|
||||
const_cast<CreatureInfo*>(cInfo)->expansion = 0;
|
||||
}
|
||||
|
||||
@@ -1186,7 +1186,7 @@ void ObjectMgr::LoadCreatureLinkedRespawn()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outErrorDb(">> Loaded 0 linked respawns. DB table `creature_linked_respawn` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1207,7 +1207,7 @@ void ObjectMgr::LoadCreatureLinkedRespawn()
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u linked respawns", mCreatureLinkedRespawnMap.size());
|
||||
sLog.outString(">> Loaded " UI64FMTD " linked respawns", uint64(mCreatureLinkedRespawnMap.size()));
|
||||
}
|
||||
|
||||
bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid)
|
||||
@@ -2447,7 +2447,7 @@ void ObjectMgr::LoadItemSetNameLocales()
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %lu Item set name locale strings", (uint32)mItemSetNameLocaleMap.size());
|
||||
sLog.outString(">> Loaded " UI64FMTD " Item set name locale strings", uint64(mItemSetNameLocaleMap.size()));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadItemSetNames()
|
||||
@@ -2764,7 +2764,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
|
||||
bool found = false;
|
||||
for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x)
|
||||
{
|
||||
if (entry->ItemId[x] == itemId)
|
||||
if (entry->ItemId[x] > 0 && uint32(entry->ItemId[x]) == itemId)
|
||||
{
|
||||
found = true;
|
||||
const_cast<CharStartOutfitEntry*>(entry)->ItemId[x] = 0;
|
||||
@@ -3103,16 +3103,11 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
uint8 current_level = fields[1].GetUInt8();
|
||||
uint8 current_level = fields[1].GetUInt8(); // Can't be > than STRONG_MAX_LEVEL (hardcoded level maximum) due to var type
|
||||
if (current_level > sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
|
||||
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
|
||||
else
|
||||
{
|
||||
sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
|
||||
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
|
||||
}
|
||||
sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
|
||||
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4961,7 +4956,7 @@ void ObjectMgr::LoadSpellScriptNames()
|
||||
|
||||
if (allRanks)
|
||||
{
|
||||
if (sSpellMgr.GetFirstSpellInChain(spellId) != spellId)
|
||||
if (sSpellMgr.GetFirstSpellInChain(spellId) != uint32(spellId))
|
||||
{
|
||||
sLog.outErrorDb("Scriptname:`%s` spell (spell_id:%d) is not first rank of spell.",scriptName,fields[0].GetInt32());
|
||||
continue;
|
||||
@@ -5079,7 +5074,7 @@ void ObjectMgr::LoadPageTexts()
|
||||
ss << *itr << " ";
|
||||
ss << "create(s) a circular reference, which can cause the server to freeze. Changing Next_Page of page "
|
||||
<< pageItr->Page_ID <<" to 0";
|
||||
sLog.outErrorDb(ss.str().c_str());
|
||||
sLog.outErrorDb("%s", ss.str().c_str());
|
||||
const_cast<PageText*>(pageItr)->Next_Page = 0;
|
||||
break;
|
||||
}
|
||||
@@ -6987,7 +6982,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
||||
void ObjectMgr::LoadPointsOfInterest()
|
||||
{
|
||||
mPointsOfInterest.clear(); // need for reload case
|
||||
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6
|
||||
@@ -7039,7 +7034,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
||||
void ObjectMgr::LoadQuestPOI()
|
||||
{
|
||||
mQuestPOIMap.clear(); // need for reload case
|
||||
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3
|
||||
@@ -8857,7 +8852,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
uint8 Level = fields[0].GetUInt32();
|
||||
uint8 Level = fields[0].GetUInt8();
|
||||
uint8 Class = fields[1].GetUInt8();
|
||||
|
||||
CreatureBaseStats stats;
|
||||
@@ -8866,13 +8861,14 @@ void ObjectMgr::LoadCreatureClassLevelStats()
|
||||
stats.BaseMana = fields[5].GetUInt32();
|
||||
stats.BaseArmor = fields[6].GetUInt32();
|
||||
|
||||
/* With uint8 Level can't be greater than STRONG_MAX_LEVEL
|
||||
if (Level > STRONG_MAX_LEVEL)
|
||||
{
|
||||
sLog.outErrorDb("Creature base stats for class %u has invalid level %u (max is %u) - set to %u",
|
||||
Class, Level, STRONG_MAX_LEVEL, STRONG_MAX_LEVEL);
|
||||
Level = STRONG_MAX_LEVEL;
|
||||
}
|
||||
|
||||
*/
|
||||
if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0)
|
||||
sLog.outErrorDb("Creature base stats for level %u has invalid class %u",
|
||||
Level, Class);
|
||||
|
||||
@@ -1109,7 +1109,6 @@ void Group::SendUpdate()
|
||||
data << uint8(citr->flags);
|
||||
if (isLFGGroup())
|
||||
{
|
||||
uint32 lowguid = GetLowGUID();
|
||||
data << uint8(1);
|
||||
data << uint8(m_LfgStatus);
|
||||
data << uint32(m_LfgDungeonEntry);
|
||||
@@ -1728,7 +1727,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo)
|
||||
{
|
||||
InstanceSave *p = itr->second.save;
|
||||
const MapEntry *entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() != isRaid || !p->CanReset() && method != INSTANCE_RESET_GROUP_DISBAND)
|
||||
if (!entry || entry->IsRaid() != isRaid || (!p->CanReset() && method != INSTANCE_RESET_GROUP_DISBAND))
|
||||
{
|
||||
++itr;
|
||||
continue;
|
||||
@@ -1791,7 +1790,7 @@ InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
|
||||
Difficulty difficulty = GetDifficulty(aMap->IsRaid());
|
||||
|
||||
// some instances only have one difficulty
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(aMap->GetId(),difficulty);
|
||||
GetDownscaledMapDifficultyData(aMap->GetId(),difficulty);
|
||||
|
||||
BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(aMap->GetId());
|
||||
if (itr != m_boundInstances[difficulty].end())
|
||||
@@ -1808,7 +1807,7 @@ InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry)
|
||||
Difficulty difficulty = GetDifficulty(mapEntry->IsRaid());
|
||||
|
||||
// some instances only have one difficulty
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(mapEntry->MapID,difficulty);
|
||||
GetDownscaledMapDifficultyData(mapEntry->MapID,difficulty);
|
||||
|
||||
BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapEntry->MapID);
|
||||
if (itr != m_boundInstances[difficulty].end())
|
||||
@@ -1882,8 +1881,8 @@ void Group::ResetMaxEnchantingLevel()
|
||||
Player *pMember = NULL;
|
||||
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
|
||||
{
|
||||
if (pMember = sObjectMgr.GetPlayer(citr->guid))
|
||||
if (m_maxEnchantingLevel < pMember->GetSkillValue(SKILL_ENCHANTING))
|
||||
m_maxEnchantingLevel = pMember->GetSkillValue(SKILL_ENCHANTING);
|
||||
pMember = sObjectMgr.GetPlayer(citr->guid);
|
||||
if (pMember && m_maxEnchantingLevel < pMember->GetSkillValue(SKILL_ENCHANTING))
|
||||
m_maxEnchantingLevel = pMember->GetSkillValue(SKILL_ENCHANTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ bool Guild::AddMember(uint64 plGuid, uint32 plRank)
|
||||
newmember.Class = fields[3].GetUInt8();
|
||||
newmember.accountId = fields[4].GetInt32();
|
||||
|
||||
if (newmember.Level < 1 || newmember.Level > STRONG_MAX_LEVEL ||
|
||||
if (newmember.Level < 1 || //newmember.Level > STRONG_MAX_LEVEL ||
|
||||
newmember.Class < CLASS_WARRIOR || newmember.Class >= MAX_CLASSES)
|
||||
{
|
||||
sLog.outError("Player (GUID: %u) has a broken data in field `characters` table, cannot add him to guild.",GUID_LOPART(plGuid));
|
||||
@@ -403,7 +403,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
|
||||
newmember.accountId = fields[24].GetInt32();
|
||||
|
||||
//this code will remove unexisting character guids from guild
|
||||
if (newmember.Level < 1 || newmember.Level > STRONG_MAX_LEVEL) // can be at broken `data` field
|
||||
if (newmember.Level < 1 /*|| newmember.Level > STRONG_MAX_LEVEL*/) // can be at broken `data` field
|
||||
{
|
||||
sLog.outError("Player (GUID: %u) has a broken data in field `characters`.`data`, deleting him from guild!",GUID_LOPART(guid));
|
||||
CharacterDatabase.PExecute("DELETE FROM guild_member WHERE guid = '%u'", GUID_LOPART(guid));
|
||||
|
||||
@@ -64,7 +64,7 @@ void InstanceScript::LoadMinionData(const MinionData *data)
|
||||
|
||||
++data;
|
||||
}
|
||||
sLog.outDebug("InstanceScript::LoadMinionData: %u minions loaded.", doors.size());
|
||||
sLog.outDebug("InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
|
||||
}
|
||||
|
||||
void InstanceScript::LoadDoorData(const DoorData *data)
|
||||
@@ -76,7 +76,7 @@ void InstanceScript::LoadDoorData(const DoorData *data)
|
||||
|
||||
++data;
|
||||
}
|
||||
sLog.outDebug("InstanceScript::LoadDoorData: %u doors loaded.", doors.size());
|
||||
sLog.outDebug("InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
|
||||
}
|
||||
|
||||
void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state)
|
||||
@@ -306,10 +306,17 @@ void InstanceScript::DoSendNotifyToInstance(const char *format, ...)
|
||||
InstanceMap::PlayerList::const_iterator i;
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player *pPlayer = i->getSource())
|
||||
if (WorldSession *pSession = pPlayer->GetSession())
|
||||
pSession->SendNotification(format);
|
||||
pSession->SendNotification(format, ap);
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
// Complete Achievement for all players in instance
|
||||
|
||||
@@ -749,13 +749,13 @@ Map::Remove(T *obj, bool remove)
|
||||
|
||||
CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
|
||||
sLog.outError("Map::Remove: Object " I64FMT " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
|
||||
sLog.outError("Map::Remove: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
|
||||
else
|
||||
{
|
||||
Cell cell(p);
|
||||
if (loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)))
|
||||
{
|
||||
sLog.outStaticDebug("Remove object " I64FMT " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
|
||||
sLog.outStaticDebug("Remove object " UI64FMTD " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
|
||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
ASSERT(grid != NULL);
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
|
||||
}
|
||||
|
||||
// some instances only have one difficulty
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(GetId(),difficulty);
|
||||
GetDownscaledMapDifficultyData(GetId(),difficulty);
|
||||
|
||||
sLog.outDebug("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
|
||||
|
||||
@@ -211,7 +211,12 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
|
||||
|
||||
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel());
|
||||
|
||||
uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : REGULAR_DIFFICULTY;
|
||||
uint8 spawnMode;
|
||||
|
||||
if (bracketEntry)
|
||||
spawnMode = bracketEntry->difficulty;
|
||||
else
|
||||
spawnMode = REGULAR_DIFFICULTY;
|
||||
|
||||
BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
|
||||
ASSERT(map->IsBattlegroundOrArena());
|
||||
|
||||
@@ -639,7 +639,7 @@ void PoolMgr::LoadFromDB()
|
||||
ss << *itr << " ";
|
||||
ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool "
|
||||
<< poolItr->first << " and child pool " << poolItr->second;
|
||||
sLog.outErrorDb(ss.str().c_str());
|
||||
sLog.outErrorDb("%s", ss.str().c_str());
|
||||
mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first);
|
||||
mPoolSearchMap.erase(poolItr);
|
||||
--count;
|
||||
|
||||
@@ -1130,19 +1130,19 @@ void AddOutdoorPvPScripts()
|
||||
AddSC_outdoorpvp_si();
|
||||
AddSC_outdoorpvp_tf();
|
||||
AddSC_outdoorpvp_zm();
|
||||
#endif SCRIPTS
|
||||
#endif
|
||||
}
|
||||
|
||||
void AddBattlegroundScripts()
|
||||
{
|
||||
#ifdef SCRIPTS
|
||||
#endif SCRIPTS
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SCRIPTS
|
||||
/* This is where custom scripts' loading functions should be declared. */
|
||||
|
||||
#endif SCRIPTS
|
||||
#endif
|
||||
|
||||
void AddCustomScripts()
|
||||
{
|
||||
|
||||
@@ -182,7 +182,7 @@ void ScriptMgr::Initialize()
|
||||
sLog.outString("Loading C++ scripts");
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
|
||||
FillSpellSummary();
|
||||
AddScripts();
|
||||
@@ -855,7 +855,7 @@ bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger)
|
||||
return tmpscript->OnTrigger(player, trigger);
|
||||
}
|
||||
|
||||
Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId typeId)
|
||||
Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/)
|
||||
{
|
||||
// TODO: Implement script-side battlegrounds.
|
||||
ASSERT(false);
|
||||
|
||||
@@ -44,12 +44,12 @@ void SystemMgr::LoadVersion()
|
||||
Field* pFields = Result->Fetch();
|
||||
|
||||
sLog.outString("TSCR: Database version is: %s", pFields[0].GetString());
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("TSCR: Missing `version`.`script_version` information.");
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,14 +107,14 @@ void SystemMgr::LoadScriptTexts()
|
||||
++uiCount;
|
||||
} while (Result->NextRow());
|
||||
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u additional Script Texts data.", uiCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
|
||||
}
|
||||
}
|
||||
@@ -173,14 +173,14 @@ void SystemMgr::LoadScriptTextsCustom()
|
||||
++uiCount;
|
||||
} while (Result->NextRow());
|
||||
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u additional Custom Texts data.", uiCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
|
||||
}
|
||||
}
|
||||
@@ -197,7 +197,7 @@ void SystemMgr::LoadScriptWaypoints()
|
||||
if (Result)
|
||||
uiCreatureCount = Result->GetRowCount();
|
||||
|
||||
sLog.outString("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
|
||||
sLog.outString("TSCR: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
|
||||
|
||||
Result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
|
||||
|
||||
@@ -235,14 +235,14 @@ void SystemMgr::LoadScriptWaypoints()
|
||||
++uiNodeCount;
|
||||
} while (Result->NextRow());
|
||||
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u Script Waypoint nodes.", uiNodeCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
||||
|
||||
// send new char string if not empty
|
||||
if (!sWorld.GetNewCharString().empty())
|
||||
chH.PSendSysMessage(sWorld.GetNewCharString().c_str());
|
||||
chH.PSendSysMessage("%s", sWorld.GetNewCharString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1032,7 +1032,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
recv_data >> SplitedAmount;
|
||||
}
|
||||
|
||||
if (BankTabSlot >= GUILD_BANK_MAX_SLOTS && BankTabSlot != 0xFF ||
|
||||
if ((BankTabSlot >= GUILD_BANK_MAX_SLOTS && BankTabSlot != 0xFF) ||
|
||||
BankTab >= pGuild->GetPurchasedTabs())
|
||||
{
|
||||
recv_data.rpos(recv_data.wpos()); // prevent additional spam at rejected packet
|
||||
|
||||
@@ -746,7 +746,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||
return;
|
||||
|
||||
// prevent resurrect before 30-sec delay after body release not finished
|
||||
if (corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP) > time_t(time(NULL)))
|
||||
if (time_t(corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(time(NULL)))
|
||||
return;
|
||||
|
||||
if (!corpse->IsWithinDistInMap(GetPlayer(), CORPSE_RECLAIM_RADIUS, true))
|
||||
@@ -1421,7 +1421,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data)
|
||||
_player->SetSeer(_player);
|
||||
break;
|
||||
case 1:
|
||||
sLog.outDebug("Added FarSight " I64FMT " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
|
||||
sLog.outDebug("Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
|
||||
if (WorldObject *target = _player->GetViewpoint())
|
||||
_player->SetSeer(target);
|
||||
else
|
||||
|
||||
@@ -499,21 +499,23 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
||||
recv_data >> guid;
|
||||
|
||||
if (GetPlayer()->IsInWorld())
|
||||
if (Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||
{
|
||||
GetPlayer()->SetMover(mover);
|
||||
if (mover != GetPlayer() && mover->canFly())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
||||
data.append(mover->GetPackGUID());
|
||||
data << uint32(0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
|
||||
GetPlayer()->SetMover(GetPlayer());
|
||||
if (Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||
{
|
||||
GetPlayer()->SetMover(mover);
|
||||
if (mover != GetPlayer() && mover->canFly())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
||||
data.append(mover->GetPackGUID());
|
||||
data << uint32(0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
|
||||
GetPlayer()->SetMover(GetPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +655,7 @@ void WorldSession::HandleEjectPasenger(WorldPacket &data)
|
||||
{
|
||||
if (data.GetOpcode() == CMSG_EJECT_PASSENGER)
|
||||
{
|
||||
if (Vehicle* Vv= _player->GetVehicleKit())
|
||||
if (_player->GetVehicleKit())
|
||||
{
|
||||
uint64 guid;
|
||||
data >> guid;
|
||||
|
||||
@@ -569,7 +569,7 @@ void WorldSession::SendStablePetCallback(QueryResult_AutoPtr result, uint64 guid
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
data.put<uint8>(sizeof(uint64), num); // set real data to placeholder
|
||||
data.put<uint8>(wpos, num); // set real data to placeholder
|
||||
SendPacket(&data);
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void WorldSession::HandleDismissCritter(WorldPacket &recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_DISMISS_CRITTER for GUID %u", guid);
|
||||
sLog.outDebug("WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD "", guid);
|
||||
|
||||
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (GM_Ticket *ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
|
||||
if (sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
|
||||
{
|
||||
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
|
||||
data << uint32(GMTICKET_RESPONSE_FAILURE); // You already have GM ticket
|
||||
@@ -291,7 +291,7 @@ void WorldSession::HandleReportLag(WorldPacket& recv_data)
|
||||
CharacterDatabase.Execute(os.str().c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleGMResponseResolve(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleGMResponseResolve(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
// empty packet
|
||||
GM_Ticket* ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
|
||||
@@ -92,8 +92,6 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
|
||||
data << uint32(view_trade->GetMoney()); // trader gold
|
||||
data << uint32(view_trade->GetSpell()); // spell casted on lowest slot item
|
||||
|
||||
Item *item = NULL;
|
||||
|
||||
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
|
||||
{
|
||||
data << uint8(i); // trade slot number, if not specified, then end of packet
|
||||
@@ -327,7 +325,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
Item* castItem = my_trade->GetSpellCastItem();
|
||||
|
||||
if (!spellEntry || !his_trade->GetItem(TRADE_SLOT_NONTRADED) ||
|
||||
my_trade->HasSpellCastItem() && !castItem)
|
||||
(my_trade->HasSpellCastItem() && !castItem))
|
||||
{
|
||||
clearAcceptTradeMode(my_trade, his_trade);
|
||||
clearAcceptTradeMode(myItems, hisItems);
|
||||
@@ -361,7 +359,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(his_spell_id);
|
||||
Item* castItem = his_trade->GetSpellCastItem();
|
||||
|
||||
if (!spellEntry || !my_trade->GetItem(TRADE_SLOT_NONTRADED) || his_trade->HasSpellCastItem() && !castItem)
|
||||
if (!spellEntry || !my_trade->GetItem(TRADE_SLOT_NONTRADED) || (his_trade->HasSpellCastItem() && !castItem))
|
||||
{
|
||||
delete my_spell;
|
||||
his_trade->SetSpell(0);
|
||||
|
||||
@@ -166,7 +166,7 @@ void WorldSession::LogUnprocessedTail(WorldPacket *packet)
|
||||
sLog.outError("SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)",
|
||||
LookupOpcodeName(packet->GetOpcode()),
|
||||
packet->GetOpcode(),
|
||||
packet->rpos(),packet->wpos());
|
||||
uint32(packet->rpos()), uint32(packet->wpos()));
|
||||
|
||||
packet->print_storage();
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||
sScriptMgr.OnPacketReceive(this, WorldPacket(*new_pct));
|
||||
return HandleAuthSession (*new_pct);
|
||||
case CMSG_KEEP_ALIVE:
|
||||
sLog.outStaticDebug ("CMSG_KEEP_ALIVE ,size: %d", new_pct->size());
|
||||
sLog.outStaticDebug ("CMSG_KEEP_ALIVE ,size: " UI64FMTD, uint64(new_pct->size()));
|
||||
sScriptMgr.OnPacketReceive(this, WorldPacket(*new_pct));
|
||||
return 0;
|
||||
default:
|
||||
|
||||
@@ -1228,7 +1228,7 @@ bool AuraEffect::IsPeriodicTickCrit(Unit * target, Unit const * caster) const
|
||||
return true;
|
||||
}
|
||||
// Rupture - since 3.3.3 can crit
|
||||
if (AuraEffect *AuraRupture = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x100000, 0x0, 0x0, caster->GetGUID()))
|
||||
if (target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x100000, 0x0, 0x0, caster->GetGUID()))
|
||||
{
|
||||
if (caster->isSpellCrit(target, m_spellProto, GetSpellSchoolMask(m_spellProto)))
|
||||
return true;
|
||||
@@ -1604,7 +1604,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
||||
}
|
||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||
{
|
||||
if (GetMiscValue() < 0 || GetMiscValue() >= MAX_POWERS)
|
||||
if (GetMiscValue() < 0 || GetMiscValue() >= int8(MAX_POWERS))
|
||||
break;
|
||||
|
||||
Powers power = Powers(GetMiscValue());
|
||||
@@ -1739,7 +1739,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
{
|
||||
// ignore non positive values (can be result apply spellmods to aura damage
|
||||
if (m_amount < 0 || GetMiscValue() >= MAX_POWERS)
|
||||
if (m_amount < 0 || GetMiscValue() >= int8(MAX_POWERS))
|
||||
return;
|
||||
|
||||
Powers power = Powers(GetMiscValue());
|
||||
@@ -2599,7 +2599,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
|
||||
{
|
||||
case FORM_CAT:
|
||||
// Savage Roar
|
||||
if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
|
||||
if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
|
||||
target->CastSpell(target, 62071, true);
|
||||
// Nurturing Instinct
|
||||
if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0))
|
||||
@@ -2859,12 +2859,22 @@ void AuraEffect::HandlePhase(AuraApplication const * aurApp, uint8 mode, bool ap
|
||||
|
||||
// GM-mode have mask 0xFFFFFFFF
|
||||
if (!target->ToPlayer()->isGameMaster())
|
||||
target->SetPhaseMask((apply) ? GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
|
||||
target->ToPlayer()->GetSession()->SendSetPhaseShift((apply) ? GetMiscValue() : PHASEMASK_NORMAL);
|
||||
{
|
||||
if (apply)
|
||||
target->SetPhaseMask(GetMiscValue(), false);
|
||||
else
|
||||
target->SetPhaseMask(PHASEMASK_NORMAL, false);
|
||||
}
|
||||
|
||||
if (apply)
|
||||
target->ToPlayer()->GetSession()->SendSetPhaseShift(GetMiscValue());
|
||||
else
|
||||
target->ToPlayer()->GetSession()->SendSetPhaseShift(PHASEMASK_NORMAL);
|
||||
}
|
||||
else if (apply)
|
||||
target->SetPhaseMask(GetMiscValue(), false);
|
||||
else
|
||||
target->SetPhaseMask((apply) ? GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
target->SetPhaseMask(PHASEMASK_NORMAL, false);
|
||||
|
||||
// need triggering visibility update base at phase update of not GM invisible (other GMs anyway see in any phases)
|
||||
if (target->GetVisibility() != VISIBILITY_OFF)
|
||||
@@ -6230,7 +6240,7 @@ void AuraEffect::HandleForceReaction(AuraApplication const * aurApp, uint8 mode,
|
||||
player->GetReputationMgr().SendForceReactions();
|
||||
|
||||
// stop fighting if at apply forced rank friendly or at remove real rank friendly
|
||||
if (apply && faction_rank >= REP_FRIENDLY || !apply && player->GetReputationRank(faction_id) >= REP_FRIENDLY)
|
||||
if ((apply && faction_rank >= REP_FRIENDLY) || (!apply && player->GetReputationRank(faction_id) >= REP_FRIENDLY))
|
||||
player->StopAttackFaction(faction_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -2750,7 +2750,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
|
||||
if (maxSize && power != -1)
|
||||
{
|
||||
if (power == POWER_HEALTH)
|
||||
if (Powers(power) == POWER_HEALTH)
|
||||
{
|
||||
if (unitList.size() > maxSize)
|
||||
{
|
||||
@@ -4172,7 +4172,7 @@ void Spell::ExecuteLogEffectInterruptCast(uint8 effIndex, Unit * victim, uint32
|
||||
*m_effectExecuteData[effIndex] << uint32(spellId);
|
||||
}
|
||||
|
||||
void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit * victim, uint32 itemslot, uint32 damage)
|
||||
void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit * victim, uint32 /*itemslot*/, uint32 damage)
|
||||
{
|
||||
InitEffectExecuteData(effIndex);
|
||||
m_effectExecuteData[effIndex]->append(victim->GetPackGUID());
|
||||
@@ -5297,7 +5297,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// Can be area effect, Check only for players and not check if target - caster (spell can have multiply drain/burn effects)
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (Unit* target = m_targets.getUnitTarget())
|
||||
if (target != m_caster && target->getPowerType() != m_spellInfo->EffectMiscValue[i])
|
||||
if (target != m_caster && target->getPowerType() != Powers(m_spellInfo->EffectMiscValue[i]))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
break;
|
||||
}
|
||||
@@ -6054,7 +6054,7 @@ SpellCastResult Spell::CheckItems()
|
||||
// Mana Potion, Rage Potion, Thistle Tea(Rogue), ...
|
||||
if (m_spellInfo->Effect[i] == SPELL_EFFECT_ENERGIZE)
|
||||
{
|
||||
if (m_spellInfo->EffectMiscValue[i] < 0 || m_spellInfo->EffectMiscValue[i] >= MAX_POWERS)
|
||||
if (m_spellInfo->EffectMiscValue[i] < 0 || m_spellInfo->EffectMiscValue[i] >= int8(MAX_POWERS))
|
||||
{
|
||||
failReason = SPELL_FAILED_ALREADY_AT_FULL_POWER;
|
||||
continue;
|
||||
@@ -6982,7 +6982,7 @@ void Spell::CalculateDamageDoneForAllTargets()
|
||||
}
|
||||
}
|
||||
|
||||
int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *multiplier)
|
||||
int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float * /*multiplier*/)
|
||||
{
|
||||
int32 damageDone = 0;
|
||||
unitTarget = unit;
|
||||
|
||||
@@ -858,19 +858,19 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
uint32 effect = 0;
|
||||
uint32 rand = urand(0, 100);
|
||||
|
||||
if (rand >= 0 && rand < 25) // Fireball (25% chance)
|
||||
if (rand < 25) // Fireball (25% chance)
|
||||
effect = ClearSpellId[0];
|
||||
else if (rand >= 25 && rand < 50) // Frostball (25% chance)
|
||||
else if (rand < 50) // Frostball (25% chance)
|
||||
effect = ClearSpellId[1];
|
||||
else if (rand >=50 && rand < 70) // Chain Lighting (25% chance)
|
||||
else if (rand < 70) // Chain Lighting (25% chance)
|
||||
effect = ClearSpellId[2];
|
||||
else if (rand >= 70 && rand < 80) // Polymorph (10% chance)
|
||||
else if (rand < 80) // Polymorph (10% chance)
|
||||
{
|
||||
effect = ClearSpellId[3];
|
||||
if (urand(0, 100) <= 30) // 30% chance to self-cast
|
||||
unitTarget = m_caster;
|
||||
}
|
||||
else if (rand >=80 && rand < 95) // Enveloping Winds (15% chance)
|
||||
else if (rand < 95) // Enveloping Winds (15% chance)
|
||||
effect = ClearSpellId[4];
|
||||
else // Summon Felhund minion (5% chance)
|
||||
{
|
||||
@@ -1524,7 +1524,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (Item *item = m_caster->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
if (m_caster->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
{
|
||||
// Damage is increased by 25% if your off-hand weapon is enchanted with Flametongue.
|
||||
if (m_caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x200000, 0, 0))
|
||||
@@ -2193,7 +2193,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
|
||||
|
||||
void Spell::EffectPowerDrain(SpellEffIndex effIndex)
|
||||
{
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= MAX_POWERS)
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= int8(MAX_POWERS))
|
||||
return;
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->EffectMiscValue[effIndex]);
|
||||
@@ -2247,7 +2247,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
||||
|
||||
void Spell::EffectPowerBurn(SpellEffIndex effIndex)
|
||||
{
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= MAX_POWERS)
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= int8(MAX_POWERS))
|
||||
return;
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->EffectMiscValue[effIndex]);
|
||||
@@ -2647,7 +2647,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
if (!unitTarget->isAlive())
|
||||
return;
|
||||
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= MAX_POWERS)
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= int8(MAX_POWERS))
|
||||
return;
|
||||
|
||||
Powers power = Powers(m_spellInfo->EffectMiscValue[effIndex]);
|
||||
@@ -2749,7 +2749,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
|
||||
if (!unitTarget->isAlive())
|
||||
return;
|
||||
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= MAX_POWERS)
|
||||
if (m_spellInfo->EffectMiscValue[effIndex] < 0 || m_spellInfo->EffectMiscValue[effIndex] >= int8(MAX_POWERS))
|
||||
return;
|
||||
|
||||
Powers power = Powers(m_spellInfo->EffectMiscValue[effIndex]);
|
||||
@@ -2837,8 +2837,8 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
{
|
||||
GameObjectInfo const* goInfo = gameObjTarget->GetGOInfo();
|
||||
// Arathi Basin banner opening !
|
||||
if (goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune ||
|
||||
goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK)
|
||||
if ((goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune) ||
|
||||
(goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK))
|
||||
{
|
||||
//CanUseBattlegroundObject() already called in CheckCast()
|
||||
// in battleground check
|
||||
@@ -4133,7 +4133,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
|
||||
totalDamagePercentMod *= (float(unitTarget->GetDiseasesByCaster(m_caster->GetGUID())) * 12.5f + 100.0f) / 100.0f;
|
||||
|
||||
// Glyph of Blood Strike
|
||||
if (AuraEffect * aurEff = m_caster->GetAuraEffect(59332,0))
|
||||
if (m_caster->GetAuraEffect(59332,0))
|
||||
{
|
||||
if (unitTarget->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED))
|
||||
totalDamagePercentMod *= float((20 + 100.0f) / 100.0f);
|
||||
@@ -4143,7 +4143,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
|
||||
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00000010)
|
||||
{
|
||||
// Glyph of Death Strike
|
||||
if (AuraEffect * aurEff = m_caster->GetAuraEffect(59336,0))
|
||||
if (m_caster->GetAuraEffect(59336,0))
|
||||
{
|
||||
if (uint32 runic = m_caster->GetPower(POWER_RUNIC_POWER))
|
||||
{
|
||||
@@ -4304,7 +4304,7 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|
||||
SpellEntry const* curSpellInfo = spell->m_spellInfo;
|
||||
// check if we can interrupt spell
|
||||
if ((spell->getState() == SPELL_STATE_CASTING
|
||||
|| spell->getState() == SPELL_STATE_PREPARING && spell->GetCastTime() > 0.0f)
|
||||
|| (spell->getState() == SPELL_STATE_PREPARING && spell->GetCastTime() > 0.0f))
|
||||
&& curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
|
||||
{
|
||||
if (m_originalCaster)
|
||||
@@ -4691,7 +4691,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
uint8 slot = 0;
|
||||
Item *item = NULL;
|
||||
|
||||
while (bag < 256)
|
||||
while (bag) // 256 = 0 due to var type
|
||||
{
|
||||
item = m_caster->ToPlayer()->GetItemByPos(bag, slot);
|
||||
if (item && item->GetEntry() == 38587) break;
|
||||
@@ -4702,7 +4702,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
++bag;
|
||||
}
|
||||
}
|
||||
if (bag < 256)
|
||||
if (bag)
|
||||
{
|
||||
if (m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount() == 1) m_caster->ToPlayer()->RemoveItem(bag,slot,true);
|
||||
else m_caster->ToPlayer()->GetItemByPos(bag,slot)->SetCount(m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount()-1);
|
||||
@@ -4754,7 +4754,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 47770:
|
||||
{
|
||||
char buf[128];
|
||||
char *gender = "his";
|
||||
const char *gender = "his";
|
||||
if (m_caster->getGender() > 0)
|
||||
gender = "her";
|
||||
sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName(), gender, gender, urand(1,10), urand(1,10));
|
||||
@@ -4765,7 +4765,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 47776:
|
||||
{
|
||||
char buf[128];
|
||||
char *gender = "his";
|
||||
const char *gender = "his";
|
||||
if (m_caster->getGender() > 0)
|
||||
gender = "her";
|
||||
sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName(), gender, urand(1,6), urand(1,6));
|
||||
@@ -6936,6 +6936,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *
|
||||
((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon));
|
||||
|
||||
if (summon->GetEntry() == 27893)
|
||||
{
|
||||
if (uint32 weapon = m_caster->GetUInt32Value(PLAYER_VISIBLE_ITEM_16_ENTRYID))
|
||||
{
|
||||
summon->SetDisplayId(11686);
|
||||
@@ -6943,6 +6944,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *
|
||||
}
|
||||
else
|
||||
summon->SetDisplayId(1126);
|
||||
}
|
||||
|
||||
summon->AI()->EnterEvadeMode();
|
||||
|
||||
|
||||
@@ -1237,13 +1237,14 @@ void World::SetInitialWorldSettings()
|
||||
|
||||
///- Check the existence of the map files for all races' startup areas.
|
||||
if (!MapManager::ExistMapAndVMap(0,-6240.32f, 331.033f)
|
||||
||!MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f)
|
||||
||!MapManager::ExistMapAndVMap(1,-618.518f,-4251.67f)
|
||||
||!MapManager::ExistMapAndVMap(0, 1676.35f, 1677.45f)
|
||||
||!MapManager::ExistMapAndVMap(1, 10311.3f, 832.463f)
|
||||
||!MapManager::ExistMapAndVMap(1,-2917.58f,-257.98f)
|
||||
||m_int_configs[CONFIG_EXPANSION] && (
|
||||
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f)))
|
||||
|| !MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f)
|
||||
|| !MapManager::ExistMapAndVMap(1,-618.518f,-4251.67f)
|
||||
|| !MapManager::ExistMapAndVMap(0, 1676.35f, 1677.45f)
|
||||
|| !MapManager::ExistMapAndVMap(1, 10311.3f, 832.463f)
|
||||
|| !MapManager::ExistMapAndVMap(1,-2917.58f,-257.98f)
|
||||
|| (m_int_configs[CONFIG_EXPANSION] && (
|
||||
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) ||
|
||||
!MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f))))
|
||||
{
|
||||
sLog.outError("Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map/*.vmtree/*.vmtile files in appropriate directories or correct the DataDir value in the worldserver.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
|
||||
exit(1);
|
||||
@@ -1259,7 +1260,11 @@ void World::SetInitialWorldSettings()
|
||||
//No SQL injection as values are treated as integers
|
||||
|
||||
// not send custom type REALM_FFA_PVP to realm list
|
||||
uint32 server_type = IsFFAPvPRealm() ? REALM_TYPE_PVP : getIntConfig(CONFIG_GAME_TYPE);
|
||||
uint32 server_type;
|
||||
if (IsFFAPvPRealm())
|
||||
server_type = REALM_TYPE_PVP;
|
||||
else
|
||||
server_type = getIntConfig(CONFIG_GAME_TYPE);
|
||||
uint32 realm_zone = getIntConfig(CONFIG_REALM_ZONE);
|
||||
LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID);
|
||||
|
||||
|
||||
@@ -177,10 +177,12 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
} else uiNimbleReflexesTimer -= uiDiff;
|
||||
/*END ACID-AI*/
|
||||
|
||||
if (uiHealth == 0 && !HealthAbovePct(66) || uiHealth == 1 && !HealthAbovePct(33))
|
||||
if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33)))
|
||||
{
|
||||
++uiHealth;
|
||||
DoCastAOE(SPELL_SMITE_STOMP,false);
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
struct netherspite_infernalAI : public ScriptedAI
|
||||
{
|
||||
netherspite_infernalAI(Creature *c) : ScriptedAI(c) ,
|
||||
malchezaar(0), HellfireTimer(0), CleanupTimer(0), point(NULL) {}
|
||||
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
|
||||
|
||||
uint32 HellfireTimer;
|
||||
uint32 CleanupTimer;
|
||||
@@ -123,19 +123,23 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (HellfireTimer)
|
||||
if (HellfireTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_HELLFIRE);
|
||||
HellfireTimer = 0;
|
||||
if (HellfireTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_HELLFIRE);
|
||||
HellfireTimer = 0;
|
||||
}
|
||||
else HellfireTimer -= diff;
|
||||
}
|
||||
else HellfireTimer -= diff;
|
||||
|
||||
if (CleanupTimer)
|
||||
if (CleanupTimer <= diff)
|
||||
{
|
||||
Cleanup();
|
||||
CleanupTimer = 0;
|
||||
} else CleanupTimer -= diff;
|
||||
if (CleanupTimer <= diff)
|
||||
{
|
||||
Cleanup();
|
||||
CleanupTimer = 0;
|
||||
} else CleanupTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *who)
|
||||
|
||||
@@ -287,15 +287,17 @@ public:
|
||||
|
||||
//Drink Interrupt Timer
|
||||
if (Drinking && !DrinkInturrupted)
|
||||
{
|
||||
if (DrinkInterruptTimer >= diff)
|
||||
DrinkInterruptTimer -= diff;
|
||||
else
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
DoCast(me, SPELL_POTION, true);
|
||||
DoCast(me, SPELL_AOE_PYROBLAST, false);
|
||||
DrinkInturrupted = true;
|
||||
Drinking = false;
|
||||
else
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
DoCast(me, SPELL_POTION, true);
|
||||
DoCast(me, SPELL_AOE_PYROBLAST, false);
|
||||
DrinkInturrupted = true;
|
||||
Drinking = false;
|
||||
}
|
||||
}
|
||||
|
||||
//Don't execute any more code if we are drinking
|
||||
|
||||
@@ -342,17 +342,17 @@ public:
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_OZ;
|
||||
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
|
||||
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_HOOD;
|
||||
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
|
||||
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_RAJ;
|
||||
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
|
||||
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
for (uint8 i = 0; i < size; ++i)
|
||||
{
|
||||
uint64 guid = pInstance->GetData64(DATA_FEL_CRYSTAL);
|
||||
sLog.outDebug("TSCR: Selin: Adding Fel Crystal %u to list", guid);
|
||||
sLog.outDebug("TSCR: Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
|
||||
Crystals.push_back(guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
else
|
||||
sLog.outError("npc_unworthy_initiateAI: unable to find prison!");
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case PHASE_TO_EQUIP:
|
||||
if (wait_timer)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
wait_timer = 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case PHASE_TO_ATTACK:
|
||||
if (wait_timer)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
wait_timer = 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case PHASE_ATTACKING:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -273,10 +273,12 @@ public:
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
//ShadowBolt
|
||||
if (ShadowBolt_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
|
||||
|
||||
ShadowBolt_Timer = 10000;
|
||||
|
||||
@@ -41,13 +41,9 @@ public:
|
||||
|
||||
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry * /*at*/)
|
||||
{
|
||||
if (InstanceScript* pInstance = pPlayer->GetInstanceScript())
|
||||
{
|
||||
if (!pPlayer->FindNearestCreature(15362,15))
|
||||
pPlayer->SummonCreature(15362, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
if (pPlayer->GetInstanceScript() && !pPlayer->FindNearestCreature(15362, 15))
|
||||
pPlayer->SummonCreature(15362, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
@@ -62,10 +58,8 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
InstanceScript* pInstance = pPlayer->GetInstanceScript();
|
||||
if (!pInstance)
|
||||
return false;
|
||||
pInstance->SetData(EVENT_STATE,pGo->GetEntry());
|
||||
if (InstanceScript* pInstance = pPlayer->GetInstanceScript())
|
||||
pInstance->SetData(EVENT_STATE,pGo->GetEntry());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,16 +122,12 @@ public:
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp)
|
||||
{
|
||||
if (Temp->isDead())
|
||||
{
|
||||
CAST_CRE(Temp)->Respawn();
|
||||
}else
|
||||
{
|
||||
if (Temp->getVictim())
|
||||
{
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
}
|
||||
}
|
||||
else if (Temp->getVictim())
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->isInCombat())
|
||||
@@ -389,16 +385,12 @@ public:
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_SACROLASH));
|
||||
if (Temp)
|
||||
{
|
||||
if (Temp->isDead())
|
||||
{
|
||||
CAST_CRE(Temp)->Respawn();
|
||||
}else
|
||||
{
|
||||
if (Temp->getVictim())
|
||||
{
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
}
|
||||
}
|
||||
else if (Temp->getVictim())
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->isInCombat())
|
||||
|
||||
@@ -270,6 +270,8 @@ public:
|
||||
uiFlightCount = 0;
|
||||
uiBreathCount = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
phase = NextPhase;
|
||||
}
|
||||
@@ -291,7 +293,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
Unit *pTarget = pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!pTarget)
|
||||
pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||
|
||||
|
||||
@@ -545,16 +545,19 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
uint32 SpectralPlayers = 0;
|
||||
uint8 SpectralPlayers = 0;
|
||||
Map* pMap = pGo->GetMap();
|
||||
if (!pMap->IsDungeon()) return true;
|
||||
if (!pMap->IsDungeon())
|
||||
return true;
|
||||
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
|
||||
++SpectralPlayers;
|
||||
}
|
||||
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MAX_PLAYERS_IN_SPECTRAL_REALM && SpectralPlayers >= MAX_PLAYERS_IN_SPECTRAL_REALM))
|
||||
uint8 MaxSpectralPlayers = MAX_PLAYERS_IN_SPECTRAL_REALM;
|
||||
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MaxSpectralPlayers && SpectralPlayers >= MaxSpectralPlayers))
|
||||
pPlayer->GetSession()->SendNotification(GO_FAILED);
|
||||
else
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_SPECTRAL, true);
|
||||
|
||||
@@ -193,9 +193,9 @@ enum KilJaedenTimers
|
||||
// Locations of the Hand of Deceiver adds
|
||||
Position DeceiverLocations[3]=
|
||||
{
|
||||
{1682.045f, 631.299f, 5.936f},
|
||||
{1684.099f, 618.848f, 0.589f},
|
||||
{1694.170f, 612.272f, 1.416f},
|
||||
{1682.045f, 631.299f, 5.936f, 0.0f},
|
||||
{1684.099f, 618.848f, 0.589f, 0.0f},
|
||||
{1694.170f, 612.272f, 1.416f, 0.0f},
|
||||
};
|
||||
|
||||
// Locations, where Shield Orbs will spawn
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ public:
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_KJ_DEATH, me);
|
||||
summons.DespawnAll();
|
||||
@@ -621,7 +621,7 @@ public:
|
||||
pInstance->SetData(DATA_KILJAEDEN_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KJ_SLAY1,SAY_KJ_SLAY2), me);
|
||||
}
|
||||
@@ -639,7 +639,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
}
|
||||
@@ -957,7 +957,7 @@ public:
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
@@ -1081,7 +1081,7 @@ public:
|
||||
bLockedTarget = false;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit * /*done_by*/, uint32 &damage)
|
||||
{
|
||||
if (damage > me->GetHealth())
|
||||
DoCast(me, SPELL_FELFIRE_FISSION, true);
|
||||
@@ -1248,7 +1248,7 @@ public:
|
||||
} else uiTimer -= diff;
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 /*id*/)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
@@ -189,7 +189,7 @@ class boss_archaedas : public CreatureScript
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied (Unit *pKiller) {
|
||||
void JustDied (Unit * /*pKiller*/) {
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(NULL,3); // open the vault door
|
||||
|
||||
@@ -173,7 +173,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!archaedas)
|
||||
return;
|
||||
|
||||
if (Unit *victim = Unit::GetUnit(*archaedas, target))
|
||||
if (Unit::GetUnit(*archaedas, target))
|
||||
{
|
||||
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN,false);
|
||||
whoWokeArchaedasGUID = target;
|
||||
@@ -299,4 +299,4 @@ class instance_uldaman : public InstanceMapScript
|
||||
void AddSC_instance_uldaman()
|
||||
{
|
||||
new instance_uldaman();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,12 +242,14 @@ class boss_halazzi : public CreatureScript
|
||||
} else FrenzyTimer -= diff;
|
||||
|
||||
if (Phase == PHASE_LYNX)
|
||||
{
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
if (HealthBelowPct(25 * (3 - TransformCount)))
|
||||
EnterPhase(PHASE_SPLIT);
|
||||
CheckTimer = 1000;
|
||||
} else CheckTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (Phase == PHASE_HUMAN || Phase == PHASE_ENRAGE)
|
||||
@@ -271,6 +273,7 @@ class boss_halazzi : public CreatureScript
|
||||
} else ShockTimer -= diff;
|
||||
|
||||
if (Phase == PHASE_HUMAN)
|
||||
{
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
if (!HealthAbovePct(20) /*HealthBelowPct(10)*/)
|
||||
@@ -283,6 +286,7 @@ class boss_halazzi : public CreatureScript
|
||||
}
|
||||
CheckTimer = 1000;
|
||||
} else CheckTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (Phase == PHASE_MERGE)
|
||||
|
||||
@@ -343,15 +343,14 @@ class boss_nalorakk : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (waitTimer)
|
||||
if (waitTimer && inMove)
|
||||
{
|
||||
if (inMove)
|
||||
if (waitTimer <= diff)
|
||||
{
|
||||
(*me).GetMotionMaster()->MovementExpired();
|
||||
(*me).GetMotionMaster()->MovePoint(MovePhase,NalorakkWay[MovePhase][0],NalorakkWay[MovePhase][1],NalorakkWay[MovePhase][2]);
|
||||
waitTimer = 0;
|
||||
} else waitTimer -= diff;
|
||||
if (waitTimer <= diff)
|
||||
{
|
||||
(*me).GetMotionMaster()->MovementExpired();
|
||||
(*me).GetMotionMaster()->MovePoint(MovePhase,NalorakkWay[MovePhase][0],NalorakkWay[MovePhase][1],NalorakkWay[MovePhase][2]);
|
||||
waitTimer = 0;
|
||||
} else waitTimer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -317,7 +317,8 @@ class boss_zuljin : public CreatureScript
|
||||
Unit* Temp = NULL;
|
||||
if (SpiritGUID[i])
|
||||
{
|
||||
if (Temp = Unit::GetUnit(*me, SpiritGUID[i]))
|
||||
Temp = Unit::GetUnit(*me, SpiritGUID[i]);
|
||||
if (Temp)
|
||||
{
|
||||
Temp->SetVisibility(VISIBILITY_OFF);
|
||||
Temp->setDeathState(DEAD);
|
||||
|
||||
@@ -123,26 +123,30 @@ class boss_renataki : public CreatureScript
|
||||
|
||||
//Resetting some aggro so he attacks other gamers
|
||||
if (!Invisible)
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
|
||||
Aggro_Timer = 7000 + rand()%13000;
|
||||
} else Aggro_Timer -= diff;
|
||||
Aggro_Timer = 7000 + rand()%13000;
|
||||
} else Aggro_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!Invisible)
|
||||
if (ThousandBlades_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
|
||||
ThousandBlades_Timer = 7000 + rand()%5000;
|
||||
} else ThousandBlades_Timer -= diff;
|
||||
if (ThousandBlades_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
|
||||
ThousandBlades_Timer = 7000 + rand()%5000;
|
||||
} else ThousandBlades_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -252,6 +252,7 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (questPhase == 1)
|
||||
{
|
||||
if (timer <= diff)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
|
||||
@@ -266,22 +267,25 @@ public:
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// healer
|
||||
if (spellFlashLight)
|
||||
if (HealthBelowPct(70))
|
||||
if (timerFlashLight <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FLASH_OF_LIGHT);
|
||||
timerFlashLight = TIMER_FLASH_OF_LIGHT + rand()%TIMER_FLASH_OF_LIGHT;
|
||||
}
|
||||
else
|
||||
timerFlashLight -= diff;
|
||||
if (spellFlashLight && HealthBelowPct(70))
|
||||
{
|
||||
if (timerFlashLight <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FLASH_OF_LIGHT);
|
||||
timerFlashLight = TIMER_FLASH_OF_LIGHT + rand()%TIMER_FLASH_OF_LIGHT;
|
||||
}
|
||||
else
|
||||
timerFlashLight -= diff;
|
||||
}
|
||||
|
||||
if (spellJustice)
|
||||
{
|
||||
if (timerJustice <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SEAL_OF_JUSTICE);
|
||||
@@ -289,8 +293,10 @@ public:
|
||||
}
|
||||
else
|
||||
timerJustice -= diff;
|
||||
}
|
||||
|
||||
if (spellJudLight)
|
||||
{
|
||||
if (timerJudLight <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_JUDGEMENT_OF_LIGHT);
|
||||
@@ -298,8 +304,10 @@ public:
|
||||
}
|
||||
else
|
||||
timerJudLight -= diff;
|
||||
}
|
||||
|
||||
if (spellCommand)
|
||||
if (spellCommand)
|
||||
{
|
||||
if (timerCommand <= diff)
|
||||
{
|
||||
DoCast(me, TIMER_SEAL_OF_COMMAND);
|
||||
@@ -307,14 +315,15 @@ public:
|
||||
}
|
||||
else
|
||||
timerCommand -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void Activate(uint64 summonerguid)
|
||||
{
|
||||
questPhase = 1;
|
||||
summonerGuid = summonerguid;
|
||||
questPhase = 1;
|
||||
summonerGuid = summonerguid;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* Killed)
|
||||
|
||||
@@ -36,10 +36,10 @@ EndScriptData */
|
||||
|
||||
const Position LorgusPosition[4] =
|
||||
{
|
||||
{ -458.500610f, -38.343079f, -33.474445f },
|
||||
{ -469.423615f, -88.400513f, -39.265102f },
|
||||
{ -622.354980f, -10.350100f, -22.777000f },
|
||||
{ -759.640564f, 16.658913f, -29.159529f }
|
||||
{ -458.500610f, -38.343079f, -33.474445f, 0.0f },
|
||||
{ -469.423615f, -88.400513f, -39.265102f, 0.0f },
|
||||
{ -622.354980f, -10.350100f, -22.777000f, 0.0f },
|
||||
{ -759.640564f, 16.658913f, -29.159529f, 0.0f }
|
||||
};
|
||||
|
||||
const Position SpawnsLocation[] =
|
||||
|
||||
@@ -525,7 +525,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
}
|
||||
}
|
||||
|
||||
void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
|
||||
void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3])
|
||||
{
|
||||
// 1 in 4 chance we give a rally yell. Not sure if the chance is offilike.
|
||||
if (rand()%4 == 0)
|
||||
|
||||
@@ -67,7 +67,7 @@ struct Wave
|
||||
bool IsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that
|
||||
};
|
||||
|
||||
static Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
|
||||
const Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
|
||||
{ // Rage Winterchill Wave 1-8
|
||||
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false},
|
||||
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0}, 120000, false},
|
||||
@@ -92,7 +92,7 @@ static Wave AllianceWaves[]= // Waves that will b
|
||||
{{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}
|
||||
};
|
||||
|
||||
static Wave HordeWaves[]= // Waves that are summoned in the Horde base
|
||||
const Wave HordeWaves[]= // Waves that are summoned in the Horde base
|
||||
{ // Kaz'Rogal Wave 1-8
|
||||
{{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 180000, false},
|
||||
{{GHOUL, GHOUL, GHOUL, GHOUL, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0}, 180000, false},
|
||||
@@ -141,7 +141,7 @@ enum YellId
|
||||
DEATH = 6, // Used on death
|
||||
};
|
||||
|
||||
static Yells JainaQuotes[]=
|
||||
const Yells JainaQuotes[]=
|
||||
{
|
||||
{ATTACKED, -1534000},
|
||||
{ATTACKED, -1534001},
|
||||
@@ -154,7 +154,7 @@ static Yells JainaQuotes[]=
|
||||
{DEATH, -1534008},
|
||||
};
|
||||
|
||||
static Yells ThrallQuotes[]=
|
||||
const Yells ThrallQuotes[]=
|
||||
{
|
||||
{ATTACKED, -1534009},
|
||||
{ATTACKED, -1534010},
|
||||
@@ -201,7 +201,7 @@ struct hyjalAI : public npc_escortAI
|
||||
void SummonCreature(uint32 entry, float Base[4][3]); // Summons a creature for that wave in that base
|
||||
|
||||
// Summons the next wave, calls SummonCreature
|
||||
void SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3]);
|
||||
void SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]);
|
||||
|
||||
void StartEvent(Player* player); // Begins the event by gossip click
|
||||
|
||||
|
||||
@@ -245,9 +245,9 @@ struct Wave
|
||||
|
||||
static Wave PortalWaves[]=
|
||||
{
|
||||
{C_ASSAS, C_WHELP, C_CHRON, 0},
|
||||
{C_EXECU, C_CHRON, C_WHELP, C_ASSAS},
|
||||
{C_EXECU, C_VANQU, C_CHRON, C_ASSAS}
|
||||
{ {C_ASSAS, C_WHELP, C_CHRON, 0} },
|
||||
{ {C_EXECU, C_CHRON, C_WHELP, C_ASSAS} },
|
||||
{ {C_EXECU, C_VANQU, C_CHRON, C_ASSAS} }
|
||||
};
|
||||
|
||||
class npc_time_rift : public CreatureScript
|
||||
|
||||
@@ -87,17 +87,17 @@ static sOnyxMove aMoveData[]=
|
||||
{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -55.0548f},//north
|
||||
};
|
||||
|
||||
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f};
|
||||
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f, 0.0f};
|
||||
|
||||
const Position Phase2Location = {-80.924f, -214.299f, -82.942f};
|
||||
const Position Phase2Location = {-80.924f, -214.299f, -82.942f, 0.0f};
|
||||
|
||||
static Position aSpawnLocations[3]=
|
||||
{
|
||||
//Whelps
|
||||
{-30.127f, -254.463f, -89.440f},
|
||||
{-30.817f, -177.106f, -89.258f},
|
||||
{-30.127f, -254.463f, -89.440f, 0.0f},
|
||||
{-30.817f, -177.106f, -89.258f, 0.0f},
|
||||
//Lair Guard
|
||||
{-145.950f, -212.831f, -68.659f}
|
||||
{-145.950f, -212.831f, -68.659f, 0.0f}
|
||||
};
|
||||
|
||||
class boss_onyxia : public CreatureScript
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->SetInCombatWithZone();
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_ONYXIA, DONE);
|
||||
@@ -220,12 +220,12 @@ public:
|
||||
Summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pVictim)
|
||||
void KilledUnit(Unit* /*pVictim*/)
|
||||
{
|
||||
DoScriptText(SAY_KILL, me);
|
||||
}
|
||||
|
||||
void SpellHit(Unit *pCaster, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit * /*pCaster*/, const SpellEntry* pSpell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST ||
|
||||
pSpell->Id == SPELL_BREATH_WEST_TO_EAST ||
|
||||
@@ -260,23 +260,23 @@ public:
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
m_uiBellowingRoarTimer = 1000;
|
||||
break;
|
||||
case 10:
|
||||
me->SetFlying(true);
|
||||
case 10:
|
||||
me->SetFlying(true);
|
||||
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(),Phase2Location.GetPositionY(),Phase2Location.GetPositionZ()+25);
|
||||
me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
DoScriptText(SAY_PHASE_2_TRANS, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_uiWhelpTimer = 5000;
|
||||
m_uiLairGuardTimer = 15000;
|
||||
break;
|
||||
case 11:
|
||||
break;
|
||||
case 11:
|
||||
if (m_pPointData)
|
||||
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ);
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
m_bIsMoving = false;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
m_uiEruptTimer = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
switch (pCreature->GetEntry())
|
||||
{
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0)
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0)
|
||||
{
|
||||
switch(criteria_id)
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ const Position FleshTentaclePos[2] =
|
||||
};
|
||||
|
||||
//Kick out position
|
||||
const Position KickPos = { -8545.0f, 1984.0f, -96.0f};
|
||||
const Position KickPos = { -8545.0f, 1984.0f, -96.0f, 0.0f};
|
||||
|
||||
class boss_eye_of_cthun : public CreatureScript
|
||||
{
|
||||
@@ -353,6 +353,7 @@ public:
|
||||
|
||||
case PHASE_EYE_RED_BEAM:
|
||||
if (DarkGlareTick < 35)
|
||||
{
|
||||
if (DarkGlareTickTimer <= diff)
|
||||
{
|
||||
//Set angle and cast
|
||||
@@ -372,6 +373,7 @@ public:
|
||||
//1 second per tick
|
||||
DarkGlareTickTimer = 1000;
|
||||
} else DarkGlareTickTimer -= diff;
|
||||
}
|
||||
|
||||
//PhaseTimer
|
||||
if (PhaseTimer <= diff)
|
||||
@@ -799,6 +801,7 @@ public:
|
||||
} else StomachEnterTimer -= diff;
|
||||
|
||||
if (StomachEnterVisTimer && StomachEnterTarget)
|
||||
{
|
||||
if (StomachEnterVisTimer <= diff)
|
||||
{
|
||||
//Check for valid player
|
||||
@@ -812,6 +815,7 @@ public:
|
||||
StomachEnterTarget = 0;
|
||||
StomachEnterVisTimer = 0;
|
||||
} else StomachEnterVisTimer -= diff;
|
||||
}
|
||||
|
||||
//GientClawTentacleTimer
|
||||
if (GiantClawTentacleTimer <= diff)
|
||||
@@ -1051,6 +1055,7 @@ public:
|
||||
|
||||
//EvadeTimer
|
||||
if (!me->IsWithinMeleeRange(me->getVictim()))
|
||||
{
|
||||
if (EvadeTimer <= diff)
|
||||
{
|
||||
if (Unit* p = Unit::GetUnit(*me, Portal))
|
||||
@@ -1083,6 +1088,7 @@ public:
|
||||
|
||||
me->SetVisibility(VISIBILITY_ON);
|
||||
} else EvadeTimer -= diff;
|
||||
}
|
||||
|
||||
//GroundRuptureTimer
|
||||
if (GroundRuptureTimer <= diff)
|
||||
@@ -1161,40 +1167,40 @@ public:
|
||||
|
||||
//EvadeTimer
|
||||
if (!me->IsWithinMeleeRange(me->getVictim()))
|
||||
if (EvadeTimer <= diff)
|
||||
{
|
||||
if (Unit* p = Unit::GetUnit(*me, Portal))
|
||||
p->Kill(p);
|
||||
|
||||
//Dissapear and reappear at new position
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
if (EvadeTimer <= diff)
|
||||
{
|
||||
me->Kill(me);
|
||||
return;
|
||||
}
|
||||
if (Unit* p = Unit::GetUnit(*me, Portal))
|
||||
p->Kill(p);
|
||||
|
||||
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
//Dissapear and reappear at new position
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
Portal = pPortal->GetGUID();
|
||||
me->Kill(me);
|
||||
return;
|
||||
}
|
||||
|
||||
GroundRuptureTimer = 500;
|
||||
HamstringTimer = 2000;
|
||||
ThrashTimer = 5000;
|
||||
EvadeTimer = 5000;
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
Portal = pPortal->GetGUID();
|
||||
}
|
||||
|
||||
me->SetVisibility(VISIBILITY_ON);
|
||||
|
||||
} else EvadeTimer -= diff;
|
||||
GroundRuptureTimer = 500;
|
||||
HamstringTimer = 2000;
|
||||
ThrashTimer = 5000;
|
||||
EvadeTimer = 5000;
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
me->SetVisibility(VISIBILITY_ON);
|
||||
} else EvadeTimer -= diff;
|
||||
}
|
||||
|
||||
//GroundRuptureTimer
|
||||
if (GroundRuptureTimer <= diff)
|
||||
|
||||
@@ -61,7 +61,7 @@ class npc_sergeant_bly : public CreatureScript
|
||||
public:
|
||||
npc_sergeant_bly() : CreatureScript("npc_sergeant_bly") { }
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void DoAction(const int32 param)
|
||||
void DoAction(const int32 /*param*/)
|
||||
{
|
||||
postGossipStep=1;
|
||||
Text_Timer = 0;
|
||||
@@ -219,7 +219,7 @@ class go_troll_cage : public GameObjectScript
|
||||
public:
|
||||
go_troll_cage() : GameObjectScript("go_troll_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
if (InstanceScript* pInstance = pGo->GetInstanceScript())
|
||||
{
|
||||
@@ -261,7 +261,7 @@ class npc_weegli_blastfuse : public CreatureScript
|
||||
public:
|
||||
npc_weegli_blastfuse() : CreatureScript("npc_weegli_blastfuse") { }
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
@@ -356,7 +356,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 /*type*/, uint32 /*id*/)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -376,7 +376,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(const int32 param)
|
||||
void DoAction(const int32 /*param*/)
|
||||
{
|
||||
DestroyDoor();
|
||||
}
|
||||
@@ -415,7 +415,7 @@ class go_shallow_grave : public GameObjectScript
|
||||
public:
|
||||
go_shallow_grave() : GameObjectScript("go_shallow_grave") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
// randomly summon a zombie or dead hero the first time a grave is used
|
||||
if (pGo->GetUseCount() == 0)
|
||||
@@ -448,7 +448,7 @@ class at_zumrah : public AreaTriggerScript
|
||||
public:
|
||||
at_zumrah() : AreaTriggerScript("at_zumrah") { }
|
||||
|
||||
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry *at)
|
||||
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry * /*at*/)
|
||||
{
|
||||
Creature* pZumrah = pPlayer->FindNearestCreature(ZUMRAH_ID, 30.0f);
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ class go_naga_brazier : public GameObjectScript
|
||||
{
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
if (Creature* creature = GetClosestCreatureWithEntry(go, NPC_MUGLASH, INTERACTION_DISTANCE*2))
|
||||
{
|
||||
|
||||
@@ -331,11 +331,13 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (Must_Die)
|
||||
{
|
||||
if (Must_Die_Timer <= diff)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
return;
|
||||
} else Must_Die_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!Escape)
|
||||
{
|
||||
@@ -490,10 +492,12 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (we_must_die)
|
||||
{
|
||||
if (must_die_timer <= diff)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
} else must_die_timer -= diff;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
## npc_zelfrax
|
||||
######*/
|
||||
|
||||
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f};
|
||||
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f, 0.0f};
|
||||
|
||||
enum eZelfrax
|
||||
{
|
||||
@@ -503,19 +503,19 @@ public:
|
||||
DoScriptText(SAY_STAY_1, me, pPlayer);
|
||||
break;
|
||||
case 11:
|
||||
DoScriptText(SAY_STAY_2, me, pPlayer);
|
||||
DoScriptText(SAY_STAY_2, me, pPlayer);
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_STAY_3, me, pPlayer);
|
||||
DoScriptText(SAY_STAY_3, me, pPlayer);
|
||||
break;
|
||||
case 26:
|
||||
DoScriptText(SAY_STAY_4, me, pPlayer);
|
||||
DoScriptText(SAY_STAY_4, me, pPlayer);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_STAY_5, me, pPlayer);
|
||||
DoScriptText(SAY_STAY_5, me, pPlayer);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_STAY_6, me, pPlayer);
|
||||
DoScriptText(SAY_STAY_6, me, pPlayer);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
break;
|
||||
case 29:
|
||||
|
||||
+2
-1
@@ -274,6 +274,7 @@ public:
|
||||
} else uiHolySmiteTimer -= uiDiff;
|
||||
|
||||
if (me->HasAura(SPELL_SHIELD))
|
||||
{
|
||||
if (uiRenewTimer <= uiDiff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
@@ -291,7 +292,7 @@ public:
|
||||
}
|
||||
uiRenewTimer = urand(15000,17000);
|
||||
} else uiRenewTimer -= uiDiff;
|
||||
|
||||
}
|
||||
|
||||
if (!bHealth && !HealthAbovePct(25))
|
||||
{
|
||||
|
||||
+4
@@ -157,6 +157,7 @@ public:
|
||||
return;
|
||||
|
||||
if (bEventInProgress)
|
||||
{
|
||||
if (uiResurrectTimer <= uiDiff)
|
||||
{
|
||||
me->SetFullHealth();
|
||||
@@ -166,6 +167,7 @@ public:
|
||||
bEventInProgress = false;
|
||||
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
} else uiResurrectTimer -= uiDiff;
|
||||
}
|
||||
|
||||
switch(uiPhase)
|
||||
{
|
||||
@@ -211,12 +213,14 @@ public:
|
||||
DoCast(me, SPELL_ARMY_DEAD);
|
||||
}
|
||||
if (!bDeathArmyDone)
|
||||
{
|
||||
if (uiDeathArmyCheckTimer <= uiDiff)
|
||||
{
|
||||
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
uiDeathArmyCheckTimer = 0;
|
||||
bDeathArmyDone = true;
|
||||
} else uiDeathArmyCheckTimer -= uiDiff;
|
||||
}
|
||||
if (uiDesecration <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ public:
|
||||
switch(i)
|
||||
{
|
||||
case 2:
|
||||
if (pInstance && uiWaypointPath == 3 || uiWaypointPath == 2)
|
||||
if ((pInstance && uiWaypointPath == 3) || uiWaypointPath == 2)
|
||||
pInstance->SetData(DATA_MOVEMENT_DONE, pInstance->GetData(DATA_MOVEMENT_DONE)+1);
|
||||
break;
|
||||
case 3:
|
||||
|
||||
+6
-6
@@ -308,7 +308,7 @@ public:
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(1,735.81f,661.92f,412.39f);
|
||||
|
||||
if (Creature* pBoss = me->SummonCreature(uiArgentChampion,SpawnPosition))
|
||||
if (me->SummonCreature(uiArgentChampion,SpawnPosition))
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
@@ -366,8 +366,8 @@ public:
|
||||
DoStartArgentChampionEncounter();
|
||||
}
|
||||
|
||||
if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
|
||||
if ((pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE) ||
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
|
||||
me->SummonCreature(VEHICLE_BLACK_KNIGHT,769.834f,651.915f,447.035f,0);
|
||||
}
|
||||
@@ -472,10 +472,10 @@ public:
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
|
||||
if (pInstance &&
|
||||
pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
|
||||
((pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
|
||||
pInstance->GetData(BOSS_BLACK_KNIGHT) == DONE &&
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE) ||
|
||||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE))
|
||||
return false;
|
||||
|
||||
if (pInstance &&
|
||||
|
||||
@@ -59,9 +59,9 @@ enum Achievements
|
||||
ACHIEV_OH_NOVOS = 2057
|
||||
};
|
||||
|
||||
static Position AddSpawnPoint = { -379.20f, -816.76f, 59.70f };
|
||||
static Position CrystalHandlerSpawnPoint = { -326.626343f, -709.956604f, 27.813314f };
|
||||
static Position AddDestinyPoint = { -379.314545f, -772.577637f, 28.58837f };
|
||||
static Position AddSpawnPoint = { -379.20f, -816.76f, 59.70f, 0.0f };
|
||||
static Position CrystalHandlerSpawnPoint = { -326.626343f, -709.956604f, 27.813314f, 0.0f };
|
||||
static Position AddDestinyPoint = { -379.314545f, -772.577637f, 28.58837f, 0.0f };
|
||||
|
||||
class boss_novos : public CreatureScript
|
||||
{
|
||||
@@ -169,6 +169,8 @@ public:
|
||||
uiTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS);
|
||||
} else uiTimer -= diff;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* /*killer*/)
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
pInstance->SetData(DATA_FALRIC_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_DEFILING_HORROR, urand(25000,45000)); // TODO adjust timer.
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
pInstance->SetData(DATA_FALRIC_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
pInstance->SetData(DATA_MARWYN_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SHARED_SUFFERING, 20000); // TODO Check timer
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
pInstance->SetData(DATA_MARWYN_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
@@ -135,19 +135,19 @@ enum eEnum
|
||||
QUEST_WRATH_OF_THE_LICH_KING_H2 = 24802,
|
||||
};
|
||||
|
||||
static Position HallsofReflectionLocs[]=
|
||||
const Position HallsofReflectionLocs[]=
|
||||
{
|
||||
{5283.234863f, 1990.946777f, 707.695679f, 0.929097f}, // 2 Loralen Follows
|
||||
{5408.031250f, 2102.918213f, 707.695251f, 0.792756f}, // 9 Sylvanas Follows
|
||||
{5401.866699f, 2110.837402f, 707.695251f, 0.800610f}, // 10 Loralen follows
|
||||
};
|
||||
|
||||
static Position SpawnPos = {5262.540527f, 1949.693726f, 707.695007f, 0.808736f}; // Jaina/Sylvanas Beginning Position
|
||||
static Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
|
||||
static Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
|
||||
static Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
|
||||
static Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
|
||||
static Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
|
||||
const Position SpawnPos = {5262.540527f, 1949.693726f, 707.695007f, 0.808736f}; // Jaina/Sylvanas Beginning Position
|
||||
const Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
|
||||
const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
|
||||
const Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
|
||||
const Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
|
||||
const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
|
||||
|
||||
class npc_jaina_or_sylvanas_hor : public CreatureScript
|
||||
{
|
||||
@@ -157,7 +157,7 @@ private:
|
||||
public:
|
||||
npc_jaina_or_sylvanas_hor(bool isSylvana, const char* name) : CreatureScript(name), m_isSylvana(isSylvana) { }
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
switch (uiAction)
|
||||
@@ -438,10 +438,12 @@ public:
|
||||
}
|
||||
|
||||
if (Creature* pUther = me->GetCreature(*me, uiUther))
|
||||
{
|
||||
if (pInstance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
|
||||
DoScriptText(SAY_UTHER_INTRO_A2_9, pUther);
|
||||
else
|
||||
DoScriptText(SAY_UTHER_INTRO_H2_7, pUther);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_INTRO_LK_2, 11000);
|
||||
break;
|
||||
|
||||
@@ -96,7 +96,7 @@ struct boss_horAI : ScriptedAI
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *pWho, uint32 &uiDamage)
|
||||
void DamageTaken(Unit * /*pWho*/, uint32 &uiDamage)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
uiDamage = 0;
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
switch(uint32 eventId = events.ExecuteEvent())
|
||||
switch(events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_NEXT_WAVE:
|
||||
uiWaveCount++;
|
||||
|
||||
@@ -377,9 +377,9 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
break;
|
||||
case EVENT_DOMINATE_MIND_H:
|
||||
DoScriptText(SAY_DOMINATE_MIND, me);
|
||||
for (uint8 i = 0; i < uiDominateMindCount; i++)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
|
||||
DoCast(target, SPELL_DOMINATE_MIND_H);
|
||||
for (uint8 i = 0; i < uiDominateMindCount; i++)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
|
||||
DoCast(target, SPELL_DOMINATE_MIND_H);
|
||||
events.ScheduleEvent(EVENT_DOMINATE_MIND_H, urand(18000, 22000));
|
||||
break;
|
||||
case EVENT_P1_SUMMON_WAVE:
|
||||
@@ -727,7 +727,7 @@ class npc_vengeful_shade : public CreatureScript
|
||||
npc_vengeful_shadeAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -755,7 +755,7 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader
|
||||
|
||||
class spell_deathwhisper_mana_barrier_AuraScript : public AuraScript
|
||||
{
|
||||
void HandlePeriodicTick(AuraEffect const * aurEff, AuraApplication const * aurApp)
|
||||
void HandlePeriodicTick(AuraEffect const * /*aurEff*/, AuraApplication const * /*aurApp*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth();
|
||||
@@ -783,7 +783,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
|
||||
|
||||
class spell_cultist_dark_martyrdom_SpellScript : public SpellScript
|
||||
{
|
||||
bool Validate(SpellEntry const* spellEntry)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
{
|
||||
if (uint32 scriptId = sObjectMgr.GetScriptId("boss_lady_deathwhisper"))
|
||||
if (CreatureInfo const* creInfo = ObjectMgr::GetCreatureTemplate(NPC_LADY_DEATHWHISPER))
|
||||
@@ -793,7 +793,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetCaster()->isSummon())
|
||||
if (Unit* owner = GetCaster()->ToTempSummon()->GetSummoner())
|
||||
|
||||
@@ -104,7 +104,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
pInstance->SetData(DATA_LORD_MARROWGAR, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
@@ -112,7 +112,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
pInstance->SetData(DATA_LORD_MARROWGAR, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -354,14 +354,14 @@ class npc_bone_spike : public CreatureScript
|
||||
uiTrappedGUID = 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
void JustDied(Unit * /*killer*/)
|
||||
{
|
||||
events.Reset();
|
||||
if (Unit* trapped = Unit::GetUnit((*me), uiTrappedGUID))
|
||||
trapped->RemoveAurasDueToSpell(SPELL_IMPALED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *pVictim)
|
||||
void KilledUnit(Unit * /*pVictim*/)
|
||||
{
|
||||
me->Kill(me);
|
||||
}
|
||||
@@ -415,7 +415,7 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_coldflame_SpellScript : public SpellScript
|
||||
{
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
uint8 count = 1;
|
||||
@@ -463,7 +463,7 @@ class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript
|
||||
{
|
||||
void HandleApplyAura(SpellEffIndex effIndex)
|
||||
void HandleApplyAura(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
CreatureAI* marrowgarAI = GetCaster()->ToCreature()->AI();
|
||||
bool yell = false;
|
||||
@@ -512,7 +512,7 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_bone_storm_SpellScript : public SpellScript
|
||||
{
|
||||
void RecalculateDamage(SpellEffIndex effIndex)
|
||||
void RecalculateDamage(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
int32 dmg = GetHitDamage();
|
||||
float distance = GetHitUnit()->GetExactDist2d(GetCaster());
|
||||
|
||||
@@ -61,7 +61,7 @@ class icecrown_citadel_teleport : public GameObjectScript
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
|
||||
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
SpellEntry const* spell = sSpellStore.LookupEntry(action);
|
||||
|
||||
@@ -50,7 +50,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature, bool add)
|
||||
void OnCreatureCreate(Creature* creature, bool /*add*/)
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
uint32 TeamInInstance = 0;
|
||||
@@ -82,7 +82,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool add)
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch (pGo->GetEntry())
|
||||
{
|
||||
|
||||
@@ -51,12 +51,12 @@ enum Achievs
|
||||
|
||||
const Position RiftLocation[6] =
|
||||
{
|
||||
{652.64f, -273.70f, -8.75f},
|
||||
{634.45f, -265.94f, -8.44f},
|
||||
{620.73f, -281.17f, -9.02f},
|
||||
{626.10f, -304.67f, -9.44f},
|
||||
{639.87f, -314.11f, -9.49f},
|
||||
{651.72f, -297.44f, -9.37f}
|
||||
{652.64f, -273.70f, -8.75f, 0.0f},
|
||||
{634.45f, -265.94f, -8.44f, 0.0f},
|
||||
{620.73f, -281.17f, -9.02f, 0.0f},
|
||||
{626.10f, -304.67f, -9.44f, 0.0f},
|
||||
{639.87f, -314.11f, -9.49f, 0.0f},
|
||||
{651.72f, -297.44f, -9.37f, 0.0f}
|
||||
};
|
||||
|
||||
class boss_anomalus : public CreatureScript
|
||||
@@ -229,10 +229,12 @@ public:
|
||||
{
|
||||
Unit* pAnomalus = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (pAnomalus && pAnomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||
DoCast(pTarget, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
|
||||
else
|
||||
DoCast(pTarget, SPELL_CHAOTIC_ENERGY_BURST);
|
||||
}
|
||||
uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS;
|
||||
} else uiChaoticEnergyBurstTimer -= diff;
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ public:
|
||||
return;
|
||||
}
|
||||
if (bCrystalSpikes)
|
||||
{
|
||||
if (uiCrystalSpikesTimer2 <= diff)
|
||||
{
|
||||
fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
|
||||
@@ -141,6 +142,7 @@ public:
|
||||
bCrystalSpikes = false;
|
||||
uiCrystalSpikesTimer2 = 200;
|
||||
} else uiCrystalSpikesTimer2 -= diff;
|
||||
}
|
||||
|
||||
if (!bFrenzy && HealthBelowPct(25))
|
||||
{
|
||||
|
||||
@@ -71,9 +71,9 @@ struct Summons
|
||||
|
||||
static Summons Group[]=
|
||||
{
|
||||
{NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_MAMMOTH,NPC_PHANTASMAL_WOLF},
|
||||
{NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_WATER,NPC_PHANTASMAL_FIRE},
|
||||
{NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_NAGAL,NPC_PHANTASMAL_MURLOC}
|
||||
{ {NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF} },
|
||||
{ {NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_WATER, NPC_PHANTASMAL_FIRE} },
|
||||
{ {NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_MURLOC} }
|
||||
};
|
||||
|
||||
static uint32 TeleportSpells[]=
|
||||
@@ -133,7 +133,8 @@ public:
|
||||
uiGroup[2] = 0;
|
||||
}
|
||||
|
||||
x,y = 0.0f;
|
||||
x = 0.0f;
|
||||
y = 0.0f;
|
||||
bCanCast = false;
|
||||
bCanGoBack = false;
|
||||
|
||||
@@ -146,7 +147,7 @@ public:
|
||||
uiTimeBombTimer = urand(20000,25000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_UROM_EVENT, IN_PROGRESS);
|
||||
@@ -325,7 +326,7 @@ public:
|
||||
me->DeleteThreatList();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell)
|
||||
{
|
||||
switch(pSpell->Id)
|
||||
{
|
||||
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGO, bool bAdd)
|
||||
void OnGameObjectCreate(GameObject* pGO, bool /*bAdd*/)
|
||||
{
|
||||
if (pGO->GetEntry() == GO_DRAGON_CAGE_DOOR)
|
||||
{
|
||||
if (DATA_DRAKOS_EVENT == DONE)
|
||||
if (GetData(DATA_DRAKOS_EVENT) == DONE)
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
else
|
||||
pGO->SetGoState(GO_STATE_READY);
|
||||
|
||||
@@ -128,8 +128,8 @@ enum Achievements
|
||||
|
||||
static Position SpawnLocations[]=
|
||||
{
|
||||
{946.992f, 397.016f, 208.374f},
|
||||
{960.748f, 382.944f, 208.374f},
|
||||
{946.992f, 397.016f, 208.374f, 0.0f},
|
||||
{960.748f, 382.944f, 208.374f, 0.0f},
|
||||
};
|
||||
|
||||
class mob_tribuna_controller : public CreatureScript
|
||||
|
||||
@@ -167,7 +167,7 @@ enum eAchievementData
|
||||
|
||||
static Position Center[]=
|
||||
{
|
||||
{354.8771f, -12.90240f, 409.803650f},
|
||||
{354.8771f, -12.90240f, 409.803650f, 0.0f},
|
||||
};
|
||||
|
||||
const Position PosSiege[5] =
|
||||
@@ -806,7 +806,7 @@ public:
|
||||
me->GetMap()->CreatureRelocation(me, x,y,z,0);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -851,7 +851,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 /*type*/, uint32 id)
|
||||
{
|
||||
if (id == 1)
|
||||
{
|
||||
@@ -940,7 +940,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -981,7 +981,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (!me->HasAura(AURA_DUMMY_BLUE))
|
||||
me->AddAura(AURA_DUMMY_BLUE, me);
|
||||
@@ -1012,7 +1012,7 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1084,7 +1084,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (!me->HasAura(AURA_DUMMY_GREEN))
|
||||
me->AddAura(AURA_DUMMY_GREEN, me);
|
||||
@@ -1331,7 +1331,7 @@ class go_ulduar_tower : public GameObjectScript
|
||||
public:
|
||||
go_ulduar_tower() : GameObjectScript("go_ulduar_tower") { }
|
||||
|
||||
void OnDestroyed(Player* pPlayer, GameObject* pGO, uint32 value)
|
||||
void OnDestroyed(Player* /*pPlayer*/, GameObject* pGO, uint32 /*value*/)
|
||||
{
|
||||
InstanceScript* pInstance = pGO->GetInstanceScript();
|
||||
if (pGO->GetGOValue()->building.health == 0)
|
||||
@@ -1361,7 +1361,7 @@ class at_RX_214_repair_o_matic_station : public AreaTriggerScript
|
||||
public:
|
||||
at_RX_214_repair_o_matic_station() : AreaTriggerScript("at_RX_214_repair_o_matic_station") { }
|
||||
|
||||
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry* pAt)
|
||||
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry* /*pAt*/)
|
||||
{
|
||||
if(Creature* vehicle = pPlayer->GetVehicleCreatureBase())
|
||||
{
|
||||
|
||||
@@ -442,12 +442,14 @@ public:
|
||||
|
||||
//Enrage stuff
|
||||
if (!enraged)
|
||||
{
|
||||
if (uiEnrageTimer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
enraged = true;
|
||||
} else uiEnrageTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
void exposeHeart()
|
||||
@@ -559,10 +561,10 @@ public:
|
||||
if (pXT002->AI())
|
||||
{
|
||||
uint32 health = me->GetHealth();
|
||||
health -= damage;
|
||||
if (health < 0)
|
||||
if (health <= damage)
|
||||
health = 0;
|
||||
|
||||
else
|
||||
health -= damage;
|
||||
pXT002->AI()->SetData(DATA_TRANSFERED_HEALTH, me->GetMaxHealth() - health);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(GameObject* pGO, uint32 uiEventId)
|
||||
void ProcessEvent(GameObject* /*pGO*/, uint32 uiEventId)
|
||||
{
|
||||
// Flame Leviathan's Tower Event triggers
|
||||
Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID);
|
||||
|
||||
@@ -192,12 +192,14 @@ public:
|
||||
if (bEventInProgress)
|
||||
{
|
||||
if (uiSpawnResTimer)
|
||||
{
|
||||
if (uiSpawnResTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SUMMON_BANSHEE); // Summons directly on caster position
|
||||
// DoCast(me, SPELL_SCOURG_RESURRECTION, true); // Not needed ?
|
||||
uiSpawnResTimer = 0;
|
||||
} else uiSpawnResTimer -= diff;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -356,6 +358,7 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (uiResurectTimer)
|
||||
{
|
||||
if (uiResurectTimer <= diff)
|
||||
{
|
||||
if (uiResurectPhase == 1)
|
||||
@@ -383,11 +386,10 @@ public:
|
||||
uiResurectTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
} else uiResurectTimer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ public:
|
||||
} else ShadowboltTimer -= diff;
|
||||
|
||||
if (!Skeletons)
|
||||
{
|
||||
if ((SummonSkeletonsTimer <= diff))
|
||||
{
|
||||
Creature* Skeleton;
|
||||
@@ -229,6 +230,7 @@ public:
|
||||
}
|
||||
Skeletons = true;
|
||||
} else SummonSkeletonsTimer -= diff;
|
||||
}
|
||||
|
||||
if (FrostTombTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -167,6 +167,7 @@ public:
|
||||
if (!ghost)
|
||||
{
|
||||
if (Check_Timer)
|
||||
{
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
Check_Timer = 5000;
|
||||
@@ -178,15 +179,16 @@ public:
|
||||
Check_Timer = 0;
|
||||
}
|
||||
} else Check_Timer -= diff;
|
||||
}
|
||||
if (Response_Timer && Dalronn_isDead)
|
||||
{
|
||||
if (Response_Timer <= diff)
|
||||
{
|
||||
DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST,me);
|
||||
|
||||
if (Response_Timer)
|
||||
if (Dalronn_isDead)
|
||||
if (Response_Timer <= diff)
|
||||
{
|
||||
DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST,me);
|
||||
|
||||
Response_Timer = 0;
|
||||
} else Response_Timer -= diff;
|
||||
Response_Timer = 0;
|
||||
} else Response_Timer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (Charge_Timer <= diff)
|
||||
@@ -278,6 +280,7 @@ public:
|
||||
{
|
||||
Unit* skarvald = Unit::GetUnit((*me),pInstance->GetData64(DATA_SKARVALD));
|
||||
if (skarvald)
|
||||
{
|
||||
if (skarvald->isDead())
|
||||
{
|
||||
DoScriptText(YELL_DALRONN_SKA_DIED,me);
|
||||
@@ -298,6 +301,7 @@ public:
|
||||
temp->AI()->AttackStart(Killer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,16 +325,19 @@ public:
|
||||
return;
|
||||
|
||||
if (AggroYell_Timer)
|
||||
{
|
||||
if (AggroYell_Timer <= diff)
|
||||
{
|
||||
DoScriptText(YELL_DALRONN_AGGRO,me);
|
||||
|
||||
AggroYell_Timer = 0;
|
||||
} else AggroYell_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!ghost)
|
||||
{
|
||||
if (Check_Timer)
|
||||
{
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
Check_Timer = 5000;
|
||||
@@ -342,15 +349,16 @@ public:
|
||||
Check_Timer = 0;
|
||||
}
|
||||
} else Check_Timer -= diff;
|
||||
}
|
||||
|
||||
if (Response_Timer)
|
||||
if (Skarvald_isDead)
|
||||
if (Response_Timer <= diff)
|
||||
{
|
||||
DoScriptText(YELL_DALRONN_SKA_DIEDFIRST,me);
|
||||
|
||||
Response_Timer = 0;
|
||||
} else Response_Timer -= diff;
|
||||
if (Response_Timer && Skarvald_isDead)
|
||||
{
|
||||
if (Response_Timer <= diff)
|
||||
{
|
||||
DoScriptText(YELL_DALRONN_SKA_DIEDFIRST,me);
|
||||
Response_Timer = 0;
|
||||
} else Response_Timer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (ShadowBolt_Timer <= diff)
|
||||
@@ -372,6 +380,7 @@ public:
|
||||
} else Debilitate_Timer -= diff;
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (Summon_Timer <= diff)
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
@@ -380,6 +389,7 @@ public:
|
||||
Summon_Timer = (rand()%10000) + 20000;
|
||||
}
|
||||
} else Summon_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -789,6 +789,7 @@ public:
|
||||
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_MASSIVE_JORMUNGAR) : 0); break;
|
||||
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_FEROCIOUS_RHINO) : 0); break;
|
||||
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (pNext)
|
||||
@@ -809,7 +810,7 @@ public:
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
if (id<0 || id>4)
|
||||
if (id > 4)
|
||||
return;
|
||||
Creature *pNext = NULL;
|
||||
switch(id)
|
||||
@@ -819,6 +820,7 @@ public:
|
||||
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_MASSIVE_JORMUNGAR) : 0); break;
|
||||
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_FEROCIOUS_RHINO) : 0); break;
|
||||
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
|
||||
default: break;
|
||||
}
|
||||
if (pNext)
|
||||
DoCast(pNext, SPELL_ORB_CHANNEL, false);
|
||||
|
||||
@@ -77,9 +77,9 @@ enum CombatPhase
|
||||
|
||||
static Position RitualChannelerPos[]=
|
||||
{
|
||||
{296.42f, -355.01f, 90.94f},
|
||||
{302.36f, -352.01f, 90.54f},
|
||||
{291.39f, -350.89f, 90.54f}
|
||||
{296.42f, -355.01f, 90.94f, 0.0f},
|
||||
{302.36f, -352.01f, 90.54f, 0.0f},
|
||||
{291.39f, -350.89f, 90.54f, 0.0f}
|
||||
};
|
||||
static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
|
||||
static Position SvalaPos = { 296.632f, -346.075f, 90.6307f, 1.58f };
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
uiIntroTimer = 200;
|
||||
break;
|
||||
case 6:
|
||||
if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS))
|
||||
if (me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS))
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(DATA_SVALA_DISPLAY_ID);
|
||||
@@ -341,6 +341,7 @@ public:
|
||||
} else uiCallFlamesTimer -= diff;
|
||||
|
||||
if (!bSacrificed)
|
||||
{
|
||||
if (uiRitualOfSwordTimer <= diff)
|
||||
{
|
||||
if (Unit* pSacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
@@ -364,6 +365,7 @@ public:
|
||||
bSacrificed = true;
|
||||
}
|
||||
} else uiRitualOfSwordTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -518,16 +518,16 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action )
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_TRAIN:
|
||||
pPlayer->SEND_TRAINERLIST( pCreature->GetGUID() );
|
||||
pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
pPlayer->SEND_VENDORLIST( pCreature->GetGUID() );
|
||||
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
+13
-13
@@ -93,6 +93,7 @@ EndScriptData */
|
||||
#define OLUM_Z -7.54773f
|
||||
#define OLUM_O 0.401581f
|
||||
|
||||
#define MAX_ADVISORS 3
|
||||
//Fathom-Lord Karathress AI
|
||||
class boss_fathomlord_karathress : public CreatureScript
|
||||
{
|
||||
@@ -122,7 +123,7 @@ public:
|
||||
|
||||
bool BlessingOfTides;
|
||||
|
||||
uint64 Advisors[3];
|
||||
uint64 Advisors[MAX_ADVISORS];
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -134,24 +135,23 @@ public:
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
uint64 RAdvisors[3];
|
||||
uint64 RAdvisors[MAX_ADVISORS];
|
||||
RAdvisors[0] = pInstance->GetData64(DATA_SHARKKIS);
|
||||
RAdvisors[1] = pInstance->GetData64(DATA_TIDALVESS);
|
||||
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
//Respawn of the 3 Advisors
|
||||
Creature* pAdvisor = NULL;
|
||||
for (int i=0; i<3; ++i)
|
||||
|
||||
if (RAdvisors[i])
|
||||
{
|
||||
pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
|
||||
if (pAdvisor && !pAdvisor->isAlive())
|
||||
for (int i=0; i<MAX_ADVISORS; ++i)
|
||||
if (RAdvisors[i])
|
||||
{
|
||||
pAdvisor->Respawn();
|
||||
pAdvisor->AI()->EnterEvadeMode();
|
||||
pAdvisor->GetMotionMaster()->MoveTargetedHome();
|
||||
pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
|
||||
if (pAdvisor && !pAdvisor->isAlive())
|
||||
{
|
||||
pAdvisor->Respawn();
|
||||
pAdvisor->AI()->EnterEvadeMode();
|
||||
pAdvisor->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
}
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
BlessingOfTides = true;
|
||||
bool continueTriggering = false;
|
||||
Creature* Advisor;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
|
||||
if (Advisors[i])
|
||||
{
|
||||
Advisor = (Unit::GetCreature(*me, Advisors[i]));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user