MCPcopy Create free account
hub / github.com/Norbyte/ositools / HitAddDamage

Function HitAddDamage

OsiInterface/Functions/DamageFunctions.cpp:595–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593 }
594
595 void HitAddDamage(OsiArgumentDesc const & args)
596 {
597 auto helper = HelperHandleToHelper(args[0].Int64);
598 auto damageTypeStr = args[1].String;
599 auto amount = args[2].Int32;
600
601 if (helper == nullptr) return;
602
603 auto damageType = EnumInfo<DamageType>::Find(damageTypeStr);
604 if (!damageType) {
605 OsiError("Not a valid DamageType: " << damageTypeStr);
606 return;
607 }
608
609 helper->AddDamage(*damageType, amount);
610 }
611
612 esv::Status * GetStatusHelper(OsiArgumentDesc const & args);
613

Callers

nothing calls this directly

Calls 2

HelperHandleToHelperFunction · 0.85
AddDamageMethod · 0.45

Tested by

no test coverage detected