temporary enchant stripping
This commit is contained in:
@@ -610,7 +610,7 @@ public class CharacterItemManager {
|
|||||||
if (i == null)
|
if (i == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
i.stripCastableEnchants();
|
//i.stripCastableEnchants();
|
||||||
|
|
||||||
if (!this.doesCharOwnThisItem(i.getObjectUUID()))
|
if (!this.doesCharOwnThisItem(i.getObjectUUID()))
|
||||||
return false;
|
return false;
|
||||||
@@ -1056,7 +1056,7 @@ public class CharacterItemManager {
|
|||||||
// add to Bank
|
// add to Bank
|
||||||
this.bank.add(i);
|
this.bank.add(i);
|
||||||
i.addToCache();
|
i.addToCache();
|
||||||
i.stripCastableEnchants();
|
//i.stripCastableEnchants();
|
||||||
|
|
||||||
calculateWeights();
|
calculateWeights();
|
||||||
|
|
||||||
@@ -1205,7 +1205,7 @@ public class CharacterItemManager {
|
|||||||
|
|
||||||
calculateWeights();
|
calculateWeights();
|
||||||
|
|
||||||
i.stripCastableEnchants();
|
//i.stripCastableEnchants();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2013,7 +2013,7 @@ public class CharacterItemManager {
|
|||||||
if (item.getItemBase().getType().equals(ItemType.GOLD)) {
|
if (item.getItemBase().getType().equals(ItemType.GOLD)) {
|
||||||
int amt = item.getNumOfItems();
|
int amt = item.getNumOfItems();
|
||||||
item.setNumOfItems(0);
|
item.setNumOfItems(0);
|
||||||
item.stripCastableEnchants();
|
//item.stripCastableEnchants();
|
||||||
MobLoot ml = new MobLoot(this.absCharacter, amt);
|
MobLoot ml = new MobLoot(this.absCharacter, amt);
|
||||||
ml.zeroItem();
|
ml.zeroItem();
|
||||||
ml.containerType = Enum.ItemContainerType.INVENTORY;
|
ml.containerType = Enum.ItemContainerType.INVENTORY;
|
||||||
|
|||||||
@@ -818,22 +818,9 @@ public class Item extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void stripCastableEnchants(){
|
public void stripCastableEnchants(){
|
||||||
ArrayList<String> keys =new ArrayList<>();
|
for(Effect eff : this.effects.values()){
|
||||||
|
if(eff.getJobContainer() != null && !eff.getJobContainer().noTimer()){
|
||||||
for(String eff : this.effects.keySet()){
|
eff.endEffect();
|
||||||
for(AbstractEffectModifier mod : this.effects.get(eff).getEffectsBase().getModifiers()){
|
|
||||||
if(mod.modType.equals(ModType.WeaponProc)){
|
|
||||||
keys.add(eff);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(String eff : keys){
|
|
||||||
try {
|
|
||||||
this.effects.get(eff).endEffect();
|
|
||||||
this.effects.remove(eff);
|
|
||||||
}catch(Exception e){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1085,7 +1072,7 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.ownerID = pc.getObjectUUID();
|
this.ownerID = pc.getObjectUUID();
|
||||||
this.ownerType = OwnerType.PlayerCharacter;
|
this.ownerType = OwnerType.PlayerCharacter;
|
||||||
this.containerType = ItemContainerType.INVENTORY;
|
this.containerType = ItemContainerType.INVENTORY;
|
||||||
this.stripCastableEnchants();
|
//this.stripCastableEnchants();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1106,7 +1093,7 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.ownerID = npc.getObjectUUID();
|
this.ownerID = npc.getObjectUUID();
|
||||||
this.ownerType = OwnerType.Npc;
|
this.ownerType = OwnerType.Npc;
|
||||||
this.containerType = Enum.ItemContainerType.INVENTORY;
|
this.containerType = Enum.ItemContainerType.INVENTORY;
|
||||||
this.stripCastableEnchants();
|
//this.stripCastableEnchants();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1124,7 +1111,7 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.ownerID = 0;
|
this.ownerID = 0;
|
||||||
this.ownerType = null;
|
this.ownerType = null;
|
||||||
this.containerType = Enum.ItemContainerType.INVENTORY;
|
this.containerType = Enum.ItemContainerType.INVENTORY;
|
||||||
this.stripCastableEnchants();
|
//this.stripCastableEnchants();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user