mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
GetObj tweak
This commit is contained in:
parent
4b776db1a2
commit
c0821495e5
@ -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()
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user