mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Fixed warnings, unused code and typos.
Including fix _SCallback for 3 params, triggred mode correct call for .cast back and .cast target. Remove outdated code for support old 19421 (and ranks) implementation in client data.
This commit is contained in:
parent
ce351382a3
commit
88b1974df6
46 changed files with 92 additions and 159 deletions
|
|
@ -140,7 +140,7 @@ namespace MaNGOS
|
|||
void _Execute() { (*m_method)(m_param1, m_param2, m_param3); }
|
||||
public:
|
||||
_SCallback(Method method, ParamType1 param1, ParamType2 param2, ParamType3 param3)
|
||||
: m_method(method), m_param1(param1), m_param2(param2) {}
|
||||
: m_method(method), m_param1(param1), m_param2(param2), m_param3(param3) {}
|
||||
_SCallback(_SCallback < ParamType1, ParamType2, ParamType3 > const& cb)
|
||||
: m_method(cb.m_method), m_param1(cb.m_param1), m_param2(cb.m_param2), m_param3(cb.m_param3) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ void WorldSession::HandleBattleGroundPlayerPortOpcode( WorldPacket &recv_data )
|
|||
// if the player is dead, resurrect him before teleport
|
||||
if(!_player->isAlive())
|
||||
{
|
||||
_player->ResurrectPlayer(1.0f,false);
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->SpawnCorpseBones();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ void BattleGroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
|
|||
if(GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
|
||||
const char *message;
|
||||
const char *message = NULL;
|
||||
uint8 type = 0;
|
||||
|
||||
//alliance flag picked up from base
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void Corpse::DeleteFromDB()
|
|||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE player = '%d' AND corpse_type <> '0'", GUID_LOPART(GetOwnerGUID()));
|
||||
}
|
||||
|
||||
bool Corpse::LoadFromDB(uint32 guid, QueryResult *result, uint32 InstanceId)
|
||||
bool Corpse::LoadFromDB(uint32 guid, QueryResult *result)
|
||||
{
|
||||
bool external = (result != NULL);
|
||||
if (!external)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Corpse : public WorldObject
|
|||
bool Create( uint32 guidlow, Player *owner, uint32 mapid, float x, float y, float z, float ang );
|
||||
|
||||
void SaveToDB();
|
||||
bool LoadFromDB(uint32 guid, QueryResult *result, uint32 InstanceId);
|
||||
bool LoadFromDB(uint32 guid, QueryResult *result);
|
||||
bool LoadFromDB(uint32 guid, Field *fields);
|
||||
|
||||
void DeleteBonesFromWorld();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
|
|||
|
||||
CharacterDatabase.escape_string(ticketText);
|
||||
|
||||
if(GMTicket* ticket = ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow()))
|
||||
if(ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow()))
|
||||
{
|
||||
WorldPacket data( SMSG_GMTICKET_CREATE, 4 );
|
||||
data << uint32(1);
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
|||
}
|
||||
|
||||
uint32 entry = data->id;
|
||||
uint32 map_id = data->mapid;
|
||||
//uint32 map_id = data->mapid; // already used before call
|
||||
float x = data->posX;
|
||||
float y = data->posY;
|
||||
float z = data->posZ;
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ namespace MaNGOS
|
|||
|
||||
return false;
|
||||
}
|
||||
template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED* u) { return false; }
|
||||
template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
|
||||
private:
|
||||
Unit* const i_funit;
|
||||
float i_range;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 &x, c
|
|||
}
|
||||
|
||||
void
|
||||
IdleState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 &x, const uint32 &y, const uint32 &) const
|
||||
IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &) const
|
||||
{
|
||||
m.ResetGridExpiry(grid);
|
||||
grid.SetGridState(GRID_STATE_REMOVAL);
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ void WorldSession::HandleRaidReadyCheckOpcode( WorldPacket & recv_data )
|
|||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidReadyCheckFinishOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleRaidReadyCheckFinishOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
//Group* group = GetPlayer()->GetGroup();
|
||||
//if(!group)
|
||||
|
|
|
|||
|
|
@ -950,15 +950,10 @@ void Guild::DisplayGuildBankMoneyUpdate()
|
|||
WorldPacket data(SMSG_GUILD_BANK_LIST, 8+1+4+1+1);
|
||||
|
||||
data << uint64(GetGuildBankMoney());
|
||||
data << uint8(0);
|
||||
// remaining slots for today
|
||||
|
||||
size_t rempos = data.wpos();
|
||||
data << uint32(0); // will be filled later
|
||||
data << uint8(0); // TabId, default 0
|
||||
data << uint32(0); // slot withdrow, default 0
|
||||
data << uint8(0); // Tell client this is a tab content packet
|
||||
|
||||
data << uint8(0); // not send items
|
||||
|
||||
BroadcastPacket(&data);
|
||||
|
||||
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,6 @@ void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
|
|||
uint8 BankTab, BankTabSlot, AutoStore, AutoStoreCount, PlayerSlot, PlayerBag, SplitedAmount = 0;
|
||||
uint8 BankTabDst, BankTabSlotDst, unk2, ToChar = 1;
|
||||
uint32 ItemEntry, unk1;
|
||||
bool BankToChar = false;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data,8+1);
|
||||
recv_data >> GoGuid >> BankToBank;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ DistractMovementGenerator::Finalize(Unit& owner)
|
|||
}
|
||||
|
||||
bool
|
||||
DistractMovementGenerator::Update(Unit& owner, const uint32& time_diff)
|
||||
DistractMovementGenerator::Update(Unit& /*owner*/, const uint32& time_diff)
|
||||
{
|
||||
if(time_diff > m_timer)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ void InstanceSaveManager::_DelHelper(DatabaseType &db, const char *fields, const
|
|||
va_list ap;
|
||||
char szQueryTail [MAX_QUERY_LEN];
|
||||
va_start(ap, queryTail);
|
||||
int res = vsnprintf( szQueryTail, MAX_QUERY_LEN, queryTail, ap );
|
||||
vsnprintf( szQueryTail, MAX_QUERY_LEN, queryTail, ap );
|
||||
va_end(ap);
|
||||
|
||||
QueryResult *result = db.PQuery("SELECT %s FROM %s %s", fields, table, szQueryTail);
|
||||
|
|
@ -246,8 +246,6 @@ void InstanceSaveManager::_DelHelper(DatabaseType &db, const char *fields, const
|
|||
|
||||
void InstanceSaveManager::CleanupInstances()
|
||||
{
|
||||
uint64 now = (uint64)time(NULL);
|
||||
|
||||
barGoLink bar(2);
|
||||
bar.step();
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ bool ChatHandler::HandleHelpCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleCommandsCommand(const char* args)
|
||||
bool ChatHandler::HandleCommandsCommand(const char* /*args*/)
|
||||
{
|
||||
ShowHelpForCommand(getCommandTable(), "");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -438,8 +438,6 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
|||
Map* cMap = MapManager::Instance().GetMap(chr->GetMapId(),chr);
|
||||
if(cMap->Instanceable())
|
||||
{
|
||||
Map* pMap = MapManager::Instance().GetMap(_player->GetMapId(),_player);
|
||||
|
||||
// we have to go to instance, and can go to player only if:
|
||||
// 1) we are in his group (either as leader or as member)
|
||||
// 2) we are not bound to any group and have GM mode on
|
||||
|
|
@ -1932,7 +1930,6 @@ bool ChatHandler::HandleSendMailCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
uint32 mailId = objmgr.GenerateMailID();
|
||||
uint32 sender_guidlo = m_session->GetPlayer()->GetGUIDLow();
|
||||
uint32 messagetype = MAIL_NORMAL;
|
||||
uint32 stationery = MAIL_STATIONERY_GM;
|
||||
|
|
|
|||
|
|
@ -749,7 +749,7 @@ bool ChatHandler::HandleModifyRepCommand(const char * args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleNameCommand(const char* args)
|
||||
bool ChatHandler::HandleNameCommand(const char* /*args*/)
|
||||
{
|
||||
/* Temp. disabled
|
||||
if(!*args)
|
||||
|
|
@ -3591,7 +3591,7 @@ bool ChatHandler::HandleLookupEventCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleEventActiveListCommand(const char* args)
|
||||
bool ChatHandler::HandleEventActiveListCommand(const char* /*args*/)
|
||||
{
|
||||
uint32 counter = 0;
|
||||
|
||||
|
|
@ -3850,8 +3850,6 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
|
|||
if(!Utf8toWStr(args,wnamepart))
|
||||
return false;
|
||||
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
wstrToLower( wnamepart );
|
||||
|
||||
|
|
@ -4117,7 +4115,7 @@ bool ChatHandler::HandleNpcUnFollowCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleNpcTameCommand(const char* args)
|
||||
bool ChatHandler::HandleNpcTameCommand(const char* /*args*/)
|
||||
{
|
||||
Creature *creatureTarget = getSelectedCreature ();
|
||||
if (!creatureTarget || creatureTarget->isPet ())
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ bool ChatHandler::HandleReloadAllItemCommand(const char*)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadAllLocalesCommand(const char* args)
|
||||
bool ChatHandler::HandleReloadAllLocalesCommand(const char* /*args*/)
|
||||
{
|
||||
HandleReloadLocalesCreatureCommand("a");
|
||||
HandleReloadLocalesGameobjectCommand("a");
|
||||
|
|
@ -170,7 +170,7 @@ bool ChatHandler::HandleReloadAllLocalesCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadConfigCommand(const char* arg)
|
||||
bool ChatHandler::HandleReloadConfigCommand(const char* /*args*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading config settings..." );
|
||||
sWorld.LoadConfigSettings(true);
|
||||
|
|
@ -5754,7 +5754,7 @@ bool ChatHandler::HandleCastBackCommand(const char* args)
|
|||
caster->BuildHeartBeatMsg(&data);
|
||||
caster->SendMessageToSet(&data,true);
|
||||
|
||||
caster->CastSpell(m_session->GetPlayer(),spell,false);
|
||||
caster->CastSpell(m_session->GetPlayer(),spell,triggered);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -5845,7 +5845,7 @@ bool ChatHandler::HandleCastTargetCommand(const char* args)
|
|||
caster->BuildHeartBeatMsg(&data);
|
||||
caster->SendMessageToSet(&data,true);
|
||||
|
||||
caster->CastSpell(caster->getVictim(),spell,false);
|
||||
caster->CastSpell(caster->getVictim(),spell,triggered);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class LootTemplate::LootGroup // A set of loot def
|
|||
|
||||
void Verify(LootStore const& lootstore, uint32 id, uint32 group_id) const;
|
||||
void CollectLootIds(LootIdSet& set) const;
|
||||
void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const;
|
||||
void CheckLootRefs(LootIdSet* ref_set) const;
|
||||
private:
|
||||
LootStoreItemList ExplicitlyChanced; // Entries with chances defined in DB
|
||||
LootStoreItemList EqualChanced; // Zero chances - every entry takes the same chance
|
||||
|
|
@ -206,7 +206,7 @@ void LootStore::LoadAndCollectLootIds(LootIdSet& ids_set)
|
|||
void LootStore::CheckLootRefs(LootIdSet* ref_set) const
|
||||
{
|
||||
for(LootTemplateMap::const_iterator ltItr = m_LootTemplates.begin(); ltItr != m_LootTemplates.end(); ++ltItr)
|
||||
ltItr->second->CheckLootRefs(m_LootTemplates,ref_set);
|
||||
ltItr->second->CheckLootRefs(ref_set);
|
||||
}
|
||||
|
||||
void LootStore::ReportUnusedIds(LootIdSet const& ids_set) const
|
||||
|
|
@ -855,7 +855,7 @@ void LootTemplate::LootGroup::Verify(LootStore const& lootstore, uint32 id, uint
|
|||
}
|
||||
}
|
||||
|
||||
void LootTemplate::LootGroup::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const
|
||||
void LootTemplate::LootGroup::CheckLootRefs(LootIdSet* ref_set) const
|
||||
{
|
||||
for (LootStoreItemList::const_iterator ieItr=ExplicitlyChanced.begin(); ieItr != ExplicitlyChanced.end(); ++ieItr)
|
||||
{
|
||||
|
|
@ -1009,7 +1009,7 @@ void LootTemplate::Verify(LootStore const& lootstore, uint32 id) const
|
|||
// TODO: References validity checks
|
||||
}
|
||||
|
||||
void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const
|
||||
void LootTemplate::CheckLootRefs(LootIdSet* ref_set) const
|
||||
{
|
||||
for(LootStoreItemList::const_iterator ieItr = Entries.begin(); ieItr != Entries.end(); ++ieItr)
|
||||
{
|
||||
|
|
@ -1023,7 +1023,7 @@ void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_se
|
|||
}
|
||||
|
||||
for(LootGroups::const_iterator grItr = Groups.begin(); grItr != Groups.end(); ++grItr)
|
||||
grItr->CheckLootRefs(store,ref_set);
|
||||
grItr->CheckLootRefs(ref_set);
|
||||
}
|
||||
|
||||
void LoadLootTemplates_Creature()
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class LootTemplate
|
|||
|
||||
// Checks integrity of the template
|
||||
void Verify(LootStore const& store, uint32 Id) const;
|
||||
void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const;
|
||||
void CheckLootRefs(LootIdSet* ref_set) const;
|
||||
private:
|
||||
LootStoreItemList Entries; // not grouped only
|
||||
LootGroups Groups; // groups have own (optimised) processing, grouped entries go there
|
||||
|
|
|
|||
|
|
@ -346,13 +346,13 @@ void WorldSession::HandleReturnToSender(WorldPacket & recv_data )
|
|||
}
|
||||
}
|
||||
|
||||
SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, 0, m->mailTemplateId);
|
||||
SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
|
||||
|
||||
delete m; //we can deallocate old mail
|
||||
pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, 0);
|
||||
}
|
||||
|
||||
void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, std::string subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint32 COD, uint16 mailTemplateId )
|
||||
void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, std::string subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint16 mailTemplateId )
|
||||
{
|
||||
if(messageType != MAIL_NORMAL) // return only to players
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include "InstanceSaveMgr.h"
|
||||
#include "World.h"
|
||||
|
||||
MapInstanced::MapInstanced(uint32 id, time_t expiry, uint32 aInstanceId) : Map(id, expiry, 0, 0)
|
||||
MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, 0)
|
||||
{
|
||||
// initialize instanced maps list
|
||||
m_InstancedMaps.clear();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class MANGOS_DLL_DECL MapInstanced : public Map
|
|||
public:
|
||||
typedef HM_NAMESPACE::hash_map< uint32, Map* > InstancedMaps;
|
||||
|
||||
MapInstanced(uint32 id, time_t, uint32 aInstanceId);
|
||||
MapInstanced(uint32 id, time_t expiry);
|
||||
~MapInstanced() {}
|
||||
|
||||
// functions overwrite Map versions
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ MapManager::_GetBaseMap(uint32 id)
|
|||
const MapEntry* entry = sMapStore.LookupEntry(id);
|
||||
if (entry && entry->IsDungeon())
|
||||
{
|
||||
m = new MapInstanced(id, i_gridCleanUpDelay, 0);
|
||||
m = new MapInstanced(id, i_gridCleanUpDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -220,7 +220,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||
return true;
|
||||
}
|
||||
|
||||
void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId, uint8 mode)
|
||||
void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId)
|
||||
{
|
||||
Map *m = _GetBaseMap(mapid);
|
||||
if (m && m->Instanceable())
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
|||
|
||||
// only const version for outer users
|
||||
Map const* GetBaseMap(uint32 id) const { return const_cast<MapManager*>(this)->_GetBaseMap(id); }
|
||||
void DeleteInstance(uint32 mapid, uint32 instanceId, uint8 mode);
|
||||
void DeleteInstance(uint32 mapid, uint32 instanceId);
|
||||
|
||||
inline uint16 GetAreaFlag(uint32 mapid, float x, float y) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
|||
{
|
||||
if( mEntry->IsDungeon() )
|
||||
{
|
||||
GetPlayer()->ResurrectPlayer(0.5f,false);
|
||||
GetPlayer()->ResurrectPlayer(0.5f);
|
||||
GetPlayer()->SpawnCorpseBones();
|
||||
GetPlayer()->SaveToDB();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::SendSpiritResurrect()
|
||||
{
|
||||
_player->ResurrectPlayer(0.5f,false, true);
|
||||
_player->ResurrectPlayer(0.5f, true);
|
||||
|
||||
_player->DurabilityLossAll(0.25f,true);
|
||||
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ struct WorldLocation
|
|||
float y;
|
||||
float z;
|
||||
float o;
|
||||
explicit WorldLocation(uint32 mapid = 0, float x = 0, float y = 0, float z = 0, float o = 0)
|
||||
: mapid(mapid), x(x), y(y), z(z), o(o) {}
|
||||
explicit WorldLocation(uint32 _mapid = 0, float _x = 0, float _y = 0, float _z = 0, float _o = 0)
|
||||
: mapid(_mapid), x(_x), y(_y), z(_z), o(_o) {}
|
||||
WorldLocation(WorldLocation const &loc)
|
||||
: mapid(loc.mapid), x(loc.x), y(loc.y), z(loc.z), o(loc.o) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -476,7 +476,6 @@ void Pet::SavePetToDB(PetSaveMode mode)
|
|||
case PET_SAVE_AS_DELETED:
|
||||
{
|
||||
RemoveAllAuras();
|
||||
uint32 owner = GUID_LOPART(GetOwnerGUID());
|
||||
DeleteFromDB(m_charmInfo->GetPetNumber());
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class MANGOS_DLL_DECL PetAI : public CreatureAI
|
|||
void DamageTaken(Unit *done_by, uint32& /*damage*/) { AttackedBy(done_by); }
|
||||
void AttackedBy(Unit*);
|
||||
bool IsVisible(Unit *) const;
|
||||
void JustDied(Unit* who) { _stopAttack(); }
|
||||
void JustDied(Unit* /*who*/) { _stopAttack(); }
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
static int Permissible(const Creature *);
|
||||
|
|
|
|||
|
|
@ -478,6 +478,8 @@ void Player::CleanupsBeforeDelete()
|
|||
|
||||
bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId )
|
||||
{
|
||||
//FIXME: outfitId not used in player creating
|
||||
|
||||
Object::_Create(guidlow, 0, HIGHGUID_PLAYER);
|
||||
|
||||
m_name = name;
|
||||
|
|
@ -3503,7 +3505,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
|||
|
||||
uint32 pl_account = objmgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
|
||||
|
||||
WorldSession::SendReturnToSender(MAIL_NORMAL, pl_account, guid, sender, subject, itemTextId, &mi, money, 0, mailTemplateId);
|
||||
WorldSession::SendReturnToSender(MAIL_NORMAL, pl_account, guid, sender, subject, itemTextId, &mi, money, mailTemplateId);
|
||||
}
|
||||
while (resultMail->NextRow());
|
||||
|
||||
|
|
@ -3626,13 +3628,14 @@ void Player::BuildPlayerRepop()
|
|||
|
||||
void Player::SendDelayResponse(const uint32 ml_seconds)
|
||||
{
|
||||
//FIXME: is this delay time arg really need? 50msec by default in code
|
||||
WorldPacket data( SMSG_QUERY_TIME_RESPONSE, 4+4 );
|
||||
data << (uint32)time(NULL);
|
||||
data << (uint32)0;
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
void Player::ResurrectPlayer(float restore_percent, bool updateToWorld, bool applySickness)
|
||||
void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
{
|
||||
WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4*4); // remove spirit healer position
|
||||
data << uint32(-1);
|
||||
|
|
@ -4163,7 +4166,7 @@ void Player::UpdateDefense()
|
|||
}
|
||||
}
|
||||
|
||||
void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply, bool affectStats)
|
||||
void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply)
|
||||
{
|
||||
if(modGroup >= BASEMOD_END || modType >= MOD_END)
|
||||
{
|
||||
|
|
@ -5844,7 +5847,6 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor)
|
|||
|
||||
uint64 victim_guid = 0;
|
||||
uint32 victim_rank = 0;
|
||||
time_t now = time(NULL);
|
||||
|
||||
// need call before fields update to have chance move yesterday data to appropriate fields before today data change.
|
||||
UpdateHonorFields();
|
||||
|
|
@ -10198,8 +10200,6 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
if(pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED))
|
||||
CharacterDatabase.PExecute("DELETE FROM character_gifts WHERE item_guid = '%u'", pItem->GetGUIDLow());
|
||||
|
||||
ItemPrototype const *pProto = pItem->GetProto();
|
||||
|
||||
RemoveEnchantmentDurations(pItem);
|
||||
RemoveItemDurations(pItem);
|
||||
|
||||
|
|
@ -17388,7 +17388,7 @@ void Player::learnSkillRewardedSpells(uint32 skill_id )
|
|||
if (pAbility->classmask && !(pAbility->classmask & classMask))
|
||||
continue;
|
||||
|
||||
if (SpellEntry const* spellentry = sSpellStore.LookupEntry(pAbility->spellId))
|
||||
if (sSpellStore.LookupEntry(pAbility->spellId))
|
||||
{
|
||||
// Ok need learn spell
|
||||
learnSpell(pAbility->spellId);
|
||||
|
|
|
|||
|
|
@ -1630,7 +1630,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void CreateCorpse();
|
||||
void KillPlayer();
|
||||
uint32 GetResurrectionSpellId();
|
||||
void ResurrectPlayer(float restore_percent, bool updateToWorld = true, bool applySickness = false);
|
||||
void ResurrectPlayer(float restore_percent, bool applySickness = false);
|
||||
void BuildPlayerRepop();
|
||||
void RepopAtGraveyard();
|
||||
|
||||
|
|
@ -1754,7 +1754,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
void SetRegularAttackTime();
|
||||
void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; }
|
||||
void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply, bool affectStats = true);
|
||||
void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply);
|
||||
float GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const;
|
||||
float GetTotalBaseModValue(BaseModGroup modGroup) const;
|
||||
float GetTotalPercentageModValue(BaseModGroup modGroup) const { return m_auraBaseMod[modGroup][FLAT_MOD] + m_auraBaseMod[modGroup][PCT_MOD]; }
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void PointMovementGenerator<T>::MovementInform(T &unit)
|
||||
void PointMovementGenerator<T>::MovementInform(T& /*unit*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
|||
Map const* map = MapManager::Instance().GetBaseMap(mapid);
|
||||
|
||||
// For 2D/3D system selection
|
||||
bool is_land_ok = creature.canWalk();
|
||||
bool is_water_ok = creature.canSwim();
|
||||
//bool is_land_ok = creature.canWalk(); // not used?
|
||||
//bool is_water_ok = creature.canSwim(); // not used?
|
||||
bool is_air_ok = creature.canFly();
|
||||
|
||||
const float angle = rand_norm()*(M_PI*2);
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ void Spell::FillTargetMap()
|
|||
|
||||
for (std::list<Unit*>::iterator itr = tmpUnitMap.begin() ; itr != tmpUnitMap.end();)
|
||||
{
|
||||
if(!CheckTarget(*itr, i, false ))
|
||||
if (!CheckTarget (*itr, i))
|
||||
{
|
||||
itr = tmpUnitMap.erase(itr);
|
||||
continue;
|
||||
|
|
@ -3342,8 +3342,6 @@ uint8 Spell::CanCast(bool strict)
|
|||
m_spellInfo->EffectImplicitTargetA[j] == TARGET_SCRIPT_COORDINATES ||
|
||||
m_spellInfo->EffectImplicitTargetB[j] == TARGET_SCRIPT_COORDINATES )
|
||||
{
|
||||
bool okDoo = false;
|
||||
|
||||
SpellScriptTarget::const_iterator lower = spellmgr.GetBeginSpellScriptTarget(m_spellInfo->Id);
|
||||
SpellScriptTarget::const_iterator upper = spellmgr.GetEndSpellScriptTarget(m_spellInfo->Id);
|
||||
if(lower==upper)
|
||||
|
|
@ -4840,7 +4838,7 @@ CurrentSpellTypes Spell::GetCurrentContainer()
|
|||
return(CURRENT_GENERIC_SPELL);
|
||||
}
|
||||
|
||||
bool Spell::CheckTarget( Unit* target, uint32 eff, bool hitPhase )
|
||||
bool Spell::CheckTarget( Unit* target, uint32 eff )
|
||||
{
|
||||
// Check targets for creature type mask and remove not appropriate (skip explicit self target case, maybe need other explicit targets)
|
||||
if(m_spellInfo->EffectImplicitTargetA[eff]!=TARGET_SELF )
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ class Spell
|
|||
void SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap);
|
||||
|
||||
Unit* SelectMagnetTarget();
|
||||
bool CheckTarget( Unit* target, uint32 eff, bool hitPhase );
|
||||
bool CheckTarget( Unit* target, uint32 eff );
|
||||
|
||||
void SendCastResult(uint8 result);
|
||||
void SendSpellStart();
|
||||
|
|
|
|||
|
|
@ -165,10 +165,10 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||
&Aura::HandleNoImmediateEffect, //112 SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
|
||||
&Aura::HandleNoImmediateEffect, //113 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleNoImmediateEffect, //114 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleAuraHealing, //115 SPELL_AURA_MOD_HEALING
|
||||
&Aura::HandleNoImmediateEffect, //115 SPELL_AURA_MOD_HEALING implemented in Unit::SpellBaseHealingBonusForVictim
|
||||
&Aura::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT
|
||||
&Aura::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult
|
||||
&Aura::HandleAuraHealingPct, //118 SPELL_AURA_MOD_HEALING_PCT
|
||||
&Aura::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleUnused, //119 SPELL_AURA_SHARE_PET_TRACKING useless
|
||||
&Aura::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE
|
||||
&Aura::HandleAuraEmpathy, //121 SPELL_AURA_EMPATHY
|
||||
|
|
@ -186,7 +186,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||
&Aura::HandleAuraModIncreaseHealthPercent, //133 SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
|
||||
&Aura::HandleAuraModRegenInterrupt, //134 SPELL_AURA_MOD_MANA_REGEN_INTERRUPT
|
||||
&Aura::HandleModHealingDone, //135 SPELL_AURA_MOD_HEALING_DONE
|
||||
&Aura::HandleAuraHealingPct, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleNoImmediateEffect, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus
|
||||
&Aura::HandleModTotalPercentStat, //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
|
||||
&Aura::HandleHaste, //138 SPELL_AURA_MOD_HASTE
|
||||
&Aura::HandleForceReaction, //139 SPELL_AURA_FORCE_REACTION
|
||||
|
|
@ -215,7 +215,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||
&Aura::HandleAuraPowerBurn, //162 SPELL_AURA_POWER_BURN_MANA
|
||||
&Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE
|
||||
&Aura::HandleUnused, //164 useless, only one test spell
|
||||
&Aura::HandleAuraAttackPowerAttacker, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleNoImmediateEffect, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus
|
||||
&Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT
|
||||
&Aura::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
||||
&Aura::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonus, Unit::MeleeDamageBonus
|
||||
|
|
@ -2281,6 +2281,10 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
|||
|
||||
void Aura::HandleAuraMounted(bool apply, bool Real)
|
||||
{
|
||||
// only at real add/remove aura
|
||||
if(!Real)
|
||||
return;
|
||||
|
||||
if(apply)
|
||||
{
|
||||
CreatureInfo const* ci = objmgr.GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
|
|
@ -3601,7 +3605,7 @@ void Aura::HandleModTaunt(bool apply, bool Real)
|
|||
/*********************************************************/
|
||||
/*** MODIFY SPEED ***/
|
||||
/*********************************************************/
|
||||
void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -3610,7 +3614,7 @@ void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)
|
|||
m_target->UpdateSpeed(MOVE_RUN, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -3649,7 +3653,7 @@ void Aura::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
|
|||
m_target->UpdateSpeed(MOVE_FLY, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -3658,7 +3662,7 @@ void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)
|
|||
m_target->UpdateSpeed(MOVE_SWIM, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -3669,7 +3673,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
|
|||
m_target->UpdateSpeed(MOVE_FLY, true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real)
|
||||
void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
|
||||
{
|
||||
// all applied/removed only at real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -4349,7 +4353,7 @@ void Aura::HandleModPercentStat(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4360,7 +4364,7 @@ void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4378,7 +4382,7 @@ void Aura::HandleAuraModDispelResist(bool apply, bool Real)
|
|||
m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID());
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4389,7 +4393,7 @@ void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4398,7 +4402,7 @@ void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModHealingDone(bool apply, bool Real)
|
||||
void Aura::HandleModHealingDone(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4438,7 +4442,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4573,7 +4577,7 @@ void Aura::HandleModPowerRegen(bool apply, bool Real) // drinking
|
|||
((Player*)m_target)->UpdateManaRegen();
|
||||
}
|
||||
|
||||
void Aura::HandleModPowerRegenPCT(bool apply, bool Real)
|
||||
void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -4587,7 +4591,7 @@ void Aura::HandleModPowerRegenPCT(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateManaRegen();
|
||||
}
|
||||
|
||||
void Aura::HandleModManaRegen(bool apply, bool Real)
|
||||
void Aura::HandleModManaRegen(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -4688,7 +4692,7 @@ void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool Real)
|
|||
/*** FIGHT ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModParryPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4696,7 +4700,7 @@ void Aura::HandleAuraModParryPercent(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateParryPercentage();
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDodgePercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4705,7 +4709,7 @@ void Aura::HandleAuraModDodgePercent(bool apply, bool Real)
|
|||
//sLog.outError("BONUS DODGE CHANCE: + %f", float(m_modifier.m_amount));
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModBlockPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4714,7 +4718,7 @@ void Aura::HandleAuraModBlockPercent(bool apply, bool Real)
|
|||
//sLog.outError("BONUS BLOCK CHANCE: + %f", float(m_modifier.m_amount));
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -4782,7 +4786,7 @@ void Aura::HandleModSpellCritChance(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellCritChanceShool(bool apply, bool Real)
|
||||
void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -4864,39 +4868,6 @@ void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real)
|
|||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraAttackPowerAttacker(bool apply, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
return;
|
||||
Unit *caster = GetCaster();
|
||||
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
// Hunter's Mark
|
||||
if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)
|
||||
{
|
||||
// Check Improved Hunter's Mark bonus on caster
|
||||
Unit::AuraList const& mOverrideClassScript = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for(Unit::AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
Modifier* mod = (*i)->GetModifier();
|
||||
// mproved Hunter's Mark script from 5236 to 5240
|
||||
if (mod->m_miscvalue >= 5236 && mod->m_miscvalue <= 5240)
|
||||
{
|
||||
// Get amount of ranged bonus for this spell..
|
||||
int32 ranged_bonus = caster->CalculateSpellDamage(m_spellProto, 1, m_spellProto->EffectBasePoints[1], m_target);
|
||||
// Set melee attack power bonus % from ranged depends from Improved mask aura
|
||||
m_modifier.m_amount = mod->m_amount * ranged_bonus / 100;
|
||||
m_currentBasePoints = m_modifier.m_amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModAttackPowerPercent(bool apply, bool Real)
|
||||
{
|
||||
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
|
||||
|
|
@ -5344,7 +5315,7 @@ void Aura::HandleForceMoveForward(bool apply, bool Real)
|
|||
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModExpertise(bool apply, bool Real)
|
||||
void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -5369,17 +5340,6 @@ void Aura::HandleModTargetResistance(bool apply, bool Real)
|
|||
m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
//HandleNoImmediateEffect auras implementation to support new stat system
|
||||
void Aura::HandleAuraHealing(bool apply, bool Real)
|
||||
{
|
||||
//m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraHealingPct(bool apply, bool Real)
|
||||
{
|
||||
//m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleShieldBlockValue(bool apply, bool Real)
|
||||
{
|
||||
BaseModType modType = FLAT_MOD;
|
||||
|
|
|
|||
|
|
@ -183,15 +183,12 @@ class MANGOS_DLL_SPEC Aura
|
|||
void HandleAuraAllowFlight(bool Apply, bool Real);
|
||||
void HandleModRating(bool apply, bool Real);
|
||||
void HandleModTargetResistance(bool apply, bool Real);
|
||||
void HandleAuraAttackPowerAttacker(bool apply, bool Real);
|
||||
void HandleAuraModAttackPowerPercent(bool apply, bool Real);
|
||||
void HandleAuraModRangedAttackPowerPercent(bool apply, bool Real);
|
||||
void HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real);
|
||||
void HandleSpiritOfRedemption(bool apply, bool Real);
|
||||
void HandleAuraHealingPct(bool apply, bool Real);
|
||||
void HandleModManaRegen(bool apply, bool Real);
|
||||
void HandleComprehendLanguage(bool apply, bool Real);
|
||||
void HandleAuraHealing(bool apply, bool Real);
|
||||
void HandleShieldBlockValue(bool apply, bool Real);
|
||||
void HandleModSpellCritChanceShool(bool apply, bool Real);
|
||||
void HandleAuraRetainComboPoints(bool apply, bool Real);
|
||||
|
|
|
|||
|
|
@ -2212,7 +2212,7 @@ void Spell::EffectPowerDrain(uint32 i)
|
|||
|
||||
m_caster->ModifyPower(POWER_MANA,gain);
|
||||
//send log
|
||||
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id,gain,POWER_MANA,false);
|
||||
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id,gain,POWER_MANA);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5337,7 +5337,7 @@ void Spell::EffectSummonObject(uint32 i)
|
|||
m_caster->m_ObjectSlot[slot] = pGameObj->GetGUID();
|
||||
}
|
||||
|
||||
void Spell::EffectResurrect(uint32 i)
|
||||
void Spell::EffectResurrect(uint32 /*effIndex*/)
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,6 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
|||
CHECK_PACKET_SIZE(recv_data,8);
|
||||
|
||||
uint64 guid;
|
||||
uint32 spellId = OPEN_CHEST;
|
||||
|
||||
recv_data >> guid;
|
||||
|
||||
|
|
|
|||
|
|
@ -1648,8 +1648,6 @@ void SpellMgr::LoadSpellLearnSkills()
|
|||
dbc_node.value = (entry->EffectBasePoints[i]+1)*75;
|
||||
dbc_node.maxvalue = (entry->EffectBasePoints[i]+1)*75;
|
||||
|
||||
SpellLearnSkillNode const* db_node = GetSpellLearnSkill(spell);
|
||||
|
||||
mSpellLearnSkills[spell] = dbc_node;
|
||||
++dbc_count;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1090,8 +1090,6 @@ void Unit::DealFlatDamage(Unit *pVictim, SpellEntry const *spellInfo, uint32 *da
|
|||
// Physical Damage
|
||||
if ( GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_NORMAL )
|
||||
{
|
||||
uint32 modDamage=*damage;
|
||||
|
||||
// apply spellmod to Done damage
|
||||
if(Player* modOwner = GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_DAMAGE, *damage);
|
||||
|
|
@ -4544,7 +4542,7 @@ void Unit::CastMeleeProcDamageAndSpell(Unit* pVictim, uint32 damage, SpellSchool
|
|||
ProcDamageAndSpell(pVictim, procAttacker, procVictim, damage, damageSchoolMask, spellCasted, isTriggeredSpell, attType);
|
||||
}
|
||||
|
||||
bool Unit::HandleHasteAuraProc(Unit *pVictim, SpellEntry const *hasteSpell, uint32 /*effIndex*/, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 cooldown)
|
||||
bool Unit::HandleHasteAuraProc(Unit *pVictim, SpellEntry const *hasteSpell, uint32 /*effIndex*/, uint32 damage, Aura* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 cooldown)
|
||||
{
|
||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
||||
|
|
@ -6192,7 +6190,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
if(!pVictim || !pVictim->isAlive())
|
||||
return false;
|
||||
|
||||
uint32 spell = 0;
|
||||
switch(triggeredByAura->GetSpellProto()->Id)
|
||||
{
|
||||
case 20186:
|
||||
|
|
@ -6222,7 +6219,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
return false;
|
||||
|
||||
// overwrite non existing triggered spell call in spell.dbc
|
||||
uint32 spell = 0;
|
||||
switch(triggeredByAura->GetSpellProto()->Id)
|
||||
{
|
||||
case 20185:
|
||||
|
|
@ -6422,7 +6418,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, int32 scriptId, uint32 damage, Aura *triggeredByAura, SpellEntry const *procSpell, uint32 cooldown)
|
||||
bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, int32 scriptId, uint32 /*damage*/, Aura *triggeredByAura, SpellEntry const *procSpell, uint32 cooldown)
|
||||
{
|
||||
if(!pVictim || !pVictim->isAlive())
|
||||
return false;
|
||||
|
|
@ -7134,7 +7130,7 @@ void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, bool c
|
|||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype, bool critical)
|
||||
void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype)
|
||||
{
|
||||
WorldPacket data(SMSG_SPELLENERGIZELOG, (8+8+4+4+4+1));
|
||||
data.append(pVictim->GetPackGUID());
|
||||
|
|
@ -10352,7 +10348,7 @@ void Unit::StopMoving()
|
|||
|
||||
// send explicit stop packet
|
||||
// rely on vmaps here because for exemple stormwind is in air
|
||||
float z = MapManager::Instance().GetBaseMap(GetMapId())->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true);
|
||||
//float z = MapManager::Instance().GetBaseMap(GetMapId())->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true);
|
||||
//if (fabs(GetPositionZ() - z) < 2.0f)
|
||||
// Relocate(GetPositionX(), GetPositionY(), z);
|
||||
Relocate(GetPositionX(), GetPositionY(),GetPositionZ());
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
bool isInAccessablePlaceFor(Creature const* c) const;
|
||||
|
||||
void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, bool critical = false);
|
||||
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage,Powers powertype, bool critical = false);
|
||||
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage,Powers powertype);
|
||||
uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage, bool isTriggeredSpell = false, bool useSpellDamage = true);
|
||||
void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, Aura* triggredByAura = NULL, uint64 originalCaster = 0);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,6 @@ World::AddSession_ (WorldSession* s)
|
|||
uint32 Sessions = GetActiveAndQueuedSessionCount ();
|
||||
uint32 pLimit = GetPlayerAmountLimit ();
|
||||
uint32 QueueSize = GetQueueSize (); //number of players in the queue
|
||||
bool inQueue = false;
|
||||
//so we don't count the user trying to
|
||||
//login as a session and queue the socket that we are using
|
||||
--Sessions;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class MANGOS_DLL_SPEC WorldSession
|
|||
//mail
|
||||
//used with item_page table
|
||||
bool SendItemInfo( uint32 itemid, WorldPacket data );
|
||||
static void SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, std::string subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint32 COD, uint16 mailTemplateId = 0);
|
||||
static void SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, std::string subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint16 mailTemplateId = 0);
|
||||
static void SendMailTo(Player* receiver, uint8 messageType, uint8 stationery, uint32 sender_guidlow_or_entry, uint32 received_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay = 0, uint16 mailTemplateId = 0);
|
||||
|
||||
//auction
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ bool ChatHandler::HandleBuyErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendOpcodeCommand(const char* args)
|
||||
bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
|
||||
{
|
||||
Unit *unit = getSelectedUnit();
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
|
|
@ -262,7 +262,7 @@ bool ChatHandler::HandleSendQuestPartyMsgCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGetLootRecipient(const char* args)
|
||||
bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
|
||||
{
|
||||
Creature* target = getSelectedCreature();
|
||||
if(!target)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue