diff --git a/ryzom/server/src/ai_service/ai_profile_npc.cpp b/ryzom/server/src/ai_service/ai_profile_npc.cpp index a17bfca3c..35a32c15b 100644 --- a/ryzom/server/src/ai_service/ai_profile_npc.cpp +++ b/ryzom/server/src/ai_service/ai_profile_npc.cpp @@ -926,7 +926,14 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate) CFollowPathContext fpcGrpGuardProfileUpdate("GrpGuardProfileUpdate"); CAIVision 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); diff --git a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp index be44a4c94..5b4226f0a 100644 --- a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp +++ b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp @@ -2518,7 +2518,7 @@ NLMISC_COMMAND(temporaryRename, "rename a player for the event", " registerName(newName); diff --git a/ryzom/server/src/entities_game_service/player_manager/character.cpp b/ryzom/server/src/entities_game_service/player_manager/character.cpp index e6cd62e84..9568a8606 100644 --- a/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -13521,9 +13521,9 @@ void CCharacter::abandonMission(uint8 indexClient) } vector 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); + } + } } }