public void addToStreamEx(Bundle stream, EQUIP_DICT v) { stream.writeInt32(v.head); stream.writeInt32(v.clothes); stream.writeInt32(v.hand); stream.writeInt32(v.shoe); stream.writeInt32(v.bag); }
public EQUIP_DICT createFromStreamEx(MemoryStream stream) { EQUIP_DICT datas = new EQUIP_DICT(); datas.head = stream.readInt32(); datas.clothes = stream.readInt32(); datas.hand = stream.readInt32(); datas.shoe = stream.readInt32(); datas.bag = stream.readInt32(); return(datas); }
public override void callPropertysSetMethods() { ScriptModule sm = EntityDef.moduledefs["Account"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; ITEM_LIST oldval_bagItemList = bagItemList; Property prop_bagItemList = pdatas[4]; if (prop_bagItemList.isBase()) { if (inited && !inWorld) { onBagItemListChanged(oldval_bagItemList); } } else { if (inWorld) { if (prop_bagItemList.isOwnerOnly() && !isPlayer()) { } else { onBagItemListChanged(oldval_bagItemList); } } } EQUIP_DICT oldval_currentItemDict = currentItemDict; Property prop_currentItemDict = pdatas[5]; if (prop_currentItemDict.isBase()) { if (inited && !inWorld) { onCurrentItemDictChanged(oldval_currentItemDict); } } else { if (inWorld) { if (prop_currentItemDict.isOwnerOnly() && !isPlayer()) { } else { onCurrentItemDictChanged(oldval_currentItemDict); } } } Vector3 oldval_direction = direction; Property prop_direction = pdatas[2]; if (prop_direction.isBase()) { if (inited && !inWorld) { onDirectionChanged(oldval_direction); } } else { if (inWorld) { if (prop_direction.isOwnerOnly() && !isPlayer()) { } else { onDirectionChanged(oldval_direction); } } } Int32 oldval_gold = gold; Property prop_gold = pdatas[6]; if (prop_gold.isBase()) { if (inited && !inWorld) { onGoldChanged(oldval_gold); } } else { if (inWorld) { if (prop_gold.isOwnerOnly() && !isPlayer()) { } else { onGoldChanged(oldval_gold); } } } SByte oldval_lastLoginDate = lastLoginDate; Property prop_lastLoginDate = pdatas[7]; if (prop_lastLoginDate.isBase()) { if (inited && !inWorld) { onLastLoginDateChanged(oldval_lastLoginDate); } } else { if (inWorld) { if (prop_lastLoginDate.isOwnerOnly() && !isPlayer()) { } else { onLastLoginDateChanged(oldval_lastLoginDate); } } } Int16 oldval_lastLoginDayLoginTimes = lastLoginDayLoginTimes; Property prop_lastLoginDayLoginTimes = pdatas[8]; if (prop_lastLoginDayLoginTimes.isBase()) { if (inited && !inWorld) { onLastLoginDayLoginTimesChanged(oldval_lastLoginDayLoginTimes); } } else { if (inWorld) { if (prop_lastLoginDayLoginTimes.isOwnerOnly() && !isPlayer()) { } else { onLastLoginDayLoginTimesChanged(oldval_lastLoginDayLoginTimes); } } } Int16 oldval_lastLoginDayPlayTime = lastLoginDayPlayTime; Property prop_lastLoginDayPlayTime = pdatas[9]; if (prop_lastLoginDayPlayTime.isBase()) { if (inited && !inWorld) { onLastLoginDayPlayTimeChanged(oldval_lastLoginDayPlayTime); } } else { if (inWorld) { if (prop_lastLoginDayPlayTime.isOwnerOnly() && !isPlayer()) { } else { onLastLoginDayPlayTimeChanged(oldval_lastLoginDayPlayTime); } } } string oldval_nameS = nameS; Property prop_nameS = pdatas[10]; if (prop_nameS.isBase()) { if (inited && !inWorld) { onNameSChanged(oldval_nameS); } } else { if (inWorld) { if (prop_nameS.isOwnerOnly() && !isPlayer()) { } else { onNameSChanged(oldval_nameS); } } } Vector3 oldval_position = position; Property prop_position = pdatas[1]; if (prop_position.isBase()) { if (inited && !inWorld) { onPositionChanged(oldval_position); } } else { if (inWorld) { if (prop_position.isOwnerOnly() && !isPlayer()) { } else { onPositionChanged(oldval_position); } } } Int32 oldval_progress = progress; Property prop_progress = pdatas[11]; if (prop_progress.isBase()) { if (inited && !inWorld) { onProgressChanged(oldval_progress); } } else { if (inWorld) { if (prop_progress.isOwnerOnly() && !isPlayer()) { } else { onProgressChanged(oldval_progress); } } } Int32 oldval_roomNo = roomNo; Property prop_roomNo = pdatas[12]; if (prop_roomNo.isBase()) { if (inited && !inWorld) { onRoomNoChanged(oldval_roomNo); } } else { if (inWorld) { if (prop_roomNo.isOwnerOnly() && !isPlayer()) { } else { onRoomNoChanged(oldval_roomNo); } } } Int16 oldval_totalLoginTimes = totalLoginTimes; Property prop_totalLoginTimes = pdatas[13]; if (prop_totalLoginTimes.isBase()) { if (inited && !inWorld) { onTotalLoginTimesChanged(oldval_totalLoginTimes); } } else { if (inWorld) { if (prop_totalLoginTimes.isOwnerOnly() && !isPlayer()) { } else { onTotalLoginTimesChanged(oldval_totalLoginTimes); } } } Int16 oldval_totalPlayTime = totalPlayTime; Property prop_totalPlayTime = pdatas[14]; if (prop_totalPlayTime.isBase()) { if (inited && !inWorld) { onTotalPlayTimeChanged(oldval_totalPlayTime); } } else { if (inWorld) { if (prop_totalPlayTime.isOwnerOnly() && !isPlayer()) { } else { onTotalPlayTimeChanged(oldval_totalPlayTime); } } } }
public virtual void onCurrentItemDictChanged(EQUIP_DICT oldValue) { }
public override void onUpdatePropertys(MemoryStream stream) { ScriptModule sm = EntityDef.moduledefs["Account"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; while (stream.length() > 0) { UInt16 _t_utype = 0; UInt16 _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; if (_t_utype == 0) { prop = pdatas[_t_child_utype]; } else { Property pComponentPropertyDescription = pdatas[_t_utype]; switch (pComponentPropertyDescription.properUtype) { default: break; } return; } switch (prop.properUtype) { case 16: ITEM_LIST oldval_bagItemList = bagItemList; bagItemList = ((DATATYPE_ITEM_LIST)EntityDef.id2datatypes[23]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onBagItemListChanged(oldval_bagItemList); } } else { if (inWorld) { onBagItemListChanged(oldval_bagItemList); } } break; case 17: EQUIP_DICT oldval_currentItemDict = currentItemDict; currentItemDict = ((DATATYPE_EQUIP_DICT)EntityDef.id2datatypes[24]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onCurrentItemDictChanged(oldval_currentItemDict); } } else { if (inWorld) { onCurrentItemDictChanged(oldval_currentItemDict); } } break; case 40001: Vector3 oldval_direction = direction; direction = stream.readVector3(); if (prop.isBase()) { if (inited) { onDirectionChanged(oldval_direction); } } else { if (inWorld) { onDirectionChanged(oldval_direction); } } break; case 8: Int32 oldval_gold = gold; gold = stream.readInt32(); if (prop.isBase()) { if (inited) { onGoldChanged(oldval_gold); } } else { if (inWorld) { onGoldChanged(oldval_gold); } } break; case 3: SByte oldval_lastLoginDate = lastLoginDate; lastLoginDate = stream.readInt8(); if (prop.isBase()) { if (inited) { onLastLoginDateChanged(oldval_lastLoginDate); } } else { if (inWorld) { onLastLoginDateChanged(oldval_lastLoginDate); } } break; case 7: Int16 oldval_lastLoginDayLoginTimes = lastLoginDayLoginTimes; lastLoginDayLoginTimes = stream.readInt16(); if (prop.isBase()) { if (inited) { onLastLoginDayLoginTimesChanged(oldval_lastLoginDayLoginTimes); } } else { if (inWorld) { onLastLoginDayLoginTimesChanged(oldval_lastLoginDayLoginTimes); } } break; case 5: Int16 oldval_lastLoginDayPlayTime = lastLoginDayPlayTime; lastLoginDayPlayTime = stream.readInt16(); if (prop.isBase()) { if (inited) { onLastLoginDayPlayTimeChanged(oldval_lastLoginDayPlayTime); } } else { if (inWorld) { onLastLoginDayPlayTimeChanged(oldval_lastLoginDayPlayTime); } } break; case 2: string oldval_nameS = nameS; nameS = stream.readUnicode(); if (prop.isBase()) { if (inited) { onNameSChanged(oldval_nameS); } } else { if (inWorld) { onNameSChanged(oldval_nameS); } } break; case 40000: Vector3 oldval_position = position; position = stream.readVector3(); if (prop.isBase()) { if (inited) { onPositionChanged(oldval_position); } } else { if (inWorld) { onPositionChanged(oldval_position); } } break; case 13: Int32 oldval_progress = progress; progress = stream.readInt32(); if (prop.isBase()) { if (inited) { onProgressChanged(oldval_progress); } } else { if (inWorld) { onProgressChanged(oldval_progress); } } break; case 15: Int32 oldval_roomNo = roomNo; roomNo = stream.readInt32(); if (prop.isBase()) { if (inited) { onRoomNoChanged(oldval_roomNo); } } else { if (inWorld) { onRoomNoChanged(oldval_roomNo); } } break; case 40002: stream.readUint32(); break; case 6: Int16 oldval_totalLoginTimes = totalLoginTimes; totalLoginTimes = stream.readInt16(); if (prop.isBase()) { if (inited) { onTotalLoginTimesChanged(oldval_totalLoginTimes); } } else { if (inWorld) { onTotalLoginTimesChanged(oldval_totalLoginTimes); } } break; case 4: Int16 oldval_totalPlayTime = totalPlayTime; totalPlayTime = stream.readInt16(); if (prop.isBase()) { if (inited) { onTotalPlayTimeChanged(oldval_totalPlayTime); } } else { if (inWorld) { onTotalPlayTimeChanged(oldval_totalPlayTime); } } break; default: break; } ; } }