mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11702] Alsways attempt generate randomProperty for item in at create if value not pre-selected.
This resolve all existed cases when we miss assign random property id. Also move random property/suffix check from item creating to server load time.
This commit is contained in:
parent
67f9c26d51
commit
cc11366d6b
6 changed files with 64 additions and 61 deletions
|
|
@ -11114,13 +11114,11 @@ Item* Player::StoreNewItem( ItemPosCountVec const& dest, uint32 item, bool updat
|
|||
for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
|
||||
count += itr->count;
|
||||
|
||||
Item *pItem = Item::CreateItem( item, count, this );
|
||||
if( pItem )
|
||||
Item *pItem = Item::CreateItem(item, count, this, randomPropertyId);
|
||||
if (pItem)
|
||||
{
|
||||
ItemAddedQuestCheck( item, count );
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, item, count);
|
||||
if(randomPropertyId)
|
||||
pItem->SetItemRandomProperties(randomPropertyId);
|
||||
pItem = StoreItem( dest, pItem, update );
|
||||
}
|
||||
return pItem;
|
||||
|
|
@ -11260,7 +11258,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
|||
|
||||
Item* Player::EquipNewItem( uint16 pos, uint32 item, bool update )
|
||||
{
|
||||
if (Item *pItem = Item::CreateItem( item, 1, this ))
|
||||
if (Item *pItem = Item::CreateItem(item, 1, this))
|
||||
{
|
||||
ItemAddedQuestCheck( item, 1 );
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, item, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue