mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
[11973] Various Cleanups
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
c243c42c3c
commit
f3f3349661
50 changed files with 153 additions and 134 deletions
|
|
@ -460,6 +460,7 @@ Player::Player (WorldSession *session): Unit(), m_mover(this), m_camera(this), m
|
|||
|
||||
m_MirrorTimerFlags = UNDERWATER_NONE;
|
||||
m_MirrorTimerFlagsLast = UNDERWATER_NONE;
|
||||
|
||||
m_isInWater = false;
|
||||
m_drunkTimer = 0;
|
||||
m_drunk = 0;
|
||||
|
|
@ -1011,7 +1012,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
m_MirrorTimer[BREATH_TIMER] = getMaxTimer(BREATH_TIMER);
|
||||
SendMirrorTimer(BREATH_TIMER, m_MirrorTimer[BREATH_TIMER], m_MirrorTimer[BREATH_TIMER], -1);
|
||||
}
|
||||
else // If activated - do tick
|
||||
else
|
||||
{
|
||||
m_MirrorTimer[BREATH_TIMER]-=time_diff;
|
||||
// Timer limit - need deal damage
|
||||
|
|
@ -9767,7 +9768,7 @@ InventoryResult Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, I
|
|||
if (res != EQUIP_ERR_OK)
|
||||
continue;
|
||||
|
||||
// descrease at current stacksize
|
||||
// decrease at current stacksize
|
||||
need_space -= pItem2->GetCount();
|
||||
}
|
||||
|
||||
|
|
@ -11102,6 +11103,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
|
|||
|
||||
Item* lastItem = pItem;
|
||||
uint32 entry = pItem->GetEntry();
|
||||
|
||||
for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
|
||||
{
|
||||
uint16 pos = itr->pos;
|
||||
|
|
@ -11117,6 +11119,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
|
|||
|
||||
lastItem = _StoreItem(pos,pItem,count,true,update);
|
||||
}
|
||||
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry);
|
||||
return lastItem;
|
||||
}
|
||||
|
|
@ -12599,6 +12602,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
|
|||
HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
|
||||
break;
|
||||
case ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL:
|
||||
{
|
||||
if (enchant_spell_id)
|
||||
{
|
||||
if (apply)
|
||||
|
|
@ -12631,6 +12635,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
|
|||
RemoveAurasDueToItemSpell(item, enchant_spell_id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ITEM_ENCHANTMENT_TYPE_RESISTANCE:
|
||||
if (!enchant_amount)
|
||||
{
|
||||
|
|
@ -13248,6 +13253,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
|||
PlayerTalkClass->CloseGossip();
|
||||
TalkedToCreature(pSource->GetEntry(), pSource->GetObjectGuid());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GOSSIP_OPTION_SPIRITHEALER:
|
||||
|
|
@ -14831,6 +14837,7 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
|
|||
{
|
||||
uint32 addkillcount = 1;
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
|
||||
|
||||
for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
|
||||
{
|
||||
uint32 questid = GetQuestSlotQuestId(i);
|
||||
|
|
@ -19490,7 +19497,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
|
|||
{
|
||||
if (ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemId))
|
||||
{
|
||||
for(int idx = 0; idx < 5; ++idx)
|
||||
for(int idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx)
|
||||
{
|
||||
if (proto->Spells[idx].SpellId == spellInfo->Id)
|
||||
{
|
||||
|
|
@ -20271,7 +20278,7 @@ void Player::SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg)
|
|||
{
|
||||
WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2);
|
||||
data << uint32(mapid);
|
||||
data << uint8(reason); // transfer abort reason
|
||||
data << uint8(reason); // transfer abort reason
|
||||
switch(reason)
|
||||
{
|
||||
case TRANSFER_ABORT_INSUF_EXPAN_LVL:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue