Fix missing ReGameDLL check in GetItemPrice() (#423)

This commit is contained in:
Vincent Herbet 2017-03-11 10:49:37 +01:00 committed by GitHub
parent 55c9143b2b
commit d23d9b1ba8

View File

@ -14,6 +14,7 @@
#include "CstrikeItemsInfos.h"
#include "CstrikeHacks.h"
#include <amtl/am-utility.h>
#include <resdk/mod_regamedll_api.h>
CsItemInfo ItemsManager;
ItemInfo WeaponsList[MAX_WEAPONS];
@ -272,5 +273,10 @@ int CsItemInfo::GetItemPrice(int itemId)
return m_EquipmentsPrice[static_cast<size_t>(id)];
}
if (HasReGameDll)
{
return ReGameApi->GetWeaponInfo(itemId == CSI_SHIELD ? CSI_SHIELDGUN : itemId)->cost;
}
return GetWeaponInfo(itemId == CSI_SHIELD ? CSI_SHIELDGUN : itemId)->cost;
}