mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-25 06:07:46 +00:00
Fixed screwed up cast animation.
This commit is contained in:
parent
517bdc0638
commit
4c7928da78
6 changed files with 19 additions and 12 deletions
|
@ -433,7 +433,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
|
|
||||||
if ((updateFlags & ActorUpdateFlags.State) != 0)
|
if ((updateFlags & ActorUpdateFlags.State) != 0)
|
||||||
{
|
{
|
||||||
packets.Add(SetActorStatePacket.BuildPacket(actorId, currentMainState, currentSubState));
|
packets.Add(SetActorStatePacket.BuildPacket(actorId, currentMainState, currentSubState));
|
||||||
|
if (this is Character)
|
||||||
|
((Character)this).DoBattleAction(21001, 0x7C000062, new BattleAction(this.actorId, 0, 1, 0, 0, 1)); //Attack Mode
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFlags = ActorUpdateFlags.None;
|
updateFlags = ActorUpdateFlags.None;
|
||||||
|
|
|
@ -179,6 +179,12 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
zone.BroadcastPacketAroundActor(this, PlayAnimationOnActorPacket.BuildPacket(actorId, animId));
|
zone.BroadcastPacketAroundActor(this, PlayAnimationOnActorPacket.BuildPacket(actorId, animId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendChant(int left, int right)
|
||||||
|
{
|
||||||
|
SetActorSubStatPacket.BuildPacket(actorId, 0, left, right, 0, 0, 0, 0).DebugPrintSubPacket();
|
||||||
|
zone.BroadcastPacketAroundActor(this, SetActorSubStatPacket.BuildPacket(actorId, 0, left, right, 0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
public void DoBattleAction(ushort commandId, uint animationId)
|
public void DoBattleAction(ushort commandId, uint animationId)
|
||||||
{
|
{
|
||||||
zone.BroadcastPacketAroundActor(this, BattleActionX00Packet.BuildPacket(actorId, animationId, commandId));
|
zone.BroadcastPacketAroundActor(this, BattleActionX00Packet.BuildPacket(actorId, animationId, commandId));
|
||||||
|
|
|
@ -61,7 +61,8 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||||
{
|
{
|
||||||
// todo: modify spellSpeed based on modifiers and stuff
|
// todo: modify spellSpeed based on modifiers and stuff
|
||||||
((Player)owner).SendStartCastbar(spell.id, Utils.UnixTimeStampUTC(DateTime.Now.AddSeconds(spellSpeed)));
|
((Player)owner).SendStartCastbar(spell.id, Utils.UnixTimeStampUTC(DateTime.Now.AddSeconds(spellSpeed)));
|
||||||
owner.DoBattleAction(spell.id, 0x6F000002, new BattleAction(target.actorId, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM)
|
owner.SendChant(0xF, 0x0);
|
||||||
|
owner.DoBattleAction(spell.id, 0x6F000002, new BattleAction(target.actorId, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -97,6 +98,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||||
// todo: send paralyzed/sleep message etc.
|
// todo: send paralyzed/sleep message etc.
|
||||||
if (errorResult != null)
|
if (errorResult != null)
|
||||||
{
|
{
|
||||||
|
owner.SendChant(0, 0);
|
||||||
owner.DoBattleAction(spell.id, errorResult.animation, errorResult);
|
owner.DoBattleAction(spell.id, errorResult.animation, errorResult);
|
||||||
errorResult = null;
|
errorResult = null;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +119,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||||
actions[i++] = action;
|
actions[i++] = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
owner.SendChant(0, 0);
|
||||||
owner.DoBattleAction(spell.id, spell.battleAnimation, actions);
|
owner.DoBattleAction(spell.id, spell.battleAnimation, actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +170,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||||
public override void Cleanup()
|
public override void Cleanup()
|
||||||
{
|
{
|
||||||
if (owner.currentSubState == SetActorStatePacket.SUB_STATE_PLAYER)
|
if (owner.currentSubState == SetActorStatePacket.SUB_STATE_PLAYER)
|
||||||
{
|
{
|
||||||
((Player)owner).SendEndCastbar();
|
((Player)owner).SendEndCastbar();
|
||||||
}
|
}
|
||||||
// command casting duration
|
// command casting duration
|
||||||
|
|
|
@ -1732,12 +1732,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
Server.GetWorldManager().NoMembersInParty((Party)currentParty);
|
Server.GetWorldManager().NoMembersInParty((Party)currentParty);
|
||||||
currentParty = null;
|
currentParty = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update(double delta)
|
|
||||||
{
|
|
||||||
LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", true, delta);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void IssueChocobo(byte appearanceId, string nameResponse)
|
public void IssueChocobo(byte appearanceId, string nameResponse)
|
||||||
{
|
{
|
||||||
Database.IssuePlayerChocobo(this, appearanceId, nameResponse);
|
Database.IssuePlayerChocobo(this, appearanceId, nameResponse);
|
||||||
|
@ -1751,6 +1746,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
Database.ChangePlayerChocoboAppearance(this, appearanceId);
|
Database.ChangePlayerChocoboAppearance(this, appearanceId);
|
||||||
chocoboAppearance = appearanceId;
|
chocoboAppearance = appearanceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(DateTime tick)
|
public override void Update(DateTime tick)
|
||||||
{
|
{
|
||||||
aiContainer.Update(tick);
|
aiContainer.Update(tick);
|
||||||
|
|
|
@ -30,9 +30,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||||
{
|
{
|
||||||
binWriter.Write((byte)breakage);
|
binWriter.Write((byte)breakage);
|
||||||
binWriter.Write((byte)(((leftChant & 0xF) << 8) | (rightChant & 0xF)));
|
binWriter.Write((byte)(((leftChant & 0xF) << 4) | (rightChant & 0xF)));
|
||||||
binWriter.Write((byte)(guard & 0xF));
|
binWriter.Write((byte)(guard & 0xF));
|
||||||
binWriter.Write((byte)((wasteStat & 0xF) << 8));
|
binWriter.Write((byte)((wasteStat & 0xF) << 4));
|
||||||
binWriter.Write((byte)(statMode & 0xF));
|
binWriter.Write((byte)(statMode & 0xF));
|
||||||
binWriter.Write((byte)0);
|
binWriter.Write((byte)0);
|
||||||
binWriter.Write((UInt16)(idleAnimationId&0xFFFF));
|
binWriter.Write((UInt16)(idleAnimationId&0xFFFF));
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint animation;
|
public uint animation;
|
||||||
|
|
||||||
public BattleAction(uint targetId, ushort worldMasterTextId, uint effectId, ushort amount = 0, byte param = 0, byte unknown = 0)
|
public BattleAction(uint targetId, ushort worldMasterTextId, uint effectId, ushort amount = 0, byte param = 0, byte unknown = 1)
|
||||||
{
|
{
|
||||||
this.targetId = targetId;
|
this.targetId = targetId;
|
||||||
this.worldMasterTextId = worldMasterTextId;
|
this.worldMasterTextId = worldMasterTextId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue