public override void callPropertysSetMethods() { ScriptModule sm = EntityDef.moduledefs["Chat"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; FRIEND_LIST oldval_friends = friends; Property prop_friends = pdatas[4]; if (prop_friends.isBase()) { if (owner.inited && !owner.inWorld) { onFriendsChanged(oldval_friends); } } else { if (owner.inWorld) { if (prop_friends.isOwnerOnly() && !owner.isPlayer()) { } else { onFriendsChanged(oldval_friends); } } } }
public override void onUpdatePropertys(UInt16 propUtype, MemoryStream stream, int maxCount) { ScriptModule sm = EntityDef.moduledefs["Chat"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; while (stream.length() > 0 && maxCount-- != 0) { UInt16 _t_utype = 0; UInt16 _t_child_utype = propUtype; if (_t_child_utype == 0) { if (sm.usePropertyDescrAlias) { _t_utype = stream.readUint8(); _t_child_utype = stream.readUint8(); } else { _t_utype = stream.readUint16(); _t_child_utype = stream.readUint16(); } } Property prop = null; prop = pdatas[_t_child_utype]; switch (prop.properUtype) { case 16: FRIEND_LIST oldval_friends = friends; friends = ((DATATYPE_FRIEND_LIST)EntityDef.id2datatypes[23]).createFromStreamEx(stream); if (prop.isBase()) { if (owner.inited) { onFriendsChanged(oldval_friends); } } else { if (owner.inWorld) { onFriendsChanged(oldval_friends); } } break; default: break; } ; } }
public void addToStreamEx(Bundle stream, FRIEND_LIST v) { stream.writeUint32((UInt32)v.Count); for (int i = 0; i < v.Count; ++i) { stream.writeInt32(v[i]); } ; }
public FRIEND_LIST createFromStreamEx(MemoryStream stream) { UInt32 size = stream.readUint32(); FRIEND_LIST datas = new FRIEND_LIST(); while (size > 0) { --size; datas.Add(stream.readInt32()); } ; return(datas); }
public virtual void onFriendsChanged(FRIEND_LIST oldValue) { }