果然要看源码啊,
int level=UnitXPGetCurrentLevel(u,"AHer")-1;
string id=UnitGetType(u);
int STR=UserDataGetInt("HeroBalance",id,"STR",1);
int AGI=UserDataGetInt("HeroBalance",id,"AGI",1);
int INT=UserDataGetInt("HeroBalance",id,"INT",1);
fixed STRplus=UserDataGetFixed("HeroBalance",id,"STRplus",1);
fixed AGIplus=UserDataGetFixed("HeroBalance",id,"AGIplus",1);
fixed INTplus=UserDataGetFixed("HeroBalance",id,"INTplus",1);
int S=STR+FloorI(STRplus*level+0.001);
int A=AGI+FloorI(AGIplus*level+0.001);
int I=INT+FloorI(INTplus*level+0.001);
GAw3_SetUnitAtt(u,"Str",S);
GAw3_SetUnitAtt(u,"Agi",A);
GAw3_SetUnitAtt(u,"Int",I);
一目了然。。。。 |