diff --git a/code/ryzom/common/data_common/database.xml b/code/ryzom/common/data_common/database.xml index d2cc35d95..620254daa 100644 --- a/code/ryzom/common/data_common/database.xml +++ b/code/ryzom/common/data_common/database.xml @@ -1505,7 +1505,7 @@ + type="I32" /> -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#ifndef RY_KNOWN_BRICK_INFO_H -#define RY_KNOWN_BRICK_INFO_H -/* -// --------------------------------------------------------------------------- -class CStaticGameBrick; - -// --------------------------------------------------------------------------- -struct CKnownBrickInfo -{ - const CStaticGameBrick* Form; - uint32 LatencyEndDate; - bool OldLatentState; - - CKnownBrickInfo( const CStaticGameBrick *form = NULL ) : Form(form) - { - LatencyEndDate = 0; - OldLatentState = false; - } - - /// Serialisation - void serial(class NLMISC::IStream &f) throw(NLMISC::EStream) - { - // f.serial( LatencyEndDate ); - // f.serial( OldLatentState ); - // nothing to serial here, the date are no longer meaningful, all bricks are available when the character connects to the game - // and the Form is set while setting the databse in the setDatabase() method - } -}; -*/ -#endif // RY_KNOWN_BRICK_INFO_H -/* known_brick_info.h */ diff --git a/code/ryzom/server/src/entities_game_service/database_plr.h b/code/ryzom/server/src/entities_game_service/database_plr.h index 2a1ce3878..5714675e4 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.h +++ b/code/ryzom/server/src/entities_game_service/database_plr.h @@ -8977,26 +8977,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return _DESPAWN; } - void setNAME(CCDBSynchronised &dbGroup, ucstring value, bool forceSending = false) + void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false) { _setProp(dbGroup, _NAME, value, forceSending); } - ucstring getNAME(const CCDBSynchronised &dbGroup) - { - ucstring value; - _getProp(dbGroup, _NAME, value); - - return value; - } - - void setNAME(CCDBSynchronised &dbGroup, uint32 stringId, bool forceSending = false) - { - _setProp(dbGroup, _NAME, stringId, forceSending); - } - uint32 getNAME_id(const CCDBSynchronised &dbGroup) + uint32 getNAME(const CCDBSynchronised &dbGroup) { uint32 value; _getProp(dbGroup, _NAME, value); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 5f0e980b4..4a9096232 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -147,8 +147,6 @@ #include "server_share/log_character_gen.h" #include "server_share/log_item_gen.h" -#include "player_manager/character_achievements.h" - /////////// // USING // /////////// @@ -604,7 +602,6 @@ CCharacter::CCharacter(): CEntityBase(false), _CurrentParrySkill = BarehandCombatSkill; _EncycloChar = new CCharacterEncyclopedia(*this); - _AchievementsChar = new CCharacterAchievements(*this); _GameEvent = new CCharacterGameEvent(*this); _RespawnPoints = new CCharacterRespawnPoints(*this); _PlayerRoom = new CPlayerRoomInterface; @@ -1536,8 +1533,6 @@ uint32 CCharacter::tickUpdate() nextUpdate = 8; } - //_AchievementsPlayer->tickUpdate(); - return nextUpdate; } // tickUpdate // @@ -2797,7 +2792,6 @@ CCharacter::~CCharacter() _BarUpdateTimer.reset(); delete _EncycloChar; - delete _AchievementsChar; delete _GameEvent; delete _RespawnPoints; delete _PlayerRoom; @@ -2815,11 +2809,6 @@ CCharacter::~CCharacter() } // destructor // -void CCharacter::mobKill(TDataSetRow creatureRowId) -{ - _AchievementsChar->mobKill(creatureRowId); -} - //--------------------------------------------------- // prepareToLoad: method called before applying a pdr save record // @@ -13138,7 +13127,6 @@ void CCharacter::setPlaces(const std::vector & places) for ( uint i = 0; i < size; i++ ) { _Places[i] = places[i]->getId(); - _AchievementsChar->inPlace(places[i]); } } @@ -14200,11 +14188,6 @@ void CCharacter::sendCloseTempInventoryImpulsion() //----------------------------------------------- void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint32 fameMax, uint16 fameTrend) { - if (playerFame != NO_FAME) - { - _AchievementsChar->fameValue(factionIndex, playerFame); - } - uint32 firstTribeFameIndex = CStaticFames::getInstance().getFirstTribeFameIndex(); uint32 firstTribeDbIndex = CStaticFames::getInstance().getDatabaseIndex( firstTribeFameIndex ); uint32 fameIndexInDatabase = CStaticFames::getInstance().getDatabaseIndex( factionIndex ); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.h b/code/ryzom/server/src/entities_game_service/player_manager/character.h index 9ad894abe..3f97c6b3e 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.h @@ -115,7 +115,6 @@ class CMissionEvent; class CMissionSolo; class CCharacterVersionAdapter; class CCharacterEncyclopedia; -class CCharacterAchievements; class CCharacterGameEvent; class CCharacterRespawnPoints; class CCharacterShoppingList; @@ -443,10 +442,8 @@ private: static const std::string &contactListActionToString(TConctactListAction e); NL_INSTANCE_COUNTER_DECL(CCharacter); -public: - - void mobKill(TDataSetRow creatureRowId); +public: // Start by declaring methods for persistent load/ save operations // The following macro is defined in persistent_data.h // At time of writing it evaluated to: @@ -3505,8 +3502,6 @@ private: CCharacterEncyclopedia *_EncycloChar; - CCharacterAchievements *_AchievementsChar; - CCharacterGameEvent *_GameEvent; CCharacterRespawnPoints *_RespawnPoints; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.cpp deleted file mode 100644 index b80abbdcf..000000000 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.cpp +++ /dev/null @@ -1,90 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -//----------------------------------------------------------------------------- -// includes -//----------------------------------------------------------------------------- - -#include "stdpch.h" -//#include "egs_sheets/egs_sheets.h" -//#include "egs_sheets/egs_static_encyclo.h" -//#include "game_share/msg_encyclopedia.h" -//#include "game_share/string_manager_sender.h" -//#include "player_manager/player_manager.h" -//#include "player_manager/player.h" -//#include "mission_manager/mission_manager.h" -#include "player_manager/character_achievements.h" -#include "player_manager/character.h" -#include "phrase_manager/phrase_utilities_functions.h" - -//----------------------------------------------------------------------------- -// namespaces -//----------------------------------------------------------------------------- - -using namespace std; -using namespace NLMISC; - -NL_INSTANCE_COUNTER_IMPL(CCharacterAchievements); - -//----------------------------------------------------------------------------- -// methods CCharacterEncyclopedia -//----------------------------------------------------------------------------- - -CCharacterAchievements::CCharacterAchievements(CCharacter &c) : _Char(c) -{ - init(); -} - -//----------------------------------------------------------------------------- - -void CCharacterAchievements::init() -{ - nlinfo("hello achievements"); - //load atoms -} - -//----------------------------------------------------------------------------- - -void CCharacterAchievements::clear() -{ - //clear atoms -} - -//----------------------------------------------------------------------------- - -void CCharacterAchievements::mobKill(TDataSetRow creatureRowId) -{ - const CCreature *creature = CreatureManager.getCreature(creatureRowId); - if (creature) - { - nlinfo("player has killed a mob: %s!",creature->getType().toString().c_str()); - } -} - -void CCharacterAchievements::inPlace(const CPlace *region) -{ - nlinfo("player in region %u",region->getId()); -} - -void CCharacterAchievements::fameValue(uint32 factionIndex, sint32 playerFame) -{ - nlinfo("fame: f(%u)=>v(%u)",factionIndex,playerFame); -} - -void CCharacterAchievements::tickUpdate() -{ - //evaluate atoms -} \ No newline at end of file diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.h b/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.h deleted file mode 100644 index 94fae1260..000000000 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_achievements.h +++ /dev/null @@ -1,78 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -#ifndef EGS_CHARACTER_ACHIEVEMENTS_H -#define EGS_CHARACTER_ACHIEVEMENTS_H - - -//----------------------------------------------------------------------------- -// includes -//----------------------------------------------------------------------------- - -// game share -//#include "game_share/persistent_data.h" -#include "zone_manager.h" -#include "creature_manager/creature.h" -#include "creature_manager/creature_manager.h" - -//----------------------------------------------------------------------------- - -class CCharacter; - -/** - * Dynamic part of the encyclopedia stored in a character - * This structure is optimized for size because its stored directly in the player persistant data stuff - * We use CEncyMsgXXX for sending info to the player - * \author Matthieu 'Trap' Besson - * \author Nevrax France - * \date November 2004 - */ -class CCharacterAchievements -{ - NL_INSTANCE_COUNTER_DECL(CCharacterAchievements); -public: - - CCharacterAchievements(CCharacter &c); - - // Construct the encyclopedia album structure from the static sheet that defines encyclopedia - // This method ensure that we have at least the same number of album and the same number of thema by album - // as in the sheets defines the encyclopedia - void init(); - - // remove all - void clear(); - - void mobKill(TDataSetRow creatureRowId); - - void inPlace(const CPlace *region); - - void fameValue(uint32 factionIndex, sint32 playerFame); - - void tickUpdate(); - - -private: - - - -private: - - // The parent class - CCharacter &_Char; - -}; - -#endif // EGS_CHARACTER_ACHIEVEMENTS_H diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp b/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp index 6cd1c96a0..ed3c03c8e 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp @@ -1980,8 +1980,6 @@ bool CCharacterActions::dispatchXpGain( TDataSetRow actor, TDataSetRow creatureR // compute xp gain on creature, cap xp gain per player to MaxXPGainPerPlayer const float xpGainPerOpponent = min( MaxXPGainPerPlayer.get(), float(xpFactor * maxXPGain / equivalentXpMembers) ); - c->mobKill(creatureRowId); - TSkillProgressPerOpponentContainer::iterator it = _SkillProgressPerOpponent.find( creatureRowId ); if( it != _SkillProgressPerOpponent.end() ) { diff --git a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php index 6fb933b68..888112c65 100644 --- a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php +++ b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php @@ -67,6 +67,8 @@ function domain_management_hook_get_db() { global $domain_management_return_set; + try { + $db = new DBLayer( 'shard' ); //get all domains @@ -91,6 +93,10 @@ function domain_management_hook_get_db() } return $rows; + + } catch (Exception $e) { + return null; + } } /**