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) {
|
if (pc == null || origin == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ItemBase runeBase = ItemBase.getItemBase(runeID);
|
||||||
|
|
||||||
//remove only if rune is discipline
|
boolean discRune = runeBase.isDiscRune();
|
||||||
if (runeID < 3001 || runeID > 3048) {
|
boolean statRune = runeBase.isStatRune();
|
||||||
|
if(!runeBase.isDiscRune() && !runeBase.isStatRune())
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
//see if pc has rune
|
//see if pc has rune
|
||||||
ArrayList<CharacterRune> runes = pc.getRunes();
|
ArrayList<CharacterRune> runes = pc.getRunes();
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ public class VendorDialogMsg extends ClientNetMsg {
|
|||||||
case 2520:
|
case 2520:
|
||||||
case 2521:
|
case 2521:
|
||||||
case 2523:
|
case 2523:
|
||||||
|
case 2525:
|
||||||
valid = true;
|
valid = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,19 @@ public class CharacterRune extends AbstractGameObject {
|
|||||||
runes.remove(runes.indexOf(rune));
|
runes.remove(runes.indexOf(rune));
|
||||||
CharacterSkill.calculateSkills(pc);
|
CharacterSkill.calculateSkills(pc);
|
||||||
pc.applyBonuses();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user