mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Attempt to fix quests. Some other fixes.
This commit is contained in:
parent
2d61cc1e76
commit
908f41b031
13 changed files with 158 additions and 138 deletions
|
|
@ -1366,11 +1366,38 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
|||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1);
|
||||
|
||||
uint8 dstbag, dstslot;
|
||||
recv_data >> dstbag >> dstslot;
|
||||
uint8 srcbag, srcslot;
|
||||
recv_data >> srcbag >> srcslot;
|
||||
|
||||
// so we have itemGuid, bag and slot here...
|
||||
// if guid == 1, unequip item?
|
||||
sLog.outDebug("Item " I64FMT ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
|
||||
|
||||
Item *item = _player->GetItemByGuid(itemGuid);
|
||||
|
||||
uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8);
|
||||
|
||||
if(!item)
|
||||
{
|
||||
Item *uItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
|
||||
if(!uItem)
|
||||
continue;
|
||||
|
||||
ItemPosCountVec sDest;
|
||||
uint8 msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, sDest, uItem, false );
|
||||
if(msg == EQUIP_ERR_OK)
|
||||
{
|
||||
_player->RemoveItem(INVENTORY_SLOT_BAG_0, i, true);
|
||||
_player->StoreItem( sDest, uItem, true );
|
||||
}
|
||||
else
|
||||
_player->SendEquipError(msg, uItem, NULL);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(item->GetPos() == dstpos)
|
||||
continue;
|
||||
|
||||
_player->SwapItem(item->GetPos(), dstpos);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_EQUIPMENT_SET_USE_RESULT, 1);
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ Corpse::Corpse(CorpseType type) : WorldObject()
|
|||
{
|
||||
m_objectType |= TYPEMASK_CORPSE;
|
||||
m_objectTypeId = TYPEID_CORPSE;
|
||||
// 3.1.0 - 0x148
|
||||
m_updateFlag = (UPDATEFLAG_LOWGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_UNK1);
|
||||
|
||||
m_updateFlag = (UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_POSITION);
|
||||
|
||||
m_valuesCount = CORPSE_END;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ DynamicObject::DynamicObject() : WorldObject()
|
|||
{
|
||||
m_objectType |= TYPEMASK_DYNAMICOBJECT;
|
||||
m_objectTypeId = TYPEID_DYNAMICOBJECT;
|
||||
// 3.1.0 - 0x48
|
||||
m_updateFlag = (UPDATEFLAG_LOWGUID | UPDATEFLAG_HAS_POSITION);
|
||||
|
||||
m_updateFlag = (UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION);
|
||||
|
||||
m_valuesCount = DYNAMICOBJECT_END;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ GameObject::GameObject() : WorldObject()
|
|||
{
|
||||
m_objectType |= TYPEMASK_GAMEOBJECT;
|
||||
m_objectTypeId = TYPEID_GAMEOBJECT;
|
||||
// 3.1.0 - 0x348
|
||||
m_updateFlag = (UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_UNK1 | UPDATEFLAG_UNK2);
|
||||
|
||||
m_updateFlag = (UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_POSITION | UPDATEFLAG_ROTATION);
|
||||
|
||||
m_valuesCount = GAMEOBJECT_END;
|
||||
m_respawnTime = 0;
|
||||
|
|
|
|||
|
|
@ -748,8 +748,7 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
|
|||
}
|
||||
}
|
||||
|
||||
// We may wish a better check, perhaps checking the real quest requirements
|
||||
if (RequestItemsText.empty())
|
||||
if (!pQuest->GetReqItemsCount() && Completable)
|
||||
{
|
||||
SendQuestGiverOfferReward(pQuest, npcGUID, true);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ Item::Item( )
|
|||
{
|
||||
m_objectType |= TYPEMASK_ITEM;
|
||||
m_objectTypeId = TYPEID_ITEM;
|
||||
// 3.1.0 - 0x08
|
||||
// 3.1.2 - 0x10
|
||||
m_updateFlag = UPDATEFLAG_HIGHGUID;
|
||||
|
||||
m_valuesCount = ITEM_END;
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ enum EnchantmentSlot
|
|||
MAX_ENCHANTMENT_SLOT = 12
|
||||
};
|
||||
|
||||
#define MAX_VISIBLE_ITEM_OFFSET 18 // 18 fields per visible item (creator(2) + enchantments(13) + properties(1) + seed(1) + pad(1))
|
||||
#define MAX_VISIBLE_ITEM_OFFSET 2 // 2 fields per visible item (entry+enchantment)
|
||||
|
||||
#define MAX_GEM_SOCKETS MAX_ITEM_PROTO_SOCKETS// (BONUS_ENCHANTMENT_SLOT-SOCK_ENCHANTMENT_SLOT) and item proto size, equal value expected
|
||||
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2
|
|||
}
|
||||
else
|
||||
{
|
||||
if(flags & UPDATEFLAG_UNK1)
|
||||
if(flags & UPDATEFLAG_POSITION)
|
||||
{
|
||||
*data << uint8(0); // unk PGUID!
|
||||
*data << ((WorldObject*)this)->GetPositionX();
|
||||
|
|
@ -572,7 +572,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2
|
|||
}
|
||||
|
||||
// 0x200
|
||||
if(flags & UPDATEFLAG_UNK2)
|
||||
if(flags & UPDATEFLAG_ROTATION)
|
||||
{
|
||||
*data << uint64(((GameObject*)this)->GetRotation());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1478,9 +1478,9 @@ void Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
|
|||
const ItemPrototype * proto = objmgr.GetItemPrototype(item_id);
|
||||
SpellItemEnchantmentEntry const *enchant = NULL;
|
||||
|
||||
for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot<=TEMP_ENCHANTMENT_SLOT; enchantSlot++)
|
||||
for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
|
||||
{
|
||||
uint32 enchantId = GetUInt32Value(visualbase+1+enchantSlot);
|
||||
uint32 enchantId = GetUInt16Value(visualbase + 1, enchantSlot);
|
||||
if(enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId))
|
||||
break;
|
||||
}
|
||||
|
|
@ -9262,7 +9262,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
}
|
||||
|
||||
// check free space for all items
|
||||
for (int k=0;k<count;k++)
|
||||
for (int k = 0; k < count; ++k)
|
||||
{
|
||||
Item *pItem = pItems[k];
|
||||
|
||||
|
|
@ -9293,7 +9293,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
{
|
||||
bool b_found = false;
|
||||
|
||||
for(int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; t++)
|
||||
for(int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_keys[t-KEYRING_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
|
|
@ -9305,7 +9305,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; t++)
|
||||
for(int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_tokens[t-CURRENCYTOKEN_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
|
|
@ -9317,7 +9317,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; t++)
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
|
|
@ -9329,7 +9329,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag )
|
||||
|
|
@ -9384,7 +9384,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag )
|
||||
|
|
@ -9412,7 +9412,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
|
||||
// search free slot
|
||||
bool b_found = false;
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; t++)
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
|
||||
{
|
||||
if( inv_slot_items[t-INVENTORY_SLOT_ITEM_START] == 0 )
|
||||
{
|
||||
|
|
@ -9424,7 +9424,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||
if (b_found) continue;
|
||||
|
||||
// search free slot in bags
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag )
|
||||
|
|
@ -10027,7 +10027,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
|||
if (bag == INVENTORY_SLOT_BAG_0)
|
||||
{
|
||||
m_items[slot] = pItem;
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_CONTAINED, GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_OWNER, GetGUID() );
|
||||
|
||||
|
|
@ -10225,19 +10225,11 @@ void Player::QuickEquipItem( uint16 pos, Item *pItem)
|
|||
|
||||
void Player::SetVisibleItemSlot(uint8 slot, Item *pItem)
|
||||
{
|
||||
// PLAYER_VISIBLE_ITEM_i_CREATOR // Size: 2
|
||||
// PLAYER_VISIBLE_ITEM_i_0 // Size: 12
|
||||
// entry // Size: 1
|
||||
// inspected enchantments // Size: 6
|
||||
// ? // Size: 5
|
||||
// PLAYER_VISIBLE_ITEM_i_PROPERTIES // Size: 1 (property,suffix factor)
|
||||
// PLAYER_VISIBLE_ITEM_i_PAD // Size: 1
|
||||
// // = 16
|
||||
|
||||
if(pItem)
|
||||
{
|
||||
SetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENTRYID + (slot * 2), pItem->GetEntry());
|
||||
SetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (slot * 2), pItem->GetEnchantmentId(EnchantmentSlot(0)));
|
||||
SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (slot * 2), 0, pItem->GetEnchantmentId(PERM_ENCHANTMENT_SLOT));
|
||||
SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (slot * 2), 1, pItem->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -10258,7 +10250,7 @@ void Player::VisualizeItem( uint8 slot, Item *pItem)
|
|||
sLog.outDebug( "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
|
||||
|
||||
m_items[slot] = pItem;
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_CONTAINED, GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_OWNER, GetGUID() );
|
||||
pItem->SetSlot( slot );
|
||||
|
|
@ -10327,7 +10319,7 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
UpdateKnownCurrencies(pItem->GetEntry(), false);
|
||||
|
||||
m_items[slot] = NULL;
|
||||
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
|
||||
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
|
||||
|
||||
if ( slot < EQUIPMENT_SLOT_END )
|
||||
SetVisibleItemSlot(slot, NULL);
|
||||
|
|
@ -10408,7 +10400,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
|
||||
if( bag == INVENTORY_SLOT_BAG_0 )
|
||||
{
|
||||
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
|
||||
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
|
||||
|
||||
// equipment and equipped bags can have applied bonuses
|
||||
if ( slot < INVENTORY_SLOT_BAG_END )
|
||||
|
|
@ -11022,7 +11014,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
|
|||
ItemPrototype const* bagItemProto = bagItem->GetProto();
|
||||
if (!bagItemProto || !ItemCanGoIntoBag(bagItemProto, emotyProto))
|
||||
{
|
||||
// one from items not go to empry target bag
|
||||
// one from items not go to empty target bag
|
||||
SendEquipError( EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG, pSrcItem, pDstItem );
|
||||
return;
|
||||
}
|
||||
|
|
@ -11119,7 +11111,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
|
|||
uint32 etime = uint32(base - m_logintime + (30 * 3600));
|
||||
uint32 eslot = slot - BUYBACK_SLOT_START;
|
||||
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + eslot * 2, pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), pItem->GetGUID() );
|
||||
ItemPrototype const *pProto = pItem->GetProto();
|
||||
if( pProto )
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, pProto->SellPrice * pItem->GetCount() );
|
||||
|
|
@ -11156,7 +11148,7 @@ void Player::RemoveItemFromBuyBackSlot( uint32 slot, bool del )
|
|||
m_items[slot] = NULL;
|
||||
|
||||
uint32 eslot = slot - BUYBACK_SLOT_START;
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + eslot * 2, 0 );
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0 );
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0 );
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, 0 );
|
||||
|
||||
|
|
@ -11418,7 +11410,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||
|
||||
if (!item->IsBroken())
|
||||
{
|
||||
for (int s=0; s<3; s++)
|
||||
for (int s = 0; s < 3; ++s)
|
||||
{
|
||||
uint32 enchant_display_type = pEnchant->type[s];
|
||||
uint32 enchant_amount = pEnchant->amount[s];
|
||||
|
|
@ -11452,7 +11444,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||
if (item_rand)
|
||||
{
|
||||
// Search enchant_amount
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand->enchant_id[k] == enchant_id)
|
||||
{
|
||||
|
|
@ -11478,7 +11470,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||
ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
|
||||
if(item_rand)
|
||||
{
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand->enchant_id[k] == enchant_id)
|
||||
{
|
||||
|
|
@ -11498,7 +11490,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||
ItemRandomSuffixEntry const *item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
|
||||
if(item_rand_suffix)
|
||||
{
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand_suffix->enchant_id[k] == enchant_id)
|
||||
{
|
||||
|
|
@ -11717,9 +11709,11 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||
|
||||
// visualize enchantment at player and equipped items
|
||||
if(slot == PERM_ENCHANTMENT_SLOT)
|
||||
{
|
||||
SetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), apply ? item->GetEnchantmentId(slot) : 0);
|
||||
}
|
||||
SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 0, apply ? item->GetEnchantmentId(slot) : 0);
|
||||
|
||||
if(slot == TEMP_ENCHANTMENT_SLOT)
|
||||
SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 1, apply ? item->GetEnchantmentId(slot) : 0);
|
||||
|
||||
|
||||
if(apply_dur)
|
||||
{
|
||||
|
|
@ -11761,18 +11755,18 @@ void Player::SendNewItem(Item *item, uint32 count, bool received, bool created,
|
|||
|
||||
// last check 2.0.10
|
||||
WorldPacket data( SMSG_ITEM_PUSH_RESULT, (8+4+4+4+1+4+4+4+4+4) );
|
||||
data << GetGUID(); // player GUID
|
||||
data << uint64(GetGUID()); // player GUID
|
||||
data << uint32(received); // 0=looted, 1=from npc
|
||||
data << uint32(created); // 0=received, 1=created
|
||||
data << uint32(1); // always 0x01 (probably meant to be count of listed items)
|
||||
data << (uint8)item->GetBagSlot(); // bagslot
|
||||
data << uint8(item->GetBagSlot()); // bagslot
|
||||
// item slot, but when added to stack: 0xFFFFFFFF
|
||||
data << (uint32) ((item->GetCount()==count) ? item->GetSlot() : -1);
|
||||
data << uint32((item->GetCount() == count) ? item->GetSlot() : -1);
|
||||
data << uint32(item->GetEntry()); // item id
|
||||
data << uint32(item->GetItemSuffixFactor()); // SuffixFactor
|
||||
data << uint32(item->GetItemRandomPropertyId()); // random item property id
|
||||
data << uint32(count); // count of items
|
||||
data << GetItemCount(item->GetEntry()); // count of items in inventory
|
||||
data << uint32(GetItemCount(item->GetEntry())); // count of items in inventory
|
||||
|
||||
if (broadcast && GetGroup())
|
||||
GetGroup()->BroadcastPacket(&data, true);
|
||||
|
|
@ -11857,12 +11851,13 @@ void Player::SendPreparedQuest( uint64 guid )
|
|||
// Auto open -- maybe also should verify there is no greeting
|
||||
uint32 quest_id = qmi0.m_qId;
|
||||
Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
|
||||
|
||||
if ( pQuest )
|
||||
{
|
||||
if( status == DIALOG_STATUS_REWARD_REP && !GetQuestRewardStatus( quest_id ) )
|
||||
if( status == DIALOG_STATUS_UNK2 && !GetQuestRewardStatus( quest_id ) )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanRewardQuest(pQuest, false), true );
|
||||
else if( status == DIALOG_STATUS_UNK2 )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanRewardQuest(pQuest, false), true );
|
||||
else if( status == DIALOG_STATUS_INCOMPLETE )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, false, true );
|
||||
// Send completable on repeatable quest if player don't have quest
|
||||
else if( pQuest->IsRepeatable() && !pQuest->IsDaily() )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanCompleteRepeatableQuest(pQuest), true );
|
||||
|
|
@ -13807,7 +13802,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
|
||||
for(uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), 0 );
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0 );
|
||||
SetVisibleItemSlot(slot, NULL);
|
||||
|
||||
if (m_items[slot])
|
||||
|
|
|
|||
|
|
@ -132,8 +132,7 @@ void MapManager::LoadTransports()
|
|||
|
||||
Transport::Transport() : GameObject()
|
||||
{
|
||||
// 3.1.0 - 0x34A
|
||||
m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_UNK2);
|
||||
m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_ROTATION);
|
||||
}
|
||||
|
||||
bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Unit::Unit()
|
|||
{
|
||||
m_objectType |= TYPEMASK_UNIT;
|
||||
m_objectTypeId = TYPEID_UNIT;
|
||||
// 3.1.0 - 0x60
|
||||
|
||||
m_updateFlag = (UPDATEFLAG_HIGHGUID | UPDATEFLAG_LIVING | UPDATEFLAG_HAS_POSITION);
|
||||
|
||||
m_attackTimer[BASE_ATTACK] = 0;
|
||||
|
|
@ -289,7 +289,7 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 ty
|
|||
data << uint32(MovementFlags);
|
||||
|
||||
if(MovementFlags & MONSTER_MOVE_WALK)
|
||||
moveTime *= 1.4f;
|
||||
moveTime *= 1.05f;
|
||||
|
||||
data << uint32(moveTime); // Time in between points
|
||||
data << uint32(1); // 1 single waypoint
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ enum OBJECT_UPDATE_FLAGS
|
|||
UPDATEFLAG_LIVING = 0x0020,
|
||||
UPDATEFLAG_HAS_POSITION = 0x0040,
|
||||
UPDATEFLAG_VEHICLE = 0x0080,
|
||||
UPDATEFLAG_UNK1 = 0x0100,
|
||||
UPDATEFLAG_UNK2 = 0x0200
|
||||
UPDATEFLAG_POSITION = 0x0100,
|
||||
UPDATEFLAG_ROTATION = 0x0200
|
||||
};
|
||||
|
||||
class UpdateData
|
||||
|
|
|
|||
|
|
@ -345,10 +345,10 @@ void WorldSession::LogoutPlayer(bool Save)
|
|||
if(Save)
|
||||
{
|
||||
uint32 eslot;
|
||||
for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; j++)
|
||||
for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j)
|
||||
{
|
||||
eslot = j - BUYBACK_SLOT_START;
|
||||
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1+eslot*2,0);
|
||||
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue