Disabling a spells of all shots

Some time ago i helped someone with disabling shot spells. So, the next code it’s more elegant solution than my previous guide. Example of course will for aCis but adapt for any other pack not a problem, i guess.

For broadcasting all shot spells except soulshot uses broadcastPacketInRadius method into Creature.java. So, then we changing him.

Next one step we add fix for soulshot spells broadcasting via broadcastPacket() method.

Next one step we add return methods for some fields in Attack packet. Don’t forget change field INT to Creature for storing attaker as object, and not object ID. And add changes into constuct method also.

Next one step add method inside MagicSkillUse packet for getting skill id of sendable skill.

Next one step add into SkillTable array with shot’s skill IDs and method for checking them.

Next one step is addition trigger option for store player configuration as i’m uses (player.getGameSettings().isBlockedShotEffect()). I uses separated GameSetting instance for all player’s settings. You can make directly the new field inside Player.java and use like player.isBlockedShotEffect().

That’s all what you need. This code disable all spells (SoulShot, SpritShot, Blessed SpiritShot, Beats Shot, Fishing Shot) from other objects except your spells. If you need add own servitor spell seeing then just add new return method in MagicSkillUse for get caster Object ID and then him with your servitor object ID.

Добавить комментарий

Ваш адрес email не будет опубликован.