aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorw12x <none@none>2008-10-20 13:41:05 -0500
committerw12x <none@none>2008-10-20 13:41:05 -0500
commit4f06be912b601fd05053a42f869e52ab09fa0f0e (patch)
tree4630fa5c581e3b551687a5f917f1aeeef2eadddc /src/game/Unit.cpp
parent192dada7bd697f0bc4bfb3d3429f65a123d92285 (diff)
[svn] Implement CREATURE_FLAG_EXTRA_TRIGGER. In GM mode, creatures flagged with this will be displayed with displayid_a, in non-gm mode with displayid_h.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 24acc4c18f8..d6347ff5491 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8457,6 +8457,9 @@ bool Unit::isTargetableForAttack() const
if(HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))
return false;
+ if(GetTypeId()==TYPEID_UNIT && (((Creature *)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER))
+ return false;
+
return isAlive() && !hasUnitState(UNIT_STAT_DIED)&& !isInFlight() /*&& !isStealth()*/;
}