Author Topic: GetItemStackSize & Projectile Ammunition  (Read 1838 times)

Legacy_JediMindTrix

  • Sr. Member
  • ****
  • Posts: 383
  • Karma: +0/-0
GetItemStackSize & Projectile Ammunition
« Reply #15 on: June 01, 2016, 11:43:45 pm »


               


Thats weird, I know for a fact it does run for throwing weapons. I wasn't dealing with ammo, but it should work as well.


 


Here the code from CPP to fix the automatic unarmed attack:



     //1.71: fix for automatic unarmed attack when stack of throwing weapons gets destroyed
     if(!GetIsObjectValid(oItem) && oItem != OBJECT_INVALID && GetAttackTarget(oPC) != OBJECT_INVALID && GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC) == OBJECT_INVALID)
     {
         AssignCommand(oPC,ClearAllActions());
     }

this is in unacquire




I was also able to reproduce that behavior with throwing weapons, darts specifically. Thanks for digging that code up btw.