mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Removed unnecessary access to IHandler::objects
This commit is contained in:
@@ -96,14 +96,14 @@ bool IMarket::getOffer(int id1, int id2, int &val1, int &val2, EMarketMode mode)
|
||||
case EMarketMode::CREATURE_EXP:
|
||||
{
|
||||
val1 = 1;
|
||||
val2 = (VLC->creh->objects[id1]->getAIValue() / 40) * 5;
|
||||
val2 = (CreatureID(id1).toEntity(VLC)->getAIValue() / 40) * 5;
|
||||
}
|
||||
break;
|
||||
case EMarketMode::ARTIFACT_EXP:
|
||||
{
|
||||
val1 = 1;
|
||||
|
||||
int givenClass = VLC->arth->objects[id1]->getArtClassSerial();
|
||||
int givenClass = ArtifactID(id1).toArtifact()->getArtClassSerial();
|
||||
if(givenClass < 0 || givenClass > 3)
|
||||
{
|
||||
val2 = 0;
|
||||
|
||||
Reference in New Issue
Block a user