/// <summary> /// Make sure, we have a valid target before calling this method /// </summary> public static void SendCombatStart(Unit chr, Unit opponent, bool includeSelf) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_ATTACKSTART, 16)) { chr.EntityId.WritePacked(packet); opponent.EntityId.WritePacked(packet); chr.PushPacketToSurroundingArea(packet, includeSelf, false); } }
/// <summary> /// Make sure, we have a valid target before calling this method /// </summary> public static void SendCombatStop(Unit chr, Unit opponent, bool includeSelf) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_ATTACKSTOP, 20)) { chr.EntityId.WritePacked(packet); if (opponent != null) opponent.EntityId.WritePacked(packet); packet.Write(0); chr.PushPacketToSurroundingArea(packet, includeSelf, false); } }