package com.nestedworld.nestedworld.network.socket.models.message.combat;


import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.nestedworld.nestedworld.network.socket.implementation.SocketMessageType;
import com.nestedworld.nestedworld.network.socket.models.message.DefaultMessage;

import org.msgpack.value.Value;
import org.msgpack.value.ValueFactory;

import java.util.Map;

public class MonsterKoMessage extends DefaultMessage {

    private long monster;

    /*
    ** Constructor
     */
    public MonsterKoMessage(@NonNull Map<Value, Value> message, @NonNull SocketMessageType.MessageKind messageKind, @Nullable SocketMessageType.MessageKind idKind) {
        super(message, messageKind, idKind);
    }

    /*
    ** Life cycle
     */
    @Override
    protected void unSerialise(@NonNull Map<Value, Value> message) {
        message.get(ValueFactory.newString("monster")).asIntegerValue().asInt();
    }

    /*
    ** Getter / Setter
     */
    public long getMonster() {
        return monster;
    }
}

@@ -477,20 +477,42 @@
 e %7B%0A
-%0A
     p
-rivate
+ublic long combat;%0A    public
  lon
@@ -523,16 +523,17 @@
 nster;%0A%0A
+%0A
     /*%0A 
@@ -899,16 +899,30 @@
 %0A       
+ this.combat =
  message
@@ -950,23 +950,22 @@
 String(%22
-monster
+combat
 %22)).asIn
@@ -983,19 +983,20 @@
 ).as
-Int
+Long
 ();%0A    
 %7D%0A%0A 
@@ -995,102 +995,99 @@
     
-%7D%0A%0A
     
-/*%0A    ** Getter / Setter%0A     */%0A    public long getMonster() %7B%0A        return monster
+this.monster = message.get(ValueFactory.newString(%22monster%22)).asIntegerValue().asLong()
 ;%0A  

parse monsterKo