private void onChanged(long sessionid, byte index, byte field, Octets data, Octets dataremoved) { bool __o_flags__; __o_flags__ = __flags__.get(index); __flags__.set(index); ViewChangedType _t_ = __o_flags__ ? ViewChangedType.REPLACE : ViewChangedType.NEW; OctetsStream _os_ = OctetsStream.wrap(data); switch (index) { case 0: { __nickname _s_ = _t_ == ViewChangedType.REPLACE ? nickname : (nickname = new __nickname()); switch (field) { case 0: { _s_.nickname = _os_.unmarshal_string(); break; } } __type__ = _t_; break; } case 1: { __position _s_ = _t_ == ViewChangedType.REPLACE ? position : (position = new __position()); switch (field) { case 0: { _os_.unmarshal(_s_.position); break; } } __type__ = _t_; break; } case 2: { __hp _s_ = _t_ == ViewChangedType.REPLACE ? hp : (hp = new __hp()); switch (field) { case 0: { _s_.hp = _os_.unmarshal_int(); break; } } __type__ = _t_; break; } default: throw new Exception("view \"" + this + "\" mismatch bind index = \"" + index + "\""); } }
public override bool Equals(object __o1__) { if (__o1__ == this) { return(true); } if (__o1__.GetType() != this.GetType()) { return(false); } __nickname __o__ = (__nickname)__o1__; if (!Utils.equals(this.nickname, __o__.nickname)) { return(false); } return(true); }
private void onChanged(long sessionid, byte index, Octets data) { bool __o_flags__; __o_flags__ = __flags__.get(index); __flags__.set(index); ViewChangedType _t_ = __o_flags__ ? ViewChangedType.REPLACE : ViewChangedType.NEW; OctetsStream _os_ = OctetsStream.wrap(data); switch (index) { case 0: { __nickname _n_ = new __nickname(); _n_.unmarshal(_os_); nickname = _n_; onViewChanged(sessionid, "nickname", _n_, _t_); break; } case 1: { __position _n_ = new __position(); _n_.unmarshal(_os_); position = _n_; onViewChanged(sessionid, "position", _n_, _t_); break; } case 2: { __hp _n_ = new __hp(); _n_.unmarshal(_os_); hp = _n_; onViewChanged(sessionid, "hp", _n_, _t_); break; } default: throw new Exception("view \"" + this + "\" lost var index = \"" + index + "\""); } }