Merge branch 'fixes'

feature/prepare-cross-merge
Ulukyn 4 years ago committed by kaetemi
parent e6bb1f2f54
commit 0d57aad8b9
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -926,7 +926,14 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
CFollowPathContext fpcGrpGuardProfileUpdate("GrpGuardProfileUpdate");
CAIVision<CPersistentOfPhysical> GuardVision;
uint32 aggroSize = _Grp->getPersistent()._AggroRange;
uint32 aggroSize;
float f = 0.f;
if (_Grp->getPersistent().getProfileParameter("aggro_range", f)) // look for persistent aggro range
aggroSize = (uint32)f;
else
aggroSize = _Grp->getPersistent()._AggroRange;
if (aggroSize == 0)
aggroSize = 25;
@ -994,15 +1001,22 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
}
string s;
float f = 0.f;
f = 0.f;
if (_Grp->getProfileParameter("faction", s) && !s.empty())
{
factionIndex = CStaticFames::getInstance().getFactionIndex(s);
}
if (_Grp->getProfileParameter("fame_for_guard_attack", f))
if (_Grp->getPersistent().getProfileParameter("fame_for_guard_attack", f))
{
fameForGuardAttack = (sint32)f;
}
else if (_Grp->getProfileParameter("fame_for_guard_attack", f))
{
fameForGuardAttack = (sint32)f;
}
CGrpProfileNormal::updateProfile(ticksSinceLastUpdate);

@ -2518,7 +2518,7 @@ NLMISC_COMMAND(temporaryRename, "rename a player for the event", "<uid> <new nam
GET_ACTIVE_CHARACTER
ucstring newName(args[0]);
ucstring newName(args[1]);
c->registerName(newName);

@ -13521,9 +13521,9 @@ void CCharacter::abandonMission(uint8 indexClient)
}
vector<string> params = getCustomMissionParams(toUpper(templ->getMissionName())+"_CALLBACK");
if (mission->getFinished() && params.size() >= 1)
if (params.size() >= 1)
{
if (mission->getMissionSuccess())
if (mission->getFinished() && mission->getMissionSuccess())
validateDynamicMissionStep(params[0]+"&result=SUCCESS");
else
validateDynamicMissionStep(params[0]+"&result=ABD");
@ -14484,18 +14484,31 @@ void CCharacter::updateSavedMissions()
}
else
{
CPlace* place = CZoneManager::getInstance().getPlaceFromId((uint16)(*itCompass).second.getPlace());
if (place)
CMissionTemplate * templ = CMissionManager::getInstance()->getTemplate((*it).second->getTemplateId());
string textName;
getPositionCheck(toUpper(templ->getMissionName()), x, y, textName);
if (x != 0 && y != 0)
{
x = place->getCenterX();
y = place->getCenterY();
params[0].Identifier = place->getName();
params[0].Type = STRING_MANAGER::place;
msg = "COMPASS_PLACE";
uint32 txt = STRING_MANAGER::sendStringToClient(_EntityRowId, msg, params);
SM_STATIC_PARAMS_1(textParams, STRING_MANAGER::literal);
textParams[0].Literal.fromUtf8(textName);
uint32 txt = STRING_MANAGER::sendStringToClient( c->getEntityRowId(), "LITERAL", textParams );
PlayerManager.sendImpulseToClient(_Id, "JOURNAL:ADD_COMPASS", x, y, txt);
}
else
{
CPlace* place = CZoneManager::getInstance().getPlaceFromId((uint16)(*itCompass).second.getPlace());
if (place)
{
x = place->getCenterX();
y = place->getCenterY();
params[0].Identifier = place->getName();
params[0].Type = STRING_MANAGER::place;
msg = "COMPASS_PLACE";
uint32 txt = STRING_MANAGER::sendStringToClient(_EntityRowId, msg, params);
PlayerManager.sendImpulseToClient(_Id, "JOURNAL:ADD_COMPASS", x, y, txt);
}
}
}
}

Loading…
Cancel
Save