Some cleanup as well as fix for a certain type of aa proc

This commit is contained in:
KimLS
2015-06-15 15:09:06 -07:00
parent 34f0106437
commit a984e9bd7c
8 changed files with 120 additions and 147 deletions
+1 -28
View File
@@ -4077,34 +4077,7 @@ XS(XS_Client_RefundAA) {
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
//old aa
//int curpt = 0;
//bool refunded = false;
//
//for(int x1=0;x1<aaHighestID;x1++){
// curpt = THIS->GetAA(x1);
// if(curpt > 0){
// SendAA_Struct* curaa = zone->FindAA(x1);
// if(curaa){
// THIS->SetAA(x1, 0);
// for(int x2=0;x2<curpt;x2++){ //add up all the AA points pt by pt to get the correct cost
// THIS->GetPP().aapoints += curaa->cost + (curaa->cost_inc * x2);
// refunded = true;
// }
// }
// else //aa doesn't exist.. but if they bought it then it had at least a cost of 1 point each
// { //so give back what we can
// THIS->GetPP().aapoints += curpt;
// THIS->SetAA(x1, 0);
// refunded = true;
// }
// }
//}
//
//if(refunded){
// THIS->Save(); //save of course
// THIS->Kick(); //client gets all buggy if we don't immediatly relog so just force it on them
//}
THIS->RefundAA();
}
XSRETURN_EMPTY;
}