forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
4.3 KiB
171 lines
4.3 KiB
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . |
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· |
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ |
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ |
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ |
|
// Magicbane Emulator Project © 2013 - 2022 |
|
// www.magicbane.com |
|
|
|
|
|
package engine.net.client.msg; |
|
|
|
|
|
import engine.net.AbstractConnection; |
|
import engine.net.ByteBufferReader; |
|
import engine.net.ByteBufferWriter; |
|
import engine.net.Protocol; |
|
|
|
public class SocialMsg extends ClientNetMsg { |
|
|
|
private int sourceType; |
|
private int sourceID; |
|
private int unknown01; |
|
private int unknown02; |
|
private int targetType; |
|
private int targetID; |
|
private int social; |
|
|
|
/** |
|
* This is the general purpose constructor. |
|
*/ |
|
public SocialMsg() { |
|
super(Protocol.SOCIALCHANNEL); |
|
} |
|
|
|
/** |
|
* This constructor is used by NetMsgFactory. It attempts to deserialize the |
|
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading |
|
* past the limit) then this constructor Throws that Exception to the |
|
* caller. |
|
*/ |
|
public SocialMsg(AbstractConnection origin, ByteBufferReader reader) { |
|
super(Protocol.SOCIALCHANNEL, origin, reader); |
|
} |
|
|
|
/** |
|
* Serializes the subclass specific items to the supplied NetMsgWriter. |
|
*/ |
|
@Override |
|
protected void _serialize(ByteBufferWriter writer) { |
|
writer.putInt(this.sourceType); |
|
writer.putInt(this.sourceID); |
|
writer.putInt(this.unknown01); |
|
writer.putInt(this.unknown02); |
|
writer.putInt(this.targetType); |
|
writer.putInt(this.targetID); |
|
writer.putInt(this.social); |
|
} |
|
|
|
/** |
|
* Deserializes the subclass specific items from the supplied NetMsgReader. |
|
*/ |
|
@Override |
|
protected void _deserialize(ByteBufferReader reader) { |
|
this.sourceType = reader.getInt(); |
|
this.sourceID = reader.getInt(); |
|
this.unknown01 = reader.getInt(); |
|
this.unknown02 = reader.getInt(); |
|
this.targetType = reader.getInt(); |
|
this.targetID = reader.getInt(); |
|
this.social = reader.getInt(); |
|
} |
|
|
|
/** |
|
* @return the sourceType |
|
*/ |
|
public int getSourceType() { |
|
return sourceType; |
|
} |
|
|
|
/** |
|
* @param sourceType the sourceType to set |
|
*/ |
|
public void setSourceType(int sourceType) { |
|
this.sourceType = sourceType; |
|
} |
|
|
|
/** |
|
* @return the sourceID |
|
*/ |
|
public int getSourceID() { |
|
return sourceID; |
|
} |
|
|
|
/** |
|
* @param sourceID the sourceID to set |
|
*/ |
|
public void setSourceID(int sourceID) { |
|
this.sourceID = sourceID; |
|
} |
|
|
|
/** |
|
* @return the unknown01 |
|
*/ |
|
public int getUnknown01() { |
|
return unknown01; |
|
} |
|
|
|
/** |
|
* @param unknown01 the unknown01 to set |
|
*/ |
|
public void setUnknown01(int unknown01) { |
|
this.unknown01 = unknown01; |
|
} |
|
|
|
/** |
|
* @return the unknown02 |
|
*/ |
|
public int getUnknown02() { |
|
return unknown02; |
|
} |
|
|
|
/** |
|
* @param unknown02 the unknown02 to set |
|
*/ |
|
public void setUnknown02(int unknown02) { |
|
this.unknown02 = unknown02; |
|
} |
|
|
|
/** |
|
* @return the targetType |
|
*/ |
|
public int getTargetType() { |
|
return targetType; |
|
} |
|
|
|
/** |
|
* @param targetType the targetType to set |
|
*/ |
|
public void setTargetType(int targetType) { |
|
this.targetType = targetType; |
|
} |
|
|
|
/** |
|
* @return the targetID |
|
*/ |
|
public int getTargetID() { |
|
return targetID; |
|
} |
|
|
|
/** |
|
* @param targetID the targetID to set |
|
*/ |
|
public void setTargetID(int targetID) { |
|
this.targetID = targetID; |
|
} |
|
|
|
/** |
|
* @return the social |
|
*/ |
|
public int getSocial() { |
|
return social; |
|
} |
|
|
|
/** |
|
* @param social the social to set |
|
*/ |
|
public void setSocial(int social) { |
|
this.social = social; |
|
} |
|
|
|
}
|
|
|