public override void SendKeepComponentInfo(IGameKeepComponent keepComponent) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentInfo))) { pak.WriteShort((ushort)keepComponent.Keep.KeepID); pak.WriteShort((ushort)keepComponent.ID); pak.WriteInt((uint)keepComponent.ObjectID); pak.WriteByte((byte)keepComponent.Skin); pak.WriteByte((byte)(keepComponent.ComponentX)); //relative to keep pak.WriteByte((byte)(keepComponent.ComponentY)); //relative to keep pak.WriteByte((byte)keepComponent.ComponentHeading); pak.WriteByte((byte)keepComponent.Height); pak.WriteByte(keepComponent.HealthPercent); byte flag = keepComponent.Status; if (keepComponent.IsRaized) // Only for towers { flag |= 0x04; } if (flag == 0x00 && keepComponent.Climbing) { flag = 0x02; } pak.WriteByte(flag); pak.WriteByte(0x00); //unk SendTCP(pak); } }
public override void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentDetailUpdate))) { pak.WriteShort((ushort)keepComponent.Keep.KeepID); pak.WriteShort((ushort)keepComponent.ID); pak.WriteByte((byte)keepComponent.Height); pak.WriteByte(keepComponent.HealthPercent); byte flag = keepComponent.Status; if (keepComponent.IsRaized) // Only for towers { flag |= 0x04; } if (flag == 0x00 && keepComponent.Climbing) { flag = 0x02; } pak.WriteByte(flag); pak.WriteByte(0x00); //unk SendTCP(pak); } }
public override void SendKeepComponentRemove(IGameKeepComponent keepComponent) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentRemove))) { pak.WriteShort((ushort)keepComponent.Keep.KeepID); pak.WriteShort((ushort)keepComponent.ID); SendTCP(pak); } }
public override void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentHookpointUpdate))) { pak.WriteShort((ushort)component.Keep.KeepID); pak.WriteShort((ushort)component.ID); pak.WriteByte((byte)0); pak.WriteByte((byte)selectedHookPointIndex); SendTCP(pak); } }
public override void SendKeepComponentInteract(IGameKeepComponent component) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentInteractResponse))) { pak.WriteShort((ushort)component.Keep.KeepID); pak.WriteByte((byte)component.Keep.Realm); pak.WriteByte(component.HealthPercent); pak.WriteByte(component.Keep.EffectiveLevel(component.Keep.Level)); pak.WriteByte(component.Keep.EffectiveLevel((byte)ServerProperties.Properties.MAX_KEEP_LEVEL)); //guild pak.WriteByte((byte)1); //Keep Type: always melee here, type is no longer used if (component.Keep.Guild != null) { pak.WriteString(component.Keep.Guild.Name); } pak.WriteByte(0); SendTCP(pak); } }
public override void SendKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentHookpointUpdate))) { pak.WriteShort((ushort)component.Keep.KeepID); pak.WriteShort((ushort)component.ID); ArrayList freeHookpoints = new ArrayList(); foreach (GameKeepHookPoint hookPt in component.HookPoints.Values) { if (hookPt.IsFree) { freeHookpoints.Add(hookPt); } } pak.WriteByte((byte)freeHookpoints.Count); pak.WriteByte((byte)selectedHookPointIndex); foreach (GameKeepHookPoint hookPt in freeHookpoints) //have to sort by index? { pak.WriteByte((byte)hookPt.ID); } SendTCP(pak); } }
public virtual void SendKeepComponentInteract(IGameKeepComponent component) { }
public override void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentDetailUpdate))) { pak.WriteShort((ushort)keepComponent.Keep.KeepID); pak.WriteShort((ushort)keepComponent.ID); pak.WriteByte((byte)keepComponent.Height); pak.WriteByte(keepComponent.HealthPercent); byte flag = keepComponent.Status; if (keepComponent.IsRaized) // Only for towers flag |= 0x04; if (flag == 0x00 && keepComponent.Climbing) flag = 0x02; pak.WriteByte(flag); pak.WriteByte(0x00);//unk SendTCP(pak); } }
public void SendKeepComponentInteract(IGameKeepComponent component) { }
public void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent) { }
public void SendKeepComponentRemove(IGameKeepComponent keepComponent) { if (SendKeepComponentRemoveMethod != null) SendKeepComponentRemoveMethod(this, keepComponent); }
public void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent) { if (SendKeepComponentDetailUpdateMethod != null) SendKeepComponentDetailUpdateMethod(this, keepComponent); }
public void SendKeepComponentInfo(IGameKeepComponent keepComponent) { if (SendKeepComponentInfoMethod != null) SendKeepComponentInfoMethod(this, keepComponent); }
public virtual void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { }
public void SendKeepComponentInfo(IGameKeepComponent keepComponent) { }
public void SendKeepComponentInteract(IGameKeepComponent component) { if (SendKeepComponentInteractMethod != null) SendKeepComponentInteractMethod(this, component); }
public void SendKeepComponentRemove(IGameKeepComponent keepComponent) { }
public void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { if (SendClearKeepComponentHookPointMethod != null) SendClearKeepComponentHookPointMethod(this, component, selectedHookPointIndex); }
public void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { }
public void SendKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { }
public virtual void SendKeepComponentInfo(IGameKeepComponent keepComponent) { }
public override void SendKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentHookpointUpdate))) { pak.WriteShort((ushort)component.Keep.KeepID); pak.WriteShort((ushort)component.ID); ArrayList freeHookpoints = new ArrayList(); foreach (GameKeepHookPoint hookPt in component.HookPoints.Values) { if (hookPt.IsFree) freeHookpoints.Add(hookPt); } pak.WriteByte((byte)freeHookpoints.Count); pak.WriteByte((byte)selectedHookPointIndex); foreach (GameKeepHookPoint hookPt in freeHookpoints)//have to sort by index? { pak.WriteByte((byte)hookPt.ID); } SendTCP(pak); } }
public virtual void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent) { }
public override void SendKeepComponentInfo(IGameKeepComponent keepComponent) { using (GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.KeepComponentInfo))) { pak.WriteShort((ushort)keepComponent.Keep.KeepID); pak.WriteShort((ushort)keepComponent.ID); pak.WriteInt((uint)keepComponent.ObjectID); pak.WriteByte((byte)keepComponent.Skin); pak.WriteByte((byte)(keepComponent.ComponentX));//relative to keep pak.WriteByte((byte)(keepComponent.ComponentY));//relative to keep pak.WriteByte((byte)keepComponent.ComponentHeading); pak.WriteByte((byte)keepComponent.Height); pak.WriteByte(keepComponent.HealthPercent); byte flag = keepComponent.Status; if (keepComponent.IsRaized) // Only for towers flag |= 0x04; if (flag == 0x00 && keepComponent.Climbing) flag = 0x02; pak.WriteByte(flag); pak.WriteByte(0x00); //unk SendTCP(pak); } }
public virtual void SendKeepComponentRemove(IGameKeepComponent keepComponent) { }