Jump to content

Hook WeaponHit in IsoThumpable.java


Bambino

Recommended Posts

Please add a hook to WeaponHit in IsoThumpable.java.

 

Something like this:

   public void WeaponHit(IsoGameCharacter var1, HandWeapon var2) {
    IsoPlayer var3 = (IsoPlayer)Type.tryCastTo(var1, IsoPlayer.class);
    Thumpable var4 = this.getThumpableFor(var1);
    if (LuaHookManager.TriggerHook("WeaponHitObject", var1, var2, var4)) 
    {
      
      if (GameClient.bClient) {
         if (var3 != null) {
            GameClient.instance.sendWeaponHit(var3, var2, this);
         }


         if (this.isDoor()) {
            this.setRenderEffect(RenderEffectType.Hit_Door, true);
         }

      } else {
         //Thumpable var4 = this.getThumpableFor(var1);
         if (var4 != null) {
...

This will allow modders to determine if a specific thumpable can be attacked. Perhaps you want players to only be able to attack particular objects with particular weapons.  Perhaps you want a specific skill requirement before a player can attack a particular thumpable.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...