|
|
@ -294,44 +294,48 @@ void CMissionBaseBehaviour::addCompassTarget( uint32 targetId, bool isBot, bool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nlassert(_Mission->getCompass(freeIdx) == NULL);
|
|
|
|
if (freeIdx < 8)
|
|
|
|
EGSPD::CMissionCompassPD * compass = _Mission->addToCompass(freeIdx);
|
|
|
|
|
|
|
|
nlassert(compass != NULL);
|
|
|
|
|
|
|
|
if (c != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
compass->setBotId(c->getAlias());
|
|
|
|
if (_Mission->getCompass(freeIdx) == NULL)
|
|
|
|
compass->setPlace(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (place != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
compass->setBotId(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
compass->setPlace(place->getAlias());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isPosition)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
compass->setBotId(targetId);
|
|
|
|
EGSPD::CMissionCompassPD * compass = _Mission->addToCompass(freeIdx);
|
|
|
|
compass->setPlace(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sint32 x;
|
|
|
|
if (compass)
|
|
|
|
sint32 y;
|
|
|
|
{
|
|
|
|
string textName;
|
|
|
|
if (c != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
compass->setBotId(c->getAlias());
|
|
|
|
|
|
|
|
compass->setPlace(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (place != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
compass->setBotId(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
compass->setPlace(place->getAlias());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isPosition)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
compass->setBotId(targetId);
|
|
|
|
|
|
|
|
compass->setPlace(CAIAliasTranslator::Invalid);
|
|
|
|
|
|
|
|
|
|
|
|
CCharacter * user = getMainEntity();
|
|
|
|
sint32 x;
|
|
|
|
user->getPositionCheck(toUpper(templ->getMissionName()), x, y, textName);
|
|
|
|
sint32 y;
|
|
|
|
|
|
|
|
string textName;
|
|
|
|
|
|
|
|
|
|
|
|
if (targetId != 0) {
|
|
|
|
CCharacter * user = getMainEntity();
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setX(user->_PropertyDatabase, x*1000);
|
|
|
|
user->getPositionCheck(toUpper(templ->getMissionName()), x, y, textName);
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setY(user->_PropertyDatabase, y*1000);
|
|
|
|
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setTITLE(user->_PropertyDatabase, targetId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
targetId = CAIAliasTranslator::Invalid;
|
|
|
|
if (targetId != 0) {
|
|
|
|
}
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setX(user->_PropertyDatabase, x*1000);
|
|
|
|
else
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setY(user->_PropertyDatabase, y*1000);
|
|
|
|
{
|
|
|
|
CBankAccessor_PLR::getMISSIONS().getArray(_ClientIndex).getTARGET(freeIdx).setTITLE(user->_PropertyDatabase, targetId);
|
|
|
|
nlstop;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
targetId = CAIAliasTranslator::Invalid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|