diff options
author | QAston <none@none> | 2009-03-04 00:29:50 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-04 00:29:50 +0100 |
commit | d6b09015d6c1ac5c62e63d51aeb496c0cc2d3fe5 (patch) | |
tree | 183a759c6540c040174449502c0ce7552a6f5484 /src/game/Player.cpp | |
parent | 454f882cf238506bc12f593de71e97cd27e961e8 (diff) | |
parent | c113bf884f9523745f22aae78cde80903b2ba192 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index cde74b4a66b..ac261b90529 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -5757,7 +5757,8 @@ void Player::SetFactionVisibleForFactionTemplateId(uint32 FactionTemplateId) if(!factionTemplateEntry) return; - SetFactionVisibleForFactionId(factionTemplateEntry->faction); + if(factionTemplateEntry->faction) + SetFactionVisibleForFactionId(factionTemplateEntry->faction); } void Player::SetFactionVisibleForFactionId(uint32 FactionId) @@ -10172,6 +10173,12 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t ); if( pBag ) { + pBagProto = pBag->GetProto(); + + // special bag already checked + if( pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER)) + continue; + for(uint32 j = 0; j < pBag->GetBagSize(); j++) { if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 ) @@ -19241,7 +19248,7 @@ BGQueueIdBasedOnLevel Player::GetBattleGroundQueueIdFromLevel(BattleGroundTypeId float Player::GetReputationPriceDiscount( Creature const* pCreature ) const { FactionTemplateEntry const* vendor_faction = pCreature->getFactionTemplateEntry(); - if(!vendor_faction) + if(!vendor_faction || !vendor_faction->faction) return 1.0f; ReputationRank rank = GetReputationRank(vendor_faction->faction); |