Ares
Classes | Public Types | Static Public Member Functions | Static Public Attributes

AnimTypeExt Class Reference

#include <src/Ext/AnimType/Body.h>

List of all members.

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< AnimTypeExtExtMap

Member Typedef Documentation

typedef AnimTypeClass AnimTypeExt::TT

Member Function Documentation

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;
                }
        }

}

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines