Core: More warning fixes
This commit is contained in:
@@ -539,8 +539,8 @@ inline Player* Battleground::_GetPlayer(BattlegroundPlayerMap::const_iterator it
|
|||||||
|
|
||||||
inline Player* Battleground::_GetPlayerForTeam(uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char* context) const
|
inline Player* Battleground::_GetPlayerForTeam(uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char* context) const
|
||||||
{
|
{
|
||||||
Player* player = NULL;
|
Player* player = _GetPlayer(itr, context);
|
||||||
if (player = _GetPlayer(itr, context))
|
if (player)
|
||||||
{
|
{
|
||||||
uint32 team = itr->second.Team;
|
uint32 team = itr->second.Team;
|
||||||
if (!team)
|
if (!team)
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ inline bool ReadHex(std::istringstream& iss, uint32& res, uint32 length)
|
|||||||
{
|
{
|
||||||
std::istringstream::pos_type pos = iss.tellg();
|
std::istringstream::pos_type pos = iss.tellg();
|
||||||
iss >> std::hex >> res;
|
iss >> std::hex >> res;
|
||||||
uint32 size = uint32(iss.gcount());
|
//uint32 size = uint32(iss.gcount());
|
||||||
if (length && uint32(iss.tellg() - pos) != length)
|
if (length && uint32(iss.tellg() - pos) != length)
|
||||||
return false;
|
return false;
|
||||||
return !iss.fail() && !iss.eof();
|
return !iss.fail() && !iss.eof();
|
||||||
@@ -93,7 +93,7 @@ inline bool ReadHex(std::istringstream& iss, uint32& res, uint32 length)
|
|||||||
#define DELIMITER ':'
|
#define DELIMITER ':'
|
||||||
#define PIPE_CHAR '|'
|
#define PIPE_CHAR '|'
|
||||||
|
|
||||||
bool ChatLink::ValidateName(char* buffer, const char* context)
|
bool ChatLink::ValidateName(char* buffer, const char* /*context*/)
|
||||||
{
|
{
|
||||||
_name = buffer;
|
_name = buffer;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(0, GetCreatureInfo(), data);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(0, GetCreatureInfo(), data);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
if (!minfo) // Cancel load if no model defined
|
if (!minfo) // Cancel load if no model defined
|
||||||
{
|
{
|
||||||
sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry);
|
sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry);
|
||||||
@@ -779,8 +779,8 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoadCreaturesAddon();
|
LoadCreaturesAddon();
|
||||||
uint32 displayID = 0;
|
uint32 displayID = GetNativeDisplayId();
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID = GetNativeDisplayId());
|
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
if (minfo && !isTotem()) // Cancel load if no model defined or if totem
|
if (minfo && !isTotem()) // Cancel load if no model defined or if totem
|
||||||
{
|
{
|
||||||
SetDisplayId(displayID);
|
SetDisplayId(displayID);
|
||||||
@@ -1618,8 +1618,8 @@ void Creature::Respawn(bool force)
|
|||||||
else
|
else
|
||||||
setDeathState(JUST_ALIVED);
|
setDeathState(JUST_ALIVED);
|
||||||
|
|
||||||
uint32 displayID = 0;
|
uint32 displayID = GetNativeDisplayId();
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID = GetNativeDisplayId());
|
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
if (minfo) // Cancel load if no model defined
|
if (minfo) // Cancel load if no model defined
|
||||||
{
|
{
|
||||||
SetDisplayId(displayID);
|
SetDisplayId(displayID);
|
||||||
|
|||||||
@@ -11150,7 +11150,6 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
|
|||||||
if (pItem->IsBindedNotWith(this))
|
if (pItem->IsBindedNotWith(this))
|
||||||
return EQUIP_ERR_DONT_OWN_THAT_ITEM;
|
return EQUIP_ERR_DONT_OWN_THAT_ITEM;
|
||||||
|
|
||||||
Bag *pBag;
|
|
||||||
ItemTemplate const *pBagProto;
|
ItemTemplate const *pBagProto;
|
||||||
|
|
||||||
// item is 'one item only'
|
// item is 'one item only'
|
||||||
@@ -11201,11 +11200,11 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
|
|||||||
|
|
||||||
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||||
{
|
{
|
||||||
if (pBag = GetBagByPos(t))
|
if (Bag* bag = GetBagByPos(t))
|
||||||
{
|
{
|
||||||
if (ItemCanGoIntoBag(pItem->GetTemplate(), pBag->GetTemplate()))
|
if (ItemCanGoIntoBag(pItem->GetTemplate(), bag->GetTemplate()))
|
||||||
{
|
{
|
||||||
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
|
for (uint32 j = 0; j < bag->GetBagSize(); j++)
|
||||||
{
|
{
|
||||||
pItem2 = GetItemByPos(t, j);
|
pItem2 = GetItemByPos(t, j);
|
||||||
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||||
@@ -11258,15 +11257,15 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
|
|||||||
|
|
||||||
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||||
{
|
{
|
||||||
if (pBag = GetBagByPos(t))
|
if (Bag* bag = GetBagByPos(t))
|
||||||
{
|
{
|
||||||
pBagProto = pBag->GetTemplate();
|
pBagProto = bag->GetTemplate();
|
||||||
|
|
||||||
// not plain container check
|
// not plain container check
|
||||||
if (pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER) &&
|
if (pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER) &&
|
||||||
ItemCanGoIntoBag(pProto, pBagProto))
|
ItemCanGoIntoBag(pProto, pBagProto))
|
||||||
{
|
{
|
||||||
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
|
for (uint32 j = 0; j < bag->GetBagSize(); j++)
|
||||||
{
|
{
|
||||||
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
|
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
|
||||||
{
|
{
|
||||||
@@ -11297,15 +11296,15 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
|
|||||||
// search free slot in bags
|
// search free slot in bags
|
||||||
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||||
{
|
{
|
||||||
if (pBag = GetBagByPos(t))
|
if (Bag* bag = GetBagByPos(t))
|
||||||
{
|
{
|
||||||
pBagProto = pBag->GetTemplate();
|
pBagProto = bag->GetTemplate();
|
||||||
|
|
||||||
// special bag already checked
|
// special bag already checked
|
||||||
if (pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER))
|
if (pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
|
for (uint32 j = 0; j < bag->GetBagSize(); j++)
|
||||||
{
|
{
|
||||||
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
|
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void Totem::InitStats(uint32 duration)
|
|||||||
if (m_owner->GetTypeId() == TYPEID_PLAYER && cinfo)
|
if (m_owner->GetTypeId() == TYPEID_PLAYER && cinfo)
|
||||||
{
|
{
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(m_owner->ToPlayer()->GetTeam(), cinfo);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(m_owner->ToPlayer()->GetTeam(), cinfo);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
switch (m_owner->ToPlayer()->GetTeam())
|
switch (m_owner->ToPlayer()->GetTeam())
|
||||||
{
|
{
|
||||||
case ALLIANCE:
|
case ALLIANCE:
|
||||||
|
|||||||
@@ -1332,7 +1332,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
|
|||||||
{
|
{
|
||||||
CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(data2->id);
|
CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(data2->id);
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(0, cinfo, data2);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(0, cinfo, data2);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
|
|
||||||
if (data2->equipmentId == 0)
|
if (data2->equipmentId == 0)
|
||||||
itr->second.equipement_id_prev = cinfo->equipmentId;
|
itr->second.equipement_id_prev = cinfo->equipmentId;
|
||||||
|
|||||||
@@ -1122,9 +1122,9 @@ void ObjectMgr::ChooseCreatureFlags(const CreatureTemplate *cinfo, uint32& npcfl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32 &displayID)
|
CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32* displayID)
|
||||||
{
|
{
|
||||||
CreatureModelInfo const* minfo = GetCreatureModelInfo(displayID);
|
CreatureModelInfo const* minfo = GetCreatureModelInfo(*displayID);
|
||||||
if (!minfo)
|
if (!minfo)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -1139,7 +1139,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32 &display
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Model ID changed
|
// Model ID changed
|
||||||
displayID = minfo->modelid_other_gender;
|
*displayID = minfo->modelid_other_gender;
|
||||||
return minfo_tmp;
|
return minfo_tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5788,7 +5788,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// minfo is not actually used but the mount_id was updated
|
// minfo is not actually used but the mount_id was updated
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(mount_id);
|
sObjectMgr->GetCreatureModelRandomGender(&mount_id);
|
||||||
|
|
||||||
return mount_id;
|
return mount_id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -636,7 +636,7 @@ class ObjectMgr
|
|||||||
CreatureTemplate const* GetCreatureTemplate(uint32 entry);
|
CreatureTemplate const* GetCreatureTemplate(uint32 entry);
|
||||||
CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; }
|
CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; }
|
||||||
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
|
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
|
||||||
CreatureModelInfo const* GetCreatureModelRandomGender(uint32 &displayID);
|
CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID);
|
||||||
uint32 ChooseDisplayId(uint32 team, const CreatureTemplate *cinfo, const CreatureData *data = NULL);
|
uint32 ChooseDisplayId(uint32 team, const CreatureTemplate *cinfo, const CreatureData *data = NULL);
|
||||||
static void ChooseCreatureFlags(const CreatureTemplate *cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData *data = NULL);
|
static void ChooseCreatureFlags(const CreatureTemplate *cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData *data = NULL);
|
||||||
EquipmentInfo const *GetEquipmentInfo(uint32 entry);
|
EquipmentInfo const *GetEquipmentInfo(uint32 entry);
|
||||||
|
|||||||
@@ -3417,8 +3417,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
|||||||
team = target->ToPlayer()->GetTeam();
|
team = target->ToPlayer()->GetTeam();
|
||||||
|
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
||||||
|
sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
|
||||||
|
|
||||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
||||||
}
|
}
|
||||||
@@ -3878,7 +3877,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
|||||||
team = target->ToPlayer()->GetTeam();
|
team = target->ToPlayer()->GetTeam();
|
||||||
|
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
|
|
||||||
//some spell has one aura of mount and one of vehicle
|
//some spell has one aura of mount and one of vehicle
|
||||||
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||||
@@ -6154,7 +6153,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
|||||||
team = target->ToPlayer()->GetTeam();
|
team = target->ToPlayer()->GetTeam();
|
||||||
|
|
||||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team, creatureInfo);
|
uint32 displayID = sObjectMgr->ChooseDisplayId(team, creatureInfo);
|
||||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||||
|
|
||||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ void GmTicket::SaveToDB(SQLTransaction& trans) const
|
|||||||
CharacterDatabase.ExecuteOrAppend(trans, stmt);
|
CharacterDatabase.ExecuteOrAppend(trans, stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GmTicket::DeleteFromDB(SQLTransaction& trans)
|
void GmTicket::DeleteFromDB()
|
||||||
{
|
{
|
||||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GM_TICKET);
|
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GM_TICKET);
|
||||||
stmt->setUInt32(0, _id);
|
stmt->setUInt32(0, _id);
|
||||||
@@ -286,8 +286,7 @@ void TicketMgr::RemoveTicket(uint32 ticketId)
|
|||||||
{
|
{
|
||||||
if (GmTicket* ticket = GetTicket(ticketId))
|
if (GmTicket* ticket = GetTicket(ticketId))
|
||||||
{
|
{
|
||||||
SQLTransaction trans = SQLTransaction(NULL);
|
ticket->DeleteFromDB();
|
||||||
ticket->DeleteFromDB(trans);
|
|
||||||
_ticketList.erase(ticketId);
|
_ticketList.erase(ticketId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
|
|
||||||
bool LoadFromDB(Field* fields);
|
bool LoadFromDB(Field* fields);
|
||||||
void SaveToDB(SQLTransaction& trans) const;
|
void SaveToDB(SQLTransaction& trans) const;
|
||||||
void DeleteFromDB(SQLTransaction& trans);
|
void DeleteFromDB();
|
||||||
|
|
||||||
void WritePacket(WorldPacket& data) const;
|
void WritePacket(WorldPacket& data) const;
|
||||||
void SendResponse(WorldSession* session) const;
|
void SendResponse(WorldSession* session) const;
|
||||||
|
|||||||
+1
-1
@@ -1215,7 +1215,7 @@ class npc_crate_helper : public CreatureScript
|
|||||||
_marked = false;
|
_marked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHit(Unit* caster, SpellEntry const* spell)
|
void SpellHit(Unit* /*caster*/, SpellEntry const* spell)
|
||||||
{
|
{
|
||||||
if (spell->Id == SPELL_ARCANE_DISRUPTION && !_marked)
|
if (spell->Id == SPELL_ARCANE_DISRUPTION && !_marked)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,11 +190,10 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 id)
|
void MovementInform(uint32 type, uint32 id)
|
||||||
{
|
{
|
||||||
if (id == 1)
|
if (type == POINT_MOTION_TYPE && id == 1)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DIRECTION, me);
|
DoScriptText(SAY_DIRECTION, me);
|
||||||
me->ForcedDespawn();
|
me->ForcedDespawn();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -340,8 +340,8 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_YELL_2, 0, 0, _phase);
|
events.ScheduleEvent(EVENT_YELL_2, 0, 0, _phase);
|
||||||
events.ScheduleEvent(EVENT_YELL_3, 8*IN_MILLISECONDS, 0, _phase);
|
events.ScheduleEvent(EVENT_YELL_3, 8*IN_MILLISECONDS, 0, _phase);
|
||||||
events.ScheduleEvent(EVENT_YELL_4, 16*IN_MILLISECONDS, 0, _phase);
|
events.ScheduleEvent(EVENT_YELL_4, 16*IN_MILLISECONDS, 0, _phase);
|
||||||
events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, (7, 16)*IN_MILLISECONDS, 0, _phase);
|
events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, urand(7, 16)*IN_MILLISECONDS, 0, _phase);
|
||||||
events.ScheduleEvent(EVENT_STATIC_FIELD, (20, 30)*IN_MILLISECONDS, 0, _phase);
|
events.ScheduleEvent(EVENT_STATIC_FIELD, urand(20, 30)*IN_MILLISECONDS, 0, _phase);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -474,7 +474,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(uint32 const diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
@@ -571,11 +571,11 @@ public:
|
|||||||
break;
|
break;
|
||||||
case EVENT_SURGE_POWER_PHASE_3:
|
case EVENT_SURGE_POWER_PHASE_3:
|
||||||
DoCast(GetTargetPhaseThree(), SPELL_SURGE_POWER_PHASE_3);
|
DoCast(GetTargetPhaseThree(), SPELL_SURGE_POWER_PHASE_3);
|
||||||
events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, (7, 16)*IN_MILLISECONDS, 0, PHASE_THREE);
|
events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, urand(7, 16)*IN_MILLISECONDS, 0, PHASE_THREE);
|
||||||
break;
|
break;
|
||||||
case EVENT_STATIC_FIELD:
|
case EVENT_STATIC_FIELD:
|
||||||
DoCast(GetTargetPhaseThree(), SPELL_STATIC_FIELD);
|
DoCast(GetTargetPhaseThree(), SPELL_STATIC_FIELD);
|
||||||
events.ScheduleEvent(EVENT_STATIC_FIELD, (20, 30)*IN_MILLISECONDS, 0, PHASE_THREE);
|
events.ScheduleEvent(EVENT_STATIC_FIELD, urand(20, 30)*IN_MILLISECONDS, 0, PHASE_THREE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -738,7 +738,7 @@ public:
|
|||||||
summonTimer = urand(5, 7)*IN_MILLISECONDS;
|
summonTimer = urand(5, 7)*IN_MILLISECONDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(uint32 const diff)
|
||||||
{
|
{
|
||||||
if (!me->HasAura(SPELL_PORTAL_VISUAL_CLOSED) &&
|
if (!me->HasAura(SPELL_PORTAL_VISUAL_CLOSED) &&
|
||||||
!me->HasAura(SPELL_PORTAL_OPENED))
|
!me->HasAura(SPELL_PORTAL_OPENED))
|
||||||
@@ -813,7 +813,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
{
|
{
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return;
|
return;
|
||||||
@@ -874,7 +874,7 @@ public:
|
|||||||
instance = creature->GetInstanceScript();
|
instance = creature->GetInstanceScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PassengerBoarded(Unit* unit, int8 seat, bool apply)
|
void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply)
|
||||||
{
|
{
|
||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
@@ -919,7 +919,7 @@ public:
|
|||||||
// we dont evade
|
// we dont evade
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(const int32 action)
|
void DoAction(int32 const action)
|
||||||
{
|
{
|
||||||
if (me->GetEntry() != NPC_HOVER_DISK_CASTER)
|
if (me->GetEntry() != NPC_HOVER_DISK_CASTER)
|
||||||
return;
|
return;
|
||||||
@@ -952,9 +952,8 @@ public:
|
|||||||
// we dont do melee damage!
|
// we dont do melee damage!
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaypointReached(uint32 i)
|
void WaypointReached(uint32 /*i*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -988,7 +987,7 @@ public:
|
|||||||
DoCast(me, SPELL_ARCANE_OVERLOAD, false);
|
DoCast(me, SPELL_ARCANE_OVERLOAD, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
{
|
{
|
||||||
// we dont do melee damage!
|
// we dont do melee damage!
|
||||||
}
|
}
|
||||||
@@ -1087,7 +1086,7 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_YELL_1, 0);
|
events.ScheduleEvent(EVENT_YELL_1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
{
|
{
|
||||||
while (uint32 eventId = events.ExecuteEvent())
|
while (uint32 eventId = events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class go_razorscale_harpoon : public GameObjectScript
|
|||||||
public:
|
public:
|
||||||
go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") {}
|
go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") {}
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, GameObject* go)
|
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||||
{
|
{
|
||||||
InstanceScript* instance = go->GetInstanceScript();
|
InstanceScript* instance = go->GetInstanceScript();
|
||||||
if (Creature* razorscale = ObjectAccessor::GetCreature(*go, instance ? instance->GetData64(TYPE_RAZORSCALE) : 0))
|
if (Creature* razorscale = ObjectAccessor::GetCreature(*go, instance ? instance->GetData64(TYPE_RAZORSCALE) : 0))
|
||||||
@@ -360,7 +360,7 @@ class boss_razorscale : public CreatureScript
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 id)
|
void MovementInform(uint32 type, uint32 id)
|
||||||
{
|
{
|
||||||
if (id == 1)
|
if (type == POINT_MOTION_TYPE && id == 1)
|
||||||
{
|
{
|
||||||
phase = PHASE_GROUND;
|
phase = PHASE_GROUND;
|
||||||
events.SetPhase(PHASE_GROUND);
|
events.SetPhase(PHASE_GROUND);
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
enum corki
|
enum CorkiData
|
||||||
{
|
{
|
||||||
// first quest
|
// first quest
|
||||||
QUEST_HELP = 9923,
|
QUEST_HELP = 9923,
|
||||||
@@ -993,7 +993,7 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 id)
|
void MovementInform(uint32 type, uint32 id)
|
||||||
{
|
{
|
||||||
if (id == 1)
|
if (type == POINT_MOTION_TYPE && id == 1)
|
||||||
{
|
{
|
||||||
Say_Timer = 5000;
|
Say_Timer = 5000;
|
||||||
ReleasedFromCage = true;
|
ReleasedFromCage = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user