Hello, I have a small problem
In combat.ccp:
I change for:
Then an error appears:
Please help. Vvafel
In combat.ccp:
Code:
void Combat::getMinMaxValues(Creature* creature, Creature* target, int32_t& min, int32_t& max) const
{
if(!creature){
return;
}
if(Player* player = creature->getPlayer()){
if(params.valueCallback){
params.valueCallback->getMinMaxValues(player, min, max);
}
else{
switch(formulaType){
case FORMULA_LEVELMAGIC:
{
max = (int32_t)((player->getLevel() * 2 + player->getMagicLevel() * 3) * 1. * mina + minb);
min = (int32_t)((player->getLevel() * 2 + player->getMagicLevel() * 3) * 1. * maxa + maxb);
break;
}
I change for:
Code:
void Combat::getMinMaxValues(Creature* creature, Creature* target, int32_t& min, int32_t& max) const
{
if(!creature){
return;
}
if(Player* player = creature->getPlayer()){
if(params.valueCallback){
params.valueCallback->getMinMaxValues(player, min, max);
}
else{
switch(formulaType){
case FORMULA_LEVELMAGIC:
{
max = (int32_t)(((player->getLevel() * 2 + player->getMagicLevel() * 3) * 1. * mina + minb) * vocation->getMagicDamage());
min = (int32_t)(((player->getLevel() * 2 + player->getMagicLevel() * 3) * 1. * maxa + maxb) * vocation->getMagicDamage());
break;
}
Then an error appears:
Code:
../combat.cpp: In member function `void Combat::getMinMaxValues(Creature*, Creature*, int32_t&, int32_t&) const':
../combat.cpp:77: error: `vocation' was not declared in this scope
make.exe: *** [../combat.o] Error 1
Please help. Vvafel