What do you think about this code?
Added by ShamanRU about 8 years ago
I founded this code when I was looking for where server send to client it position.
CCharacter * c = dynamic_cast<CCharacter*>(e);
if( c ) {CContinent * cont = CZoneManager::getInstance().getContinent(x,y);
if(c->getCurrentContinent() CONTINENT::NEWBIELAND ) {if( cont 0 || cont->getId() != CONTINENT::NEWBIELAND ) {
log_Command_TPOutsideNewbieland(c->getId());
// nlwarning("Position %s player outside NEWBIELAND, this is logged.", c->getId().toString().c_str());}
}
c->allowNearPetTp();
if (res.size() >= 4) {// season included
c->teleportCharacter(x,y,z,true, false, 0.f, 0xFF, 0, (uint8) atoi(res3.c_str()));}
else {c->teleportCharacter(x,y,z,true);
}
if ( cont ) {c->getRespawnPoints().addDefaultRespawnPoint( CONTINENT::TContinent(cont->getId()) );
}
}
else {e->tpWanted (x, y, z);
}
As I understand, client can't move on other continent with this server code, right?