Example #1
0
 public override void OnEvent(RockThrowerResetAmmo evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren <rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.resetBasketAmmo();
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren <MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.resetBasketAmmo();
         }
     }
 }
Example #2
0
 public override void OnEvent(RockThrowerRemoveItem evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren <rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.loadItemIntoBasket(evnt.ContentType);
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren <MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.loadItemIntoBasket(evnt.ContentType);
             return;
         }
     }
 }
Example #3
0
 public override void OnEvent(ItemHolderAddItem evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren <rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.AddItemMP(evnt.ContentType);
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren <MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.AddItemMP(evnt.ContentType);
             return;
         }
         LogHolder componentInChildren3 = evnt.Target.GetComponentInChildren <LogHolder>();
         if (componentInChildren3)
         {
             componentInChildren3.AddItemMP(evnt.RaisedBy);
         }
         else
         {
             ItemHolder componentInChildren4 = evnt.Target.GetComponentInChildren <ItemHolder>();
             if (componentInChildren4)
             {
                 componentInChildren4.AddItemMP();
             }
             else
             {
                 MultiHolder[] componentsInChildren = evnt.Target.GetComponentsInChildren <MultiHolder>(true);
                 if (componentsInChildren.Length > 0)
                 {
                     componentsInChildren[0].AddItemMP((MultiHolder.ContentTypes)evnt.ContentType, evnt.RaisedBy);
                 }
             }
         }
     }
 }
Example #4
0
 public override void OnEvent(ItemHolderTakeItem evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren <rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.TakeItemMP(evnt.Player, evnt.ContentType);
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren <MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.TakeItemMP(evnt.Player, evnt.ContentType);
             return;
         }
         LogHolder componentInChildren3 = evnt.Target.GetComponentInChildren <LogHolder>();
         if (componentInChildren3)
         {
             componentInChildren3.TakeItemMP(evnt.Player);
             return;
         }
         ItemHolder componentInChildren4 = evnt.Target.GetComponentInChildren <ItemHolder>();
         if (componentInChildren4)
         {
             componentInChildren4.TakeItemMP(evnt.Player);
             return;
         }
         MultiHolder[] componentsInChildren = evnt.Target.GetComponentsInChildren <MultiHolder>(true);
         if (componentsInChildren.Length > 0)
         {
             componentsInChildren[0].TakeItemMP(evnt.Player, (MultiHolder.ContentTypes)evnt.ContentType);
             return;
         }
     }
 }