From: Daniel Karbach Date: Tue, 5 Feb 2013 19:58:12 +0000 (+0100) Subject: made monsters' rewards settable by data X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=8f4e771181491f1d83ce0c907b8dda0fbbe0ce93;p=l2e.git made monsters' rewards settable by data --- diff --git a/src/battle/Monster.cpp b/src/battle/Monster.cpp index a252e5f..0e87e39 100644 --- a/src/battle/Monster.cpp +++ b/src/battle/Monster.cpp @@ -72,6 +72,9 @@ void Monster::CreateTypeDescription() { td.AddField("mana", FieldDescription(((char *)&m.mana) - ((char *)&m), Interpreter::NUMBER_ID)); td.AddField("stats", FieldDescription(((char *)&m.stats) - ((char *)&m), Stats::TYPE_ID)); + td.AddField("expReward", FieldDescription(((char *)&m.expReward) - ((char *)&m), Interpreter::NUMBER_ID)); + td.AddField("goldReward", FieldDescription(((char *)&m.goldReward) - ((char *)&m), Interpreter::NUMBER_ID)); + td.AddField("attackAnimation", FieldDescription(((char *)&m.attackAnimation) - ((char *)&m), Animation::TYPE_ID).SetReferenced()); td.AddField("spellAnimation", FieldDescription(((char *)&m.spellAnimation) - ((char *)&m), Animation::TYPE_ID).SetReferenced()); td.AddField("meleeAnimation", FieldDescription(((char *)&m.meleeAnimation) - ((char *)&m), Animation::TYPE_ID).SetReferenced()); diff --git a/test-data/test.l2s b/test-data/test.l2s index 342d98f..4fd4e97 100644 --- a/test-data/test.l2s +++ b/test-data/test.l2s @@ -45,6 +45,8 @@ export Monster lizard { gut: 6, mgr: 6 }, + expReward: 2, + goldReward: 5, attackAnimation: ComplexAnimation { sprite: lizardSprite, frametime: fourFramesTime,