Browse Source

crash fix for non entity handle loot

Emagi 9 tháng trước cách đây
mục cha
commit
a55fda41b5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      EQ2/source/WorldServer/client.cpp

+ 1 - 1
EQ2/source/WorldServer/client.cpp

@@ -2761,7 +2761,7 @@ bool Client::HandleLootItem(Spawn* entity, Item* item, Spawn* target, bool overr
 	}
 
 	// needs to only be checked before expiration of loot restrictions
-	if (!overrideLootRestrictions) {
+	if (entity && !overrideLootRestrictions) {
 		if (entity->GetLootGroupID() > 0 && (!lootingPlayer->GetGroupMemberInfo() || lootingPlayer->GetGroupMemberInfo()->group_id != entity->GetLootGroupID())) {
 			LogWrite(LOOT__ERROR, 0, "Loot", "%s: Loot Group ID from %s did not match Item: %s (%u), expected group id %u.", entity->GetName(), lootingPlayer->GetName(), item->name.c_str(), item->details.item_id, entity->GetLootGroupID());
 			return false;