Characters are moving around in the world

This commit is contained in:
Kayne Ruse
2014-12-27 02:26:44 +11:00
parent 398f1c8bfd
commit 6c11aa0927
3 changed files with 91 additions and 4 deletions
+13 -2
View File
@@ -242,10 +242,21 @@ void ServerApplication::HandleCharacterSetOrigin(CharacterPacket* const argPacke
void ServerApplication::HandleCharacterSetMotion(CharacterPacket* const argPacket) {
//get the specified objects
AccountData* accountData = accountMgr.Get(argPacket->accountIndex);
if (!accountData) {
std::ostringstream msg;
msg << "Failed to set character motion, missing account: Index " << argPacket->accountIndex << "; ";
msg << "Number of accounts loaded: " << accountMgr.GetContainer()->size();
throw(std::runtime_error(msg.str()));
}
CharacterData* characterData = characterMgr.Get(argPacket->characterIndex);
if (!accountData || !characterData) {
throw(std::runtime_error("Failed to set character motion, missing data"));
if (!characterData) {
std::ostringstream msg;
msg << "Failed to set character motion, missing character: Index " << argPacket->characterIndex << "; ";
msg << "Number of characters loaded: " << characterMgr.GetContainer()->size();
throw(std::runtime_error(msg.str()));
}
//get this account's client