4 * Created on: Sep 19, 2012
10 #include "TypeDescription.h"
13 using battle::Monster;
14 using battle::PartyLayout;
22 Caster::Caster(Interpreter &intp)
24 , battleResourcesId(TypeDescription::GetTypeId("BattleResources"))
25 , heroId(TypeDescription::GetTypeId("Hero"))
26 , itemId(TypeDescription::GetTypeId("Item"))
27 , monsterId(TypeDescription::GetTypeId("Monster"))
28 , partyLayoutId(TypeDescription::GetTypeId("PartyLayout"))
29 , spellId(TypeDescription::GetTypeId("Spell")) {
34 battle::Resources *Caster::GetBattleResources(const string &ident) {
35 return reinterpret_cast<battle::Resources *>(intp.GetObject(battleResourcesId, ident));
38 Hero *Caster::GetHero(const string &ident) {
39 return reinterpret_cast<Hero *>(intp.GetObject(heroId, ident));
42 Item *Caster::GetItem(const string &ident) {
43 return reinterpret_cast<Item *>(intp.GetObject(itemId, ident));
46 Monster *Caster::GetMonster(const string &ident) {
47 return reinterpret_cast<Monster *>(intp.GetObject(monsterId, ident));
50 PartyLayout *Caster::GetPartyLayout(const string &ident) {
51 return reinterpret_cast<PartyLayout *>(intp.GetObject(partyLayoutId, ident));
54 Spell *Caster::GetSpell(const string &ident) {
55 return reinterpret_cast<Spell *>(intp.GetObject(spellId, ident));