mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Add comments about getArtPlace - it is a bit dangerouse
This commit is contained in:
parent
7086fdc730
commit
c135591f81
@ -306,7 +306,7 @@ void CArtPlace::deselect ()
|
||||
{
|
||||
auto place = ourOwner->getArtPlace(i);
|
||||
|
||||
if(nullptr != place)
|
||||
if(nullptr != place)//getArtPlace may return null
|
||||
place->pickSlot(false);
|
||||
}
|
||||
}
|
||||
@ -778,7 +778,7 @@ void CArtifactsOfHero::artifactMoved(const ArtifactLocation &src, const Artifact
|
||||
if(dst.isHolder(aoh->curHero))
|
||||
{
|
||||
commonInfo->src.AOH = aoh;
|
||||
if((ap = aoh->getArtPlace(dst.slot)))
|
||||
if((ap = aoh->getArtPlace(dst.slot)))//getArtPlace may return null
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
void artifactRemoved(const ArtifactLocation &al);
|
||||
void artifactAssembled(const ArtifactLocation &al);
|
||||
void artifactDisassembled(const ArtifactLocation &al);
|
||||
CArtPlace *getArtPlace(int slot);
|
||||
CArtPlace *getArtPlace(int slot);//may return null
|
||||
|
||||
void setHero(const CGHeroInstance * hero);
|
||||
const CGHeroInstance *getHero() const;
|
||||
|
Loading…
Reference in New Issue
Block a user