MCPcopy Create free account
hub / github.com/DFHack/dfhack / getWound

Function getWound

library/modules/EventManager.cpp:1124–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122}
1123
1124static df::unit_wound* getWound(df::unit* attacker, df::unit* defender) {
1125 for (auto wound : defender->body.wounds) {
1126 if ( wound->age <= 1 && wound->attacker_unit_id == attacker->id ) {
1127 return wound;
1128 }
1129 }
1130 return nullptr;
1131}
1132
1133static void manageUnitAttackEvent(color_ostream& out) {
1134 if (!df::global::world)

Callers 1

manageUnitAttackEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected