1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* creature ID refactoring

* double week creatures are configurable now
This commit is contained in:
mateuszb
2013-02-07 17:34:50 +00:00
parent ed3d35554e
commit f1c78e3260
52 changed files with 420 additions and 345 deletions

View File

@@ -933,7 +933,7 @@ void IGameEventRealizer::setObjProperty(int objid, int prop, si64 val)
commitPackage(&sob);
}
const CGObjectInstance * IGameCallback::putNewObject(int ID, int subID, int3 pos)
const CGObjectInstance * IGameCallback::putNewObject(Obj::Obj ID, int subID, int3 pos)
{
NewObject no;
no.ID = ID; //creature
@@ -945,7 +945,7 @@ const CGObjectInstance * IGameCallback::putNewObject(int ID, int subID, int3 pos
const CGCreature * IGameCallback::putNewMonster(int creID, int count, int3 pos)
{
const CGObjectInstance *m = putNewObject(54, creID, pos);
const CGObjectInstance *m = putNewObject(Obj::MONSTER, creID, pos);
setObjProperty(m->id, ObjProperty::MONSTER_COUNT, count);
setObjProperty(m->id, ObjProperty::MONSTER_POWER, (si64)1000*count);
return dynamic_cast<const CGCreature*>(m);