tears of saedron remove stat runes
This commit is contained in:
@@ -232,11 +232,13 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
if (pc == null || origin == null) {
|
||||
return;
|
||||
}
|
||||
ItemBase runeBase = ItemBase.getItemBase(runeID);
|
||||
|
||||
//remove only if rune is discipline
|
||||
if (runeID < 3001 || runeID > 3048) {
|
||||
boolean discRune = runeBase.isDiscRune();
|
||||
boolean statRune = runeBase.isStatRune();
|
||||
if(!runeBase.isDiscRune() && !runeBase.isStatRune())
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//see if pc has rune
|
||||
ArrayList<CharacterRune> runes = pc.getRunes();
|
||||
|
||||
@@ -576,6 +576,7 @@ public class VendorDialogMsg extends ClientNetMsg {
|
||||
case 2520:
|
||||
case 2521:
|
||||
case 2523:
|
||||
case 2525:
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -164,6 +164,19 @@ public class CharacterRune extends AbstractGameObject {
|
||||
runes.remove(runes.indexOf(rune));
|
||||
CharacterSkill.calculateSkills(pc);
|
||||
pc.applyBonuses();
|
||||
if(ItemBase.getItemBase(rune.getRuneBaseID()) != null && ItemBase.getItemBase(rune.getRuneBaseID()).isStatRune()){
|
||||
//handle point refund
|
||||
int creationCost = 0;
|
||||
for(RuneBaseAttribute attr : rune.runeBase.getAttrs()){
|
||||
if(attr.getAttributeID() == MBServerStatics.RUNE_COST_ATTRIBUTE_ID){
|
||||
creationCost = (int)attr.getModValue();
|
||||
}
|
||||
}
|
||||
if(creationCost > 0){
|
||||
pc.unusedStatPoints += creationCost;
|
||||
pc.syncClient();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user