예제 #1
0
 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);
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 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);
     }
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
        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);
            }
        }
예제 #6
0
 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);
     }
 }
예제 #7
0
		public virtual void SendKeepComponentInteract(IGameKeepComponent component)
		{
		}
예제 #8
0
		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);
			}
		}
예제 #9
0
		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);
			}
		}
예제 #10
0
		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);
			}
		}
예제 #11
0
 public void SendKeepComponentInteract(IGameKeepComponent component)
 {
 }
예제 #12
0
 public void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent)
 {
 }
예제 #13
0
		public void SendKeepComponentRemove(IGameKeepComponent keepComponent)
		{
			if (SendKeepComponentRemoveMethod != null) SendKeepComponentRemoveMethod(this, keepComponent);
		}
예제 #14
0
		public void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent)
		{
			if (SendKeepComponentDetailUpdateMethod != null) SendKeepComponentDetailUpdateMethod(this, keepComponent);
		}
예제 #15
0
		public void SendKeepComponentInfo(IGameKeepComponent keepComponent)
		{
			if (SendKeepComponentInfoMethod != null) SendKeepComponentInfoMethod(this, keepComponent);
		}
예제 #16
0
		public virtual void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex)
		{
		}
예제 #17
0
 public void SendKeepComponentInfo(IGameKeepComponent keepComponent)
 {
 }
예제 #18
0
		public void SendKeepComponentInteract(IGameKeepComponent component)
		{
			if (SendKeepComponentInteractMethod != null) SendKeepComponentInteractMethod(this, component);
		}
예제 #19
0
 public void SendKeepComponentRemove(IGameKeepComponent keepComponent)
 {
 }
예제 #20
0
		public void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex)
		{
			if (SendClearKeepComponentHookPointMethod != null) SendClearKeepComponentHookPointMethod(this, component, selectedHookPointIndex);
		}
예제 #21
0
 public void SendClearKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex)
 {
 }
예제 #22
0
		public void SendKeepComponentHookPoint(IGameKeepComponent component, int selectedHookPointIndex) { }
예제 #23
0
		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);
			}
		}
예제 #24
0
		public virtual void SendKeepComponentInfo(IGameKeepComponent keepComponent)
		{
		}
예제 #25
0
		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);
			}
		}
예제 #26
0
		public virtual void SendKeepComponentDetailUpdate(IGameKeepComponent keepComponent)
		{
		}
예제 #27
0
		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);
			}
		}
예제 #28
0
		public virtual void SendKeepComponentRemove(IGameKeepComponent keepComponent)
		{
		}