Ares
|
#include <src/Ext/AnimType/Body.h>
Classes | |
class | ExtData |
Public Types | |
typedef AnimTypeClass | TT |
Static Public Member Functions | |
static void | SetMakeInfOwner (AnimClass *pAnim, HouseClass *pInvoker, HouseClass *pVictim, HouseClass *pKiller) |
Static Public Attributes | |
static Container< AnimTypeExt > | ExtMap |
typedef AnimTypeClass AnimTypeExt::TT |
void AnimTypeExt::SetMakeInfOwner | ( | AnimClass * | pAnim, |
HouseClass * | pInvoker, | ||
HouseClass * | pVictim, | ||
HouseClass * | pKiller | ||
) | [static] |
{ AnimTypeExt::ExtData *pAnimData = AnimTypeExt::ExtMap.Find(pAnim->Type); HouseClass *newOwner = NULL; switch(pAnimData->MakeInfantryOwner) { case AnimTypeExt::ExtData::NEUTRAL: newOwner = HouseClass::FindByCountryIndex(HouseTypeClass::FindIndexOfName("Neutral")); break; case AnimTypeExt::ExtData::RANDOM: newOwner = HouseClass::Array->GetItem(ScenarioClass::Instance->Random.RandomRanged(0, HouseClass::Array->Count - 1)); break; case AnimTypeExt::ExtData::VICTIM: newOwner = pVictim; break; case AnimTypeExt::ExtData::INVOKER: newOwner = pInvoker; break; case AnimTypeExt::ExtData::KILLER: default: newOwner = pKiller; break; } if(newOwner) { pAnim->Owner = newOwner; if(pAnim->Type->MakeInfantry > -1) { pAnim->LightConvert = ColorScheme::Array->Items[newOwner->ColorSchemeIndex]->LightConvert; } } }
Container< AnimTypeExt > AnimTypeExt::ExtMap [static] |