mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 14:34:32 +02:00
Merge branch 'ai-open' into develop
# Conflicts: # FFXIVClassic Lobby Server/Database.cs # FFXIVClassic Map Server/Database.cs # FFXIVClassic Map Server/FFXIVClassic Map Server.csproj # FFXIVClassic Map Server/actors/chara/player/Inventory.cs # FFXIVClassic Map Server/actors/chara/player/Player.cs # FFXIVClassic Map Server/dataobjects/Session.cs # FFXIVClassic World Server/Server.cs
This commit is contained in:
commit
1e4a1cf263
402 changed files with 20078 additions and 1348 deletions
|
@ -481,7 +481,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public readonly short craftMagicProcessing;
|
||||
public readonly short harvestPotency;
|
||||
public readonly short harvestLimit;
|
||||
public readonly byte frequency;
|
||||
public readonly byte frequency; // hit count, 2 for h2h weapons
|
||||
public readonly short rate;
|
||||
public readonly short magicRate;
|
||||
public readonly short craftProcessControl;
|
||||
|
@ -490,7 +490,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public readonly short magicCritical;
|
||||
public readonly short parry;
|
||||
|
||||
public readonly int damageAttributeType1;
|
||||
public readonly int damageAttributeType1; // 1 slashing, 2 piercing, 3 blunt, 4 projectile
|
||||
public readonly float damageAttributeValue1;
|
||||
public readonly int damageAttributeType2;
|
||||
public readonly float damageAttributeValue2;
|
||||
|
@ -500,6 +500,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public readonly short damagePower;
|
||||
public readonly float damageInterval;
|
||||
public readonly short ammoVirtualDamagePower;
|
||||
public readonly float dps;
|
||||
|
||||
public WeaponItem(MySqlDataReader reader)
|
||||
: base(reader)
|
||||
|
@ -536,6 +537,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
damagePower = reader.GetInt16("damagePower");
|
||||
damageInterval = reader.GetFloat("damageInterval");
|
||||
ammoVirtualDamagePower = reader.GetInt16("ammoVirtualDamagePower");
|
||||
dps = (damagePower + ammoVirtualDamagePower) / damageInterval;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
using FFXIVClassic_Map_Server;
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic.Common;
|
||||
|
||||
using FFXIVClassic_Map_Server.Actors;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FFXIVClassic_Map_Server.actors.chara.npc;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.dataobjects
|
||||
|
@ -70,21 +64,26 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
if (isUpdatesLocked)
|
||||
return;
|
||||
|
||||
if (playerActor.positionX == x && playerActor.positionY == y && playerActor.positionZ == z && playerActor.rotation == rot)
|
||||
return;
|
||||
|
||||
/*
|
||||
playerActor.oldPositionX = playerActor.positionX;
|
||||
playerActor.oldPositionY = playerActor.positionY;
|
||||
playerActor.oldPositionZ = playerActor.positionZ;
|
||||
playerActor.oldRotation = playerActor.rotation;
|
||||
|
||||
|
||||
playerActor.positionX = x;
|
||||
playerActor.positionY = y;
|
||||
playerActor.positionZ = z;
|
||||
*/
|
||||
playerActor.rotation = rot;
|
||||
playerActor.moveState = moveState;
|
||||
|
||||
GetActor().GetZone().UpdateActorPosition(GetActor());
|
||||
|
||||
//GetActor().GetZone().UpdateActorPosition(GetActor());
|
||||
playerActor.QueuePositionUpdate(new Vector3(x,y,z));
|
||||
}
|
||||
long lastMilis = 0;
|
||||
|
||||
public void UpdateInstance(List<Actor> list)
|
||||
{
|
||||
if (isUpdatesLocked)
|
||||
|
@ -107,7 +106,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
{
|
||||
QueuePacket(RemoveActorPacket.BuildPacket(actorInstanceList[i].actorId));
|
||||
actorInstanceList.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Retainer Instance
|
||||
|
@ -132,15 +131,11 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
if (actorInstanceList.Contains(actor))
|
||||
{
|
||||
//Don't send for static characters (npcs)
|
||||
if (actor is Character && ((Character)actor).isStatic)
|
||||
continue;
|
||||
|
||||
QueuePacket(actor.CreatePositionUpdatePacket());
|
||||
}
|
||||
else
|
||||
{
|
||||
QueuePacket(actor.GetSpawnPackets(playerActor, 1));
|
||||
QueuePacket(actor.GetSpawnPackets(playerActor, 1));
|
||||
|
||||
QueuePacket(actor.GetInitPackets());
|
||||
QueuePacket(actor.GetSetEventStatusPackets());
|
||||
|
|
|
@ -19,12 +19,15 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
public void QueuePacket(SubPacket subpacket)
|
||||
{
|
||||
if(SendPacketQueue.Count == 1000)
|
||||
FlushQueuedSendPackets();
|
||||
|
||||
SendPacketQueue.Add(subpacket);
|
||||
}
|
||||
|
||||
public void FlushQueuedSendPackets()
|
||||
{
|
||||
if (!socket.Connected)
|
||||
if (socket == null || !socket.Connected)
|
||||
return;
|
||||
|
||||
while (SendPacketQueue.Count > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue