]> git.localhorst.tv Git - l2e.git/commitdiff
made monsters' rewards settable by data
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 5 Feb 2013 19:58:12 +0000 (20:58 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 5 Feb 2013 19:58:12 +0000 (20:58 +0100)
src/battle/Monster.cpp
test-data/test.l2s

index a252e5f4e5084c2823ef8cf7019177e660be2b37..0e87e3960683bf1f3f45771c2590c5fdb9b1b856 100644 (file)
@@ -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());
index 342d98f829c4c1267ef8f27cc9ae5af76a3a035d..4fd4e9767b0e52e5ad9f2090c9464a4a539427bd 100644 (file)
@@ -45,6 +45,8 @@ export Monster lizard {
                gut:  6,
                mgr:  6
        },
+       expReward: 2,
+       goldReward: 5,
        attackAnimation: ComplexAnimation {
                sprite: lizardSprite,
                frametime: fourFramesTime,