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:
VladimirMangos 2008-11-05 04:57:45 +03:00
parent ce351382a3
commit 88b1974df6
46 changed files with 92 additions and 159 deletions

View file

@ -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);