mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Fix
This commit is contained in:
parent
835a8da42a
commit
41b400dac9
11 changed files with 103 additions and 94 deletions
|
|
@ -3743,9 +3743,9 @@ void Player::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target )
|
|||
Unit::BuildCreateUpdateBlockForPlayer( data, target );
|
||||
}
|
||||
|
||||
void Player::DestroyForPlayer( Player *target ) const
|
||||
void Player::DestroyForPlayer( Player *target, bool anim ) const
|
||||
{
|
||||
Unit::DestroyForPlayer( target );
|
||||
Unit::DestroyForPlayer( target, anim );
|
||||
|
||||
for(int i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
{
|
||||
|
|
@ -5522,7 +5522,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
|
|||
{
|
||||
if(button >= MAX_ACTION_BUTTONS)
|
||||
{
|
||||
sLog.outError( "Action %u not added into button %u for player %s: button must be < 132", action, button, GetName() );
|
||||
sLog.outError( "Action %u not added into button %u for player %s: button must be < 144", action, button, GetName() );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -5564,6 +5564,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
|
|||
|
||||
// set data and update to CHANGED if not NEW
|
||||
ab.SetActionAndType(action,ActionButtonType(type));
|
||||
}
|
||||
|
||||
sLog.outDetail( "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, uint32(type), button );
|
||||
return &ab;
|
||||
|
|
@ -10328,7 +10329,6 @@ Item* Player::EquipNewItem( uint16 pos, uint32 item, bool update )
|
|||
|
||||
Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
|
||||
{
|
||||
|
||||
AddEnchantmentDurations(pItem);
|
||||
AddItemDurations(pItem);
|
||||
|
||||
|
|
@ -15331,8 +15331,10 @@ void Player::SendRaidInfo()
|
|||
data << uint32(save->GetMapId()); // map id
|
||||
data << uint32(save->GetDifficulty()); // difficulty
|
||||
data << uint64(save->GetInstanceId()); // instance id
|
||||
data << uint8(0);
|
||||
data << uint8(0);
|
||||
data << uint32(save->GetResetTime() - now); // reset time
|
||||
data << uint32(0); // is extended
|
||||
//data << uint32(0); // is extended
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -16147,10 +16149,10 @@ void Player::SendAttackSwingBadFacingAttack()
|
|||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
void Player::SendAutoRepeatCancel()
|
||||
void Player::SendAutoRepeatCancel(Unit *target)
|
||||
{
|
||||
WorldPacket data(SMSG_CANCEL_AUTO_REPEAT, GetPackGUID().size());
|
||||
data.append(GetPackGUID()); // may be it's target guid
|
||||
WorldPacket data(SMSG_CANCEL_AUTO_REPEAT, target->GetPackGUID().size());
|
||||
data.append(target->GetPackGUID()); // may be it's target guid
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
|
|
@ -17883,7 +17885,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
|
|||
{
|
||||
if(HaveAtClient(target))
|
||||
{
|
||||
if(!target->isVisibleForInState(this,true))
|
||||
if(!target->isVisibleForInState(this, true))
|
||||
{
|
||||
target->DestroyForPlayer(this);
|
||||
m_clientGUIDs.erase(target->GetGUID());
|
||||
|
|
@ -18050,14 +18052,10 @@ void Player::SetGroup(Group *group, int8 subgroup)
|
|||
|
||||
void Player::SendInitialPacketsBeforeAddToMap()
|
||||
{
|
||||
WorldPacket data(SMSG_SET_REST_START_OBSOLETE, 4);
|
||||
data << uint32(0); // unknown, may be rest state time or experience
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
GetSocial()->SendSocialList();
|
||||
|
||||
// Homebind
|
||||
data.Initialize(SMSG_BINDPOINTUPDATE, 5*4);
|
||||
WorldPacket data(SMSG_BINDPOINTUPDATE, 5*4);
|
||||
data << m_homebindX << m_homebindY << m_homebindZ;
|
||||
data << (uint32) m_homebindMapId;
|
||||
data << (uint32) m_homebindZoneId;
|
||||
|
|
@ -19495,11 +19493,20 @@ bool Player::HasTitle(uint32 bitIndex)
|
|||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
void Player::SetTitle(CharTitlesEntry const* title)
|
||||
void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
{
|
||||
uint32 fieldIndexOffset = title->bit_index / 32;
|
||||
uint32 flag = 1 << (title->bit_index % 32);
|
||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
|
||||
if(lost)
|
||||
RemoveFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
else
|
||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
|
||||
WorldPacket data(SMSG_TITLE_EARNED, 4 + 4);
|
||||
data << uint32(title->bit_index);
|
||||
data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::ConvertRune(uint8 index, uint8 newType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue