Skip to content

Commit 339c1c0

Browse files
committed
Day-to-day backup
1 parent caa6d6f commit 339c1c0

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

ArcheAge/ArcheAge/Network/DelegateList.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,26 @@ private static void OnPacketReceive_0x01_NP_CSMoveUnitPacket_0x0088(ClientConnec
275275
//net.SendAsync(new NP_SCUnitMovementsPacket_0x0066(net));
276276

277277
//MoveUnit
278-
279-
String move = Utility.ByteArrayToString(reader.Buffer);
278+
float distance = 150;
279+
string move = Utility.ByteArrayToString(reader.Buffer);
280280
move = move.Substring(7*2,move.Length-7*2-2);
281281
foreach (KeyValuePair<int, Account> account in ClientConnection.CurrentAccounts)
282282
{
283283
//If role is not online, it will not be sent.
284-
if (account.Value.Character != null)
284+
//todo 判断是否在自己 XX 米内 否则不通知
285+
if (account.Value.Character != null
286+
&&
287+
(Math.Abs(account.Value.Character.Position.X-x)<distance && Math.Abs(account.Value.Character.Position.Y-y)<distance))
285288
{
286289
account.Value.Connection.SendAsync(new NP_SCUnitMovementsPacket_0x0066(net, move));
287290
}
288291

289292
}
290-
291-
// 根据条件判断是否加载NPC 50m 距离
292-
if(net.CurrentAccount.Character.LastLoadedNPC.X-x>50|| net.CurrentAccount.Character.LastLoadedNPC.X - x < -50
293+
float movement = 50;
294+
// 根据条件判断是否加载NPC 移动 50m 距离
295+
if (Math.Abs(net.CurrentAccount.Character.LastLoadedNPC.X-x)> movement
293296
||
294-
net.CurrentAccount.Character.LastLoadedNPC.Y - y > 50 || net.CurrentAccount.Character.LastLoadedNPC.Y - y < -50)
297+
Math.Abs(net.CurrentAccount.Character.LastLoadedNPC.Y - y) > movement)
295298
{
296299
//return;//Debug off, if necessary, please open. 2018年11月18日 19点19分
297300
//todo 待完成 2018年11月16日

ArcheAge/ArcheAge/Network/Packets/Server/NP_SCUnitStatePacket_0x0064_debug.cs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,37 @@ public NP_SCUnitStatePacket_0x0064_debug(List<NPC> list) : base(04, 0x0009)
8282
//未知
8383
//ns.WriteHex("02B0A473020200000000000000000000");
8484
//HP 1.00
85-
ns.Write(100*100);
85+
ns.Write(0);
8686
//MP
87-
ns.Write(100*100);
87+
ns.Write(0);
8888
//
8989
ns.WriteHex("FFFF");
9090
//姿势 NPC独有 怪兽没有
9191
ns.Write((short)0x04);//len
92-
ns.WriteHex("3E000000");
92+
ns.Write(0x3e);//3E000000 3D000000
9393
//姿势 动作
94-
ns.Write((byte)0x01);//len
95-
ns.Write((byte)0x0);
94+
ns.Write((short)0x01);//len
95+
//ns.Write((byte)0x0);
9696

9797
//
9898
//ns.Write((short)0x0201);
99-
ns.WriteHex("010200000001000000000000");
99+
ns.Write((byte)0x01);
100+
ns.Write(0x02);
101+
ns.WriteHex("010000");
100102

101-
//rot
102-
ns.Write((byte)0xB0);
103+
//rot.x guess
104+
ns.Write((short)0x0);
105+
//rot.y guess
106+
ns.Write((short)0x0);
107+
//rot.z confirm
108+
ns.Write((short)0xB0);
103109

104110
//
105-
ns.WriteHex("000800A66201000000");
106-
//factionID
107-
ns.Write(npc.FactionId);
111+
ns.WriteHex("0800A662" +
112+
"01000000");
113+
//factionID confirm
114+
//ns.Write(npc.FactionId);
115+
ns.Write(0x65);
108116

109117
ns.WriteHex("0000000000000000");
110118

Release/AAEMU-Launcher/data.db

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)