mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 21:57:45 +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)
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -179,6 +179,12 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
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)
|
||||
{
|
||||
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
|
||||
((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.
|
||||
if (errorResult != null)
|
||||
{
|
||||
owner.SendChant(0, 0);
|
||||
owner.DoBattleAction(spell.id, errorResult.animation, errorResult);
|
||||
errorResult = null;
|
||||
}
|
||||
|
@ -117,6 +119,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
|||
actions[i++] = action;
|
||||
}
|
||||
|
||||
owner.SendChant(0, 0);
|
||||
owner.DoBattleAction(spell.id, spell.battleAnimation, actions);
|
||||
}
|
||||
|
||||
|
@ -167,7 +170,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
|||
public override void Cleanup()
|
||||
{
|
||||
if (owner.currentSubState == SetActorStatePacket.SUB_STATE_PLAYER)
|
||||
{
|
||||
{
|
||||
((Player)owner).SendEndCastbar();
|
||||
}
|
||||
// command casting duration
|
||||
|
|
|
@ -1732,12 +1732,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
Server.GetWorldManager().NoMembersInParty((Party)currentParty);
|
||||
currentParty = null;
|
||||
}
|
||||
|
||||
public void Update(double delta)
|
||||
{
|
||||
LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", true, delta);
|
||||
}
|
||||
|
||||
|
||||
public void IssueChocobo(byte appearanceId, string nameResponse)
|
||||
{
|
||||
Database.IssuePlayerChocobo(this, appearanceId, nameResponse);
|
||||
|
@ -1751,6 +1746,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
Database.ChangePlayerChocoboAppearance(this, appearanceId);
|
||||
chocoboAppearance = appearanceId;
|
||||
}
|
||||
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
aiContainer.Update(tick);
|
||||
|
|
|
@ -30,9 +30,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
|||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
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)((wasteStat & 0xF) << 8));
|
||||
binWriter.Write((byte)((wasteStat & 0xF) << 4));
|
||||
binWriter.Write((byte)(statMode & 0xF));
|
||||
binWriter.Write((byte)0);
|
||||
binWriter.Write((UInt16)(idleAnimationId&0xFFFF));
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
|||
/// </summary>
|
||||
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.worldMasterTextId = worldMasterTextId;
|
||||
|
|
Loading…
Add table
Reference in a new issue