MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / setInJail

Method setInJail

source/entities/Creature.cpp:3075–3093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3073}
3074
3075void Creature::setInJail(Room* prison)
3076{
3077 if(prison == nullptr)
3078 {
3079 if(mSeatPrison == nullptr)
3080 return;
3081
3082 mSeatPrison = nullptr;
3083 mNeedFireRefresh = true;
3084 return;
3085 }
3086
3087 // Creature is set in prison
3088 if(mSeatPrison == prison->getSeat())
3089 return;
3090
3091 mSeatPrison = prison->getSeat();
3092 mNeedFireRefresh = true;
3093}
3094
3095bool Creature::isDangerous(const Creature* creature, int distance) const
3096{

Callers 4

addCreatureUsingRoomMethod · 0.80
addCreatureUsingRoomMethod · 0.80

Calls 1

getSeatMethod · 0.45

Tested by

no test coverage detected