Beispiel #1
0
 public void updata(theHero owner)
 {
     setSpaceNow();
     setBurdenNow();
     setMaxBurden(owner.getMaxBurden());
     setMaxSpace(6 + getExtarRoom());//容量6==无背包
     owner.setBurden(owner.getHeroBag().getBurdenNow());
     if (getSpaceNow() > getMaxSpace())
     {
         int count = 0, aim = getSpaceNow() - getMaxSpace();
         for (int i = 0; i < itemArray.Count; i++)
         {
             if (((defaultItem)itemArray[i]).getIsEquited())
             {
                 continue;
             }
             if (count == aim)
             {
                 break;
             }
             owner.getStandBlock().getItemInGround().Add(((defaultItem)itemArray[i]));
             owner.getMessageBox().Items.Add(((defaultItem)itemArray[i]).getName() + "掉在地上了!");
             count++;
             itemArray.RemoveAt(i);
             i--;
         }
     }
 }
Beispiel #2
0
 public void setOwner(theHero owner)
 {
     this.owner = owner;
 }