Rezlind Posted December 9, 2021 Posted December 9, 2021 Hey all, Currently trying to remove the little damage number that appears when using MsgMagicEffect - at the moment I'm still seeing the number despite sending 0 at the correct offset to hide damage numbers on the effect:public MsgMagicEffect(AdvancedEntity aAttacker, AdvancedEntity aTarget, Int32 aDamage, UInt16 aPosX, UInt16 aPosY, Boolean showDamage) // showDamage is unused as I was testing it : base(32) { Magic.Info info = Database.AllMagics[(aAttacker.MagicType * 10) + aAttacker.MagicLevel]; PlayerId = aAttacker.UniqId; if (info.Sort == MagicSort.AttackSingleHP) TargetId = aTarget.UniqId; else { PosX = aPosX; PosY = aPosY; } Type = aAttacker.MagicType; Level = aAttacker.MagicLevel; WriteInt32(16, 1); // Count WriteInt32(20, aTarget.UniqId); // //UniqId WriteInt32(24, aDamage); // //Data WriteInt32(28, 0); // Show <--- Setting this to zero or one should manipulate whether the damage numbers are shown. Console.WriteLine(PacketDump.Hex(mBuf)); }As a reference point I've used Felipe's World Conquer based on Spirited's Comet source to learn more about the MsgMagicEffect packet structure. That snippet is below.public override byte[] Encode() { var writer = new PacketWriter(); writer.Write((ushort)Type); // 2 writer.Write(AttackerIdentity); // 4 writer.Write(MapX);// 8 writer.Write(MapY);// 10 writer.Write(MagicIdentity); //12 writer.Write(MagicLevel); // 14 writer.Write((uint) Count);// 16 foreach (var target in Targets) // 12 each { writer.Write(target.Identity); //offset+0 writer.Write(target.Damage); // offset+4 writer.Write(target.Show); // offset+8 } return writer.ToArray(); } private struct MagicTarget { public uint Identity; public int Damage; public int Show; }I confirmed that the packet going out is in fact zeroed out where it should be but the client is not respecting the zero. Does anyone know if there is another trick to this that I am unaware of? Quote
Relic Posted December 9, 2021 Posted December 9, 2021 As far as I can tell, that offset isn't used to show/hide the damage number. I don't think it's possible to do so via the MsgMagicEffect packet. Looking at the MsgMagicEffect.Process function in ghidra, these are the only 2 places where that offset is referenced:As you can see, it's only being used by ToxicFog and PoisonStar spells. Quote
Rezlind Posted December 10, 2021 Author Posted December 10, 2021 As far as I can tell, that offset isn't used to show/hide the damage number. I don't think it's possible to do so via the MsgMagicEffect packet. Looking at the MsgMagicEffect.Process function in ghidra, these are the only 2 places where that offset is referenced:As you can see, it's only being used by ToxicFog and PoisonStar spells.Ah thanks Relic, I'll defer to ghidraing the client before posting in the future. Thanks for your help! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.