1
This commit is contained in:
parent
32ccefbed8
commit
43131cb5d4
@ -1187,13 +1187,6 @@ bool Creature::IsEnemy(Creature* target)
|
||||
}
|
||||
}
|
||||
|
||||
void Creature::TraverseCreatures(std::function<void (Creature*, bool&)> func)
|
||||
{
|
||||
room->grid_service->TraverseCreatures(room->GetRoomIdx(),
|
||||
GetGridList(),
|
||||
func);
|
||||
}
|
||||
|
||||
void Creature::TraverseProperTargets(std::function<void (Creature*, bool&)> func)
|
||||
{
|
||||
auto callback =
|
||||
|
@ -151,7 +151,6 @@ class Creature : public MoveableEntity
|
||||
int GetActionType() { return action_type; }
|
||||
int GetActionTargetId() { return action_target_id; }
|
||||
|
||||
void TraverseCreatures(std::function<void (Creature*, bool&)> func);
|
||||
void TraverseProperTargets(std::function<void (Creature*, bool&)> func);
|
||||
void TraverseProperTargetsNoTeammate(std::function<void (Creature*, bool&)> func);
|
||||
CreatureWeakPtrChunk* GetWeakPtrChunk() { return &weak_ptr_chunk_; };
|
||||
|
@ -63,3 +63,10 @@ void MoveableEntity::SyncAroundPlayers(const char* file, int line, const char* f
|
||||
hum->AddToNewObjects(this);
|
||||
});
|
||||
}
|
||||
|
||||
void MoveableEntity::TraverseCreatures(std::function<void (Creature*, bool&)> func)
|
||||
{
|
||||
room->grid_service->TraverseCreatures(room->GetRoomIdx(),
|
||||
GetGridList(),
|
||||
func);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ class MoveableEntity : public RoomEntity
|
||||
int UpdatedTimes() { return updated_times_;}
|
||||
std::set<GridCell*>& GetGridList() { return grid_list_; }
|
||||
|
||||
void TraverseCreatures(std::function<void (Creature*, bool&)> func);
|
||||
void TraverseAllLayerEntityList(std::function<void (Entity*, bool&)> func);
|
||||
void TraverseAllLayerHumanList(std::function<void (Human*, bool&)> func);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user