1
0
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:
Ivan Savenko
2024-01-16 19:06:41 +02:00
parent 6e629a6a5f
commit ffd604c114
7 changed files with 9 additions and 9 deletions

View File

@@ -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;