MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / SetGoodwill

Method SetGoodwill

ogsr_engine/xrGame/script_game_object_inventory_owner.cpp:427–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427void CScriptGameObject::SetGoodwill(int goodwill, CScriptGameObject* pWhoToSet)
428{
429 CInventoryOwner* pInventoryOwner = smart_cast<CInventoryOwner*>(&object());
430
431 if (!pInventoryOwner)
432 {
433 ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "SetGoodwill available only for InventoryOwner");
434 return;
435 }
436 return RELATION_REGISTRY().SetGoodwill(pInventoryOwner->object_id(), pWhoToSet->object().ID(), goodwill);
437}
438
439void CScriptGameObject::ChangeGoodwill(int delta_goodwill, CScriptGameObject* pWhoToSet)
440{

Callers

nothing calls this directly

Calls 5

RELATION_REGISTRYClass · 0.85
script_logMethod · 0.80
objectFunction · 0.50
object_idMethod · 0.45
objectMethod · 0.45

Tested by

no test coverage detected