diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index ef80d78c8..43537315e 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -46,13 +46,13 @@ void MailItem::deleteItem( bool inDB ) CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid='%u'", item->GetGUIDLow()); delete item; - item=NULL; + item = NULL; } } void WorldSession::HandleSendMail(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+1+1+1+4+4+1+4+4+8+1); + CHECK_PACKET_SIZE(recv_data, 8+1+1+1+4+4+1+4+4+8+1); uint64 mailbox, unk3; std::string receiver, subject, body; @@ -137,7 +137,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) return; } - uint32 cost = items_count ? 30 * items_count : 30; // price hardcoded in client + uint32 cost = items_count ? 30 * items_count : 30; // price hardcoded in client uint32 reqmoney = cost + money; @@ -150,7 +150,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) Player *receive = objmgr.GetPlayer(rc); uint32 rc_team = 0; - uint8 mails_count = 0; //do not allow to send to one player more than 100 mails + uint8 mails_count = 0; // do not allow to send to one player more than 100 mails if(receive) { @@ -168,13 +168,15 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) delete result; } } + //do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255.. if (mails_count > 100) { pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_CAP_REACHED); return; } - // test the receiver's Faction... + + // check the receiver's Faction... if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER) { pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM); @@ -265,7 +267,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) pl->MoveItemFromInventory(mailItem.item->GetBagSlot(), mailItem.item->GetSlot(), true); CharacterDatabase.BeginTransaction(); - mailItem.item->DeleteFromInventoryDB(); //deletes item from character's inventory + mailItem.item->DeleteFromInventoryDB(); // deletes item from character's inventory mailItem.item->SaveToDB(); // recursive and not have transaction guard into self, item not in inventory and can be save standalone // owner in data will set at mail receive and item extracting CharacterDatabase.PExecute("UPDATE item_instance SET owner_guid = '%u' WHERE guid='%u'", GUID_LOPART(rc), mailItem.item->GetGUIDLow()); @@ -297,7 +299,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) //called when mail is read void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4); + CHECK_PACKET_SIZE(recv_data, 8+4); uint64 mailbox; uint32 mailId; @@ -314,7 +316,7 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data ) if (pl->unReadMails) --pl->unReadMails; m->checked = m->checked | MAIL_CHECK_MASK_READ; - // m->expire_time = time(NULL) + (30 * DAY); // Expire time do not change at reading mail + // m->expire_time = time(NULL) + (30 * DAY); // Expire time do not change at reading mail pl->m_mailsUpdated = true; m->state = MAIL_STATE_CHANGED; } @@ -323,7 +325,7 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data ) //called when client deletes mail void WorldSession::HandleMailDelete(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4); + CHECK_PACKET_SIZE(recv_data, 8+4); uint64 mailbox; uint32 mailId; @@ -343,7 +345,7 @@ void WorldSession::HandleMailDelete(WorldPacket & recv_data ) void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4); + CHECK_PACKET_SIZE(recv_data, 8+4); uint64 mailbox; uint32 mailId; @@ -389,7 +391,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data ) SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId); - delete m; //we can deallocate old mail + delete m; // we can deallocate old mail pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_OK); } @@ -426,7 +428,7 @@ void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint for(MailItemMap::iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter) { MailItem& mailItem = mailItemIter->second; - mailItem.item->SaveToDB(); // item not in inventory and can be save standalone + mailItem.item->SaveToDB(); // item not in inventory and can be save standalone // owner in data will set at mail receive and item extracting CharacterDatabase.PExecute("UPDATE item_instance SET owner_guid = '%u' WHERE guid='%u'", receiver_guid, mailItem.item->GetGUIDLow()); } @@ -437,13 +439,13 @@ void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint uint32 deliver_delay = needItemDelay ? sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0; // will delete item or place to receiver mail list - WorldSession::SendMailTo(receiver, MAIL_NORMAL, MAIL_STATIONERY_NORMAL, sender_guid, receiver_guid, subject, itemTextId, mi, money, 0, MAIL_CHECK_MASK_RETURNED,deliver_delay,mailTemplateId); + WorldSession::SendMailTo(receiver, MAIL_NORMAL, MAIL_STATIONERY_NORMAL, sender_guid, receiver_guid, subject, itemTextId, mi, money, 0, MAIL_CHECK_MASK_RETURNED, deliver_delay, mailTemplateId); } //called when player takes item attached in mail void WorldSession::HandleMailTakeItem(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4+4); + CHECK_PACKET_SIZE(recv_data, 8+4+4); uint64 mailbox; uint32 mailId; @@ -480,7 +482,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data ) m->RemoveItem(itemId); m->removedItems.push_back(itemId); - if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail + if (m->COD > 0) // if there is COD, take COD money from player and send them to sender by mail { uint64 sender_guid = MAKE_NEW_GUID(m->sender, 0, HIGHGUID_PLAYER); Player *receive = objmgr.GetPlayer(sender_guid); @@ -500,11 +502,11 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data ) // can be calculated early sender_accId = objmgr.GetPlayerAccountIdByGUID(sender_guid); - if(!objmgr.GetPlayerNameByGUID(sender_guid,sender_name)) + if(!objmgr.GetPlayerNameByGUID(sender_guid, sender_name)) sender_name = objmgr.GetMangosStringForDBCLocale(LANG_UNKNOWN); } - sLog.outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)", - GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId); + sLog.outCommand(GetAccountId(), "GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)", + GetPlayerName(), GetAccountId(), it->GetProto()->Name1, it->GetEntry(), it->GetCount(), m->COD, sender_name.c_str(), sender_accId); } else if(!receive) sender_accId = objmgr.GetPlayerAccountIdByGUID(sender_guid); @@ -523,7 +525,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data ) pl->RemoveMItem(it->GetGUIDLow()); uint32 count = it->GetCount(); // save counts before store and possible merge with deleting - pl->MoveItemToInventory(dest,it,true); + pl->MoveItemToInventory(dest, it, true); CharacterDatabase.BeginTransaction(); pl->SaveInventoryAndGoldToDB(); @@ -538,7 +540,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data ) void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4); + CHECK_PACKET_SIZE(recv_data, 8+4); uint64 mailbox; uint32 mailId; @@ -582,11 +584,9 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Player* pl = _player; - - //load players mails, and mailed items - if(!pl->m_mailsLoaded) - pl ->_LoadMail(); + // load players mails, and mailed items + if(!_player->m_mailsLoaded) + _player->_LoadMail(); // client can't work with packets > max int16 value const uint32 maxPacketSize = 32767; @@ -599,7 +599,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) data << uint8(0); // mail's count time_t cur_time = time(NULL); - for(PlayerMails::iterator itr = pl->GetmailBegin(); itr != pl->GetmailEnd(); ++itr) + for(PlayerMails::iterator itr = _player->GetMailBegin(); itr != _player->GetMailEnd(); ++itr) { // skip deleted or not delivered (deliver delay not expired) mails if ((*itr)->state == MAIL_STATE_DELETED || cur_time < (*itr)->deliver_time) @@ -656,7 +656,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) for(uint8 i = 0; i < item_count; ++i) { - Item *item = pl->GetMItem((*itr)->items[i].item_guid); + Item *item = _player->GetMItem((*itr)->items[i].item_guid); // item index (0-6?) data << uint8(i); // item guid low? @@ -703,11 +703,11 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) ///this function is called when client needs mail message body, or when player clicks on item which has ITEM_FIELD_ITEM_TEXT_ID > 0 void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,4+4+4); + CHECK_PACKET_SIZE(recv_data, 4+4+4); uint32 itemTextId; - uint32 mailId; //this value can be item id in bag, but it is also mail id - uint32 unk; //maybe something like state - 0x70000000 + uint32 mailId; // this value can be item id in bag, but it is also mail id + uint32 unk; // maybe something like state - 0x70000000 recv_data >> itemTextId >> mailId >> unk; @@ -724,7 +724,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) //used when player copies mail body to his inventory void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data ) { - CHECK_PACKET_SIZE(recv_data,8+4); + CHECK_PACKET_SIZE(recv_data, 8+4); uint64 mailbox; uint32 mailId; @@ -750,7 +750,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data ) return; } - bodyItem->SetUInt32Value( ITEM_FIELD_ITEM_TEXT_ID , m->itemTextId ); + bodyItem->SetUInt32Value( ITEM_FIELD_ITEM_TEXT_ID, m->itemTextId ); bodyItem->SetUInt32Value( ITEM_FIELD_CREATOR, m->sender); sLog.outDetail("HandleMailCreateTextItem mailid=%u",mailId); @@ -784,12 +784,12 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/ ) if( _player->unReadMails > 0 ) { - data << (uint32) 0; // float - data << (uint32) 0; // count + data << uint32(0); // float + data << uint32(0); // count uint32 count = 0; time_t now = time(NULL); - for(PlayerMails::iterator itr = _player->GetmailBegin(); itr != _player->GetmailEnd(); ++itr) + for(PlayerMails::iterator itr = _player->GetMailBegin(); itr != _player->GetMailEnd(); ++itr) { Mail *m = (*itr); // must be not checked yet @@ -800,22 +800,23 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/ ) if(now < m->deliver_time) continue; - data << (uint64) m->sender; // sender guid + data << uint64(m->sender); // sender guid switch(m->messageType) { case MAIL_AUCTION: - data << (uint32) 2; - data << (uint32) 2; - data << (uint32) m->stationery; + data << uint32(2); + data << uint32(2); + data << uint32(m->stationery); break; default: - data << (uint32) 0; - data << (uint32) 0; - data << (uint32) m->stationery; + data << uint32(0); + data << uint32(0); + data << uint32(m->stationery); break; } - data << (uint32) 0xC6000000; // float unk, time or something + + data << uint32(0xC6000000); // float unk, time or something ++count; if(count == 2) // do not display more than 2 mails @@ -825,8 +826,8 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/ ) } else { - data << (uint32) 0xC7A8C000; - data << (uint32) 0x00000000; + data << uint32(0xC7A8C000); + data << uint32(0x00000000); } SendPacket(&data); } @@ -837,12 +838,12 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station time_t deliver_time = time(NULL) + deliver_delay; - //expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour + // expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour uint32 expire_delay; if(messageType == MAIL_AUCTION && !mi && !money) // auction mail without any items and money expire_delay = HOUR; else - expire_delay = (COD > 0) ? 3*DAY : 30*DAY; + expire_delay = (COD > 0) ? 3 * DAY : 30 * DAY; time_t expire_time = deliver_time + expire_delay; @@ -858,7 +859,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station if ( receiver->IsMailsLoaded() ) { - Mail * m = new Mail; + Mail *m = new Mail; m->messageID = mailId; m->messageType = messageType; m->stationery = stationery; @@ -878,7 +879,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station m->checked = checked; m->state = MAIL_STATE_UNCHANGED; - receiver->AddMail(m); //to insert new mail to beginning of maillist + receiver->AddMail(m); // to insert new mail to beginning of maillist if(mi) { @@ -907,7 +908,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station for(MailItemMap::const_iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter) { MailItem const& mailItem = mailItemIter->second; - CharacterDatabase.PExecute("INSERT INTO mail_items (mail_id,item_guid,item_template,receiver) VALUES ('%u', '%u', '%u','%u')", mailId, mailItem.item_guidlow, mailItem.item_template,receiver_guidlow); + CharacterDatabase.PExecute("INSERT INTO mail_items (mail_id,item_guid,item_template,receiver) VALUES ('%u', '%u', '%u','%u')", mailId, mailItem.item_guidlow, mailItem.item_template, receiver_guidlow); } } CharacterDatabase.CommitTransaction(); diff --git a/src/game/Player.h b/src/game/Player.h index 80da51c71..0812d534e 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -891,8 +891,8 @@ enum PlayerDelayedOperations DELAYED_SAVE_PLAYER = 0x01, DELAYED_RESURRECT_PLAYER = 0x02, DELAYED_SPELL_CAST_DESERTER = 0x04, - DELAYED_BG_MOUNT_RESTORE = 0x08, ///< Flag to restore mount state after teleport from BG - DELAYED_BG_TAXI_RESTORE = 0x10, ///< Flag to restore taxi state after teleport from BG + DELAYED_BG_MOUNT_RESTORE = 0x08, ///< Flag to restore mount state after teleport from BG + DELAYED_BG_TAXI_RESTORE = 0x10, ///< Flag to restore taxi state after teleport from BG DELAYED_END }; @@ -937,7 +937,7 @@ class MANGOS_DLL_SPEC PlayerTaxi else return false; } - void AppendTaximaskTo(ByteBuffer& data,bool all); + void AppendTaximaskTo(ByteBuffer& data, bool all); // Destinations bool LoadTaxiDestinationsFromString(const std::string& values, uint32 team); @@ -972,21 +972,21 @@ struct BGData bgTeam(0), mountSpell(0) { ClearTaxiPath(); } - uint32 bgInstanceID; ///< This variable is set to bg->m_InstanceID, - /// when player is teleported to BG - (it is battleground's GUID) + uint32 bgInstanceID; ///< This variable is set to bg->m_InstanceID, + /// when player is teleported to BG - (it is battleground's GUID) BattleGroundTypeId bgTypeID; std::set bgAfkReporter; uint8 bgAfkReportedCount; time_t bgAfkReportedTimer; - uint32 bgTeam; ///< What side the player will be added to + uint32 bgTeam; ///< What side the player will be added to uint32 mountSpell; uint32 taxiPath[2]; - WorldLocation joinPos; ///< From where player entered BG + WorldLocation joinPos; ///< From where player entered BG void ClearTaxiPath() { taxiPath[0] = taxiPath[1] = 0; } bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; } @@ -1050,8 +1050,8 @@ class MANGOS_DLL_SPEC Player : public Unit bool ToggleAFK(); bool ToggleDND(); - bool isAFK() const { return HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_AFK); }; - bool isDND() const { return HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_DND); }; + bool isAFK() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK); } + bool isDND() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND); } uint8 chatTag() const; std::string afkMsg; std::string dndMsg; @@ -1089,33 +1089,33 @@ class MANGOS_DLL_SPEC Player : public Unit time_t m_logintime; time_t m_Last_tick; uint32 m_Played_time[MAX_PLAYED_TIME_INDEX]; - uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }; - uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }; + uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; } + uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; } void setDeathState(DeathState s); // overwrite Unit::setDeathState - void InnEnter (int time,uint32 mapid, float x,float y,float z) + void InnEnter (int time, uint32 mapid, float x, float y, float z) { inn_pos_mapid = mapid; inn_pos_x = x; inn_pos_y = y; inn_pos_z = z; time_inn_enter = time; - }; + } - float GetRestBonus() const { return m_rest_bonus; }; + float GetRestBonus() const { return m_rest_bonus; } void SetRestBonus(float rest_bonus_new); - RestType GetRestType() const { return rest_type; }; - void SetRestType(RestType n_r_type) { rest_type = n_r_type; }; + RestType GetRestType() const { return rest_type; } + void SetRestType(RestType n_r_type) { rest_type = n_r_type; } - uint32 GetInnPosMapId() const { return inn_pos_mapid; }; - float GetInnPosX() const { return inn_pos_x; }; - float GetInnPosY() const { return inn_pos_y; }; - float GetInnPosZ() const { return inn_pos_z; }; + uint32 GetInnPosMapId() const { return inn_pos_mapid; } + float GetInnPosX() const { return inn_pos_x; } + float GetInnPosY() const { return inn_pos_y; } + float GetInnPosZ() const { return inn_pos_z; } - int GetTimeInnEnter() const { return time_inn_enter; }; - void UpdateInnerTime (int time) { time_inn_enter = time; }; + int GetTimeInnEnter() const { return time_inn_enter; } + void UpdateInnerTime (int time) { time_inn_enter = time; } void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false); void RemoveMiniPet(); @@ -1145,14 +1145,14 @@ class MANGOS_DLL_SPEC Player : public Unit Item* GetShield(bool useable = false) const; static uint32 GetAttackBySlot( uint8 slot ); // MAX_ATTACK if not weapon slot std::vector &GetItemUpdateQueue() { return m_itemUpdateQueue; } - static bool IsInventoryPos( uint16 pos ) { return IsInventoryPos(pos >> 8,pos & 255); } + static bool IsInventoryPos( uint16 pos ) { return IsInventoryPos(pos >> 8, pos & 255); } static bool IsInventoryPos( uint8 bag, uint8 slot ); - static bool IsEquipmentPos( uint16 pos ) { return IsEquipmentPos(pos >> 8,pos & 255); } + static bool IsEquipmentPos( uint16 pos ) { return IsEquipmentPos(pos >> 8, pos & 255); } static bool IsEquipmentPos( uint8 bag, uint8 slot ); static bool IsBagPos( uint16 pos ); - static bool IsBankPos( uint16 pos ) { return IsBankPos(pos >> 8,pos & 255); } + static bool IsBankPos( uint16 pos ) { return IsBankPos(pos >> 8, pos & 255); } static bool IsBankPos( uint8 bag, uint8 slot ); - bool IsValidPos( uint16 pos ) { return IsBankPos(pos >> 8,pos & 255); } + bool IsValidPos( uint16 pos ) { return IsBankPos(pos >> 8, pos & 255); } bool IsValidPos( uint8 bag, uint8 slot ); uint8 GetBankBagSlotCount() const { return GetByteValue(PLAYER_BYTES_2, 2); } void SetBankBagSlotCount(uint8 count) { SetByteValue(PLAYER_BYTES_2, 2, count); } @@ -1161,8 +1161,8 @@ class MANGOS_DLL_SPEC Player : public Unit bool CanNoReagentCast(SpellEntry const* spellInfo) const; bool HasItemOrGemWithIdEquipped( uint32 item, uint32 count, uint8 except_slot = NULL_SLOT) const; bool HasItemOrGemWithLimitCategoryEquipped( uint32 limitCategory, uint32 count, uint8 except_slot = NULL_SLOT) const; - uint8 CanTakeMoreSimilarItems(Item* pItem) const { return _CanTakeMoreSimilarItems(pItem->GetEntry(),pItem->GetCount(),pItem); } - uint8 CanTakeMoreSimilarItems(uint32 entry, uint32 count) const { return _CanTakeMoreSimilarItems(entry,count,NULL); } + uint8 CanTakeMoreSimilarItems(Item* pItem) const { return _CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem); } + uint8 CanTakeMoreSimilarItems(uint32 entry, uint32 count) const { return _CanTakeMoreSimilarItems(entry, count, NULL); } uint8 CanStoreNewItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count = NULL ) const { return _CanStoreItem(bag, slot, dest, item, count, NULL, false, no_space_count ); @@ -1371,12 +1371,12 @@ class MANGOS_DLL_SPEC Player : public Unit void SendQuestUpdateAddItem( Quest const* pQuest, uint32 item_idx, uint32 count ); void SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, uint64 guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count ); - uint64 GetDivider() { return m_divider; }; - void SetDivider( uint64 guid ) { m_divider = guid; }; + uint64 GetDivider() { return m_divider; } + void SetDivider( uint64 guid ) { m_divider = guid; } - uint32 GetInGameTime() { return m_ingametime; }; + uint32 GetInGameTime() { return m_ingametime; } - void SetInGameTime( uint32 time ) { m_ingametime = time; }; + void SetInGameTime( uint32 time ) { m_ingametime = time; } void AddTimedQuest( uint32 quest_id ) { m_timedquests.insert(quest_id); } @@ -1462,15 +1462,14 @@ class MANGOS_DLL_SPEC Player : public Unit void AddNewMailDeliverTime(time_t deliver_time); bool IsMailsLoaded() const { return m_mailsLoaded; } - //void SetMail(Mail *m); void RemoveMail(uint32 id); void AddMail(Mail* mail) { m_mail.push_front(mail);}// for call from WorldSession::SendMailTo - uint32 GetMailSize() { return m_mail.size();}; + uint32 GetMailSize() { return m_mail.size(); } Mail* GetMail(uint32 id); - PlayerMails::iterator GetmailBegin() { return m_mail.begin();}; - PlayerMails::iterator GetmailEnd() { return m_mail.end();}; + PlayerMails::iterator GetMailBegin() { return m_mail.begin();} + PlayerMails::iterator GetMailEnd() { return m_mail.end();} /*********************************************************/ /*** MAILED ITEMS SYSTEM ***/ @@ -1481,7 +1480,7 @@ class MANGOS_DLL_SPEC Player : public Unit typedef UNORDERED_MAP ItemMap; - ItemMap mMitems; //template defined in objectmgr.cpp + ItemMap mMitems; // template defined in objectmgr.cpp Item* GetMItem(uint32 id) { @@ -1600,7 +1599,7 @@ class MANGOS_DLL_SPEC Player : public Unit m_resurrectZ = Z; m_resurrectHealth = health; m_resurrectMana = mana; - }; + } void clearResurrectRequestData() { setResurrectRequestData(0,0,0.0f,0.0f,0.0f,0,0); } bool isRessurectRequestedBy(uint64 guid) const { return m_resurrectGUID == guid; } bool isRessurectRequested() const { return m_resurrectGUID != 0; } @@ -1892,7 +1891,7 @@ class MANGOS_DLL_SPEC Player : public Unit void SetCanBlock(bool value); bool CanDualWield() const { return m_canDualWield; } void SetCanDualWield(bool value) { m_canDualWield = value; } - bool CanTitanGrip() const { return m_canTitanGrip ; } + bool CanTitanGrip() const { return m_canTitanGrip; } void SetCanTitanGrip(bool value) { m_canTitanGrip = value; } bool CanTameExoticPets() const { return isGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); } @@ -2058,8 +2057,8 @@ class MANGOS_DLL_SPEC Player : public Unit bool isRested() const { return GetRestTime() >= 10*IN_MILISECONDS; } uint32 GetXPRestBonus(uint32 xp); - uint32 GetRestTime() const { return m_restTime;}; - void SetRestTime(uint32 v) { m_restTime = v;}; + uint32 GetRestTime() const { return m_restTime; } + void SetRestTime(uint32 v) { m_restTime = v; } /*********************************************************/ /*** ENVIROMENTAL SYSTEM ***/