3 #include "TypeDescription.h"
6 using battle::PartyLayout;
16 Caster::Caster(Interpreter &intp)
18 , battleResourcesId(TypeDescription::GetTypeId("BattleResources"))
19 , heroId(TypeDescription::GetTypeId("Hero"))
20 , itemId(TypeDescription::GetTypeId("Item"))
21 , mapId(TypeDescription::GetTypeId("Map"))
22 , monsterId(TypeDescription::GetTypeId("Monster"))
23 , partyLayoutId(TypeDescription::GetTypeId("PartyLayout"))
24 , spellId(TypeDescription::GetTypeId("Spell")) {
29 battle::Resources *Caster::GetBattleResources(const string &ident) {
30 return reinterpret_cast<battle::Resources *>(intp.GetObject(battleResourcesId, ident));
33 Hero *Caster::GetHero(const string &ident) {
34 return reinterpret_cast<Hero *>(intp.GetObject(heroId, ident));
37 Item *Caster::GetItem(const string &ident) {
38 return reinterpret_cast<Item *>(intp.GetObject(itemId, ident));
41 Map *Caster::GetMap(const string &ident) {
42 return reinterpret_cast<Map *>(intp.GetObject(mapId, ident));
45 Monster *Caster::GetMonster(const string &ident) {
46 return reinterpret_cast<Monster *>(intp.GetObject(monsterId, ident));
49 PartyLayout *Caster::GetPartyLayout(const string &ident) {
50 return reinterpret_cast<PartyLayout *>(intp.GetObject(partyLayoutId, ident));
53 Spell *Caster::GetSpell(const string &ident) {
54 return reinterpret_cast<Spell *>(intp.GetObject(spellId, ident));