Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements Core/Items: Fixed loading of enchantments Closes issue #4130. --HG-- branch : trunk
This commit is contained in:
@@ -665,6 +665,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
|
||||
{
|
||||
if (member->IsWithinDistInMap(pLootedObject,sWorld.getFloatConfig(CONFIG_GROUP_XP_DISTANCE),false))
|
||||
{
|
||||
|
||||
r->totalPlayersRolling++;
|
||||
|
||||
if (member->GetPassOnGroupLoot())
|
||||
@@ -674,9 +675,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
|
||||
// can't broadcast the pass now. need to wait until all rolling players are known.
|
||||
}
|
||||
else
|
||||
{
|
||||
r->playerVote[member->GetGUID()] = NOT_EMITED_YET;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -723,7 +722,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
|
||||
delete r;
|
||||
}
|
||||
else
|
||||
i->is_underthreshold=1;
|
||||
i->is_underthreshold = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,7 +749,8 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
|
||||
if (!playerToRoll || !playerToRoll->GetSession())
|
||||
continue;
|
||||
|
||||
if (playerToRoll->CanUseItem(item) == EQUIP_ERR_OK && i->AllowedForPlayer(playerToRoll))
|
||||
bool allowedForPlayer = i->AllowedForPlayer(playerToRoll);
|
||||
if (playerToRoll->CanUseItem(item) == EQUIP_ERR_OK && allowedForPlayer)
|
||||
{
|
||||
if (playerToRoll->IsWithinDistInMap(pLootedObject,sWorld.getFloatConfig(CONFIG_GROUP_XP_DISTANCE),false))
|
||||
{
|
||||
@@ -808,7 +808,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
|
||||
delete r;
|
||||
}
|
||||
else
|
||||
i->is_underthreshold=1;
|
||||
i->is_underthreshold = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,7 +949,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
|
||||
item->is_looted = true;
|
||||
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
|
||||
roll->getLoot()->unlootedCount--;
|
||||
player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId);
|
||||
AllowedLooterSet* looters = item->GetAllowedLooters();
|
||||
player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1001,7 +1002,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
|
||||
item->is_looted = true;
|
||||
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
|
||||
roll->getLoot()->unlootedCount--;
|
||||
player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId);
|
||||
AllowedLooterSet* looters = item->GetAllowedLooters();
|
||||
player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user