mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fixed bug #539.
This commit is contained in:
@@ -2239,9 +2239,9 @@ void CGameHandler::giveHeroArtifact(int artid, int hid, int position) //pos==-1
|
|||||||
int i;
|
int i;
|
||||||
for(i=0; i<art.possibleSlots.size(); i++) //try to put artifact into first available slot
|
for(i=0; i<art.possibleSlots.size(); i++) //try to put artifact into first available slot
|
||||||
{
|
{
|
||||||
if( !vstd::contains(sha.artifWorn,art.possibleSlots[i]) )
|
if(art.fitsAt(sha.artifWorn, art.possibleSlots[i]))
|
||||||
{
|
{
|
||||||
//we've found a free suitable slot
|
//we've found a free suitable slot.
|
||||||
VLC->arth->equipArtifact(sha.artifWorn, art.possibleSlots[i], artid);
|
VLC->arth->equipArtifact(sha.artifWorn, art.possibleSlots[i], artid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2256,7 +2256,7 @@ void CGameHandler::giveHeroArtifact(int artid, int hid, int position) //pos==-1
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!vstd::contains(sha.artifWorn,ui16(position)))
|
if(art.fitsAt(sha.artifWorn, ui16(position)))
|
||||||
{
|
{
|
||||||
VLC->arth->equipArtifact(sha.artifWorn, position, artid);
|
VLC->arth->equipArtifact(sha.artifWorn, position, artid);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user