From 1cf7ca1327d903d6857db80f7eb1acbde8533030 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 12 May 2009 19:49:09 -0600 Subject: Fix player party hilighting issues Causes when other party memebrs were on the same map and they came in range, they wouldn't get hilighted. Also simplify the check for correct player (avoiding problems with multiple characters on an account). --- src/gui/partywindow.cpp | 2 +- src/net/ea/beinghandler.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 3da59e9f..8958c1ec 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -126,7 +126,7 @@ void PartyWindow::updateMember(int id, const std::string &memberName, member->avatar->setOnline(online); Player *player = dynamic_cast(beingManager->findBeing(id)); - if (player && player->getName() == memberName) + if (player && online) player->setInParty(true); } diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 29ed733a..5a49442c 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -35,6 +35,8 @@ #include "npc.h" #include "playerrelations.h" +#include "gui/partywindow.h" + #include namespace EAthena { @@ -445,12 +447,15 @@ void BeingHandler::handleMessage(MessageIn &msg) dstBeing = createBeing(id, job); } - // Fix monster jobs - if (dstBeing->getType() == Being::MONSTER) { - job -= 1002; + PartyMember *member = partyWindow->findMember(id); + if (member && member->online) + { + dynamic_cast(dstBeing)->setInParty(true); + } } + dstBeing->setWalkSpeed(speed); dstBeing->mJob = job; hairStyle = msg.readInt16(); -- cgit v1.2.3-70-g09d2