1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

GetObj tweak

This commit is contained in:
Dydzio 2018-08-09 22:07:02 +02:00
parent 4b776db1a2
commit c0821495e5
2 changed files with 8 additions and 8 deletions

View File

@ -286,6 +286,12 @@ namespace Goals
{
return boost::format("Bought army of value %d in town of %s") % value, town->name;
}
GetObj::GetObj(int Objid): CGoal(Goals::GET_OBJ)
{
objid = Objid;
tile = ai->myCb->getObjInstance(ObjectInstanceID(objid))->pos;
priority = 3;
}
}
TSubgoal Trade::whatToDoToAchieve()

View File

@ -464,15 +464,9 @@ public:
class DLL_EXPORT GetObj : public CGoal<GetObj>
{
public:
GetObj() {} // empty constructor not allowed
GetObj() = delete; // empty constructor not allowed
GetObj(int Objid);
GetObj(int Objid)
: CGoal(Goals::GET_OBJ)
{
objid = Objid;
tile = cb->getObjInstance(ObjectInstanceID(objid))->visitablePos();
priority = 3;
}
TGoalVec getAllPossibleSubgoals() override;
TSubgoal whatToDoToAchieve() override;
bool operator==(AbstractGoal & g) override;