Merge branch 'ark'

feature/prepare-cross-merge
Nuno 4 years ago committed by kaetemi
parent 4108367413
commit 005f1c755c
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

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

Loading…
Cancel
Save