From 2abe431675ba5de92d298ce2e6429f441eb7f2e0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 11 Sep 2014 17:40:53 +0200 Subject: [PATCH 1/3] Regenerate PLR cpp and header --- code/ryzom/common/data_common/database.xml | 2 +- .../entities_game_service/database_plr.cpp | 22 +- .../src/entities_game_service/database_plr.h | 314 +++++++++--------- 3 files changed, 165 insertions(+), 173 deletions(-) diff --git a/code/ryzom/common/data_common/database.xml b/code/ryzom/common/data_common/database.xml index 6608664b8..b87dd921b 100644 --- a/code/ryzom/common/data_common/database.xml +++ b/code/ryzom/common/data_common/database.xml @@ -1513,7 +1513,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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -362,7 +347,7 @@ void CBankAccessor_PLR::TUSER::init(ICDBStructNode *parent) node = parent->getNode( ICDBStructNode::CTextId("IS_INVISIBLE"), false ); nlassert(node != NULL); _IS_INVISIBLE = node; - + node = parent->getNode( ICDBStructNode::CTextId("COUNTER"), false ); nlassert(node != NULL); _COUNTER = node; @@ -3139,10 +3124,11 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint node = parent->getNode( ICDBStructNode::CTextId("DESPAWN"), false ); nlassert(node != NULL); _DESPAWN = node; - - node = parent->getNode( ICDBStructNode::CTextId("NAME"), true ); + + node = parent->getNode( ICDBStructNode::CTextId("NAME"), false ); nlassert(node != NULL); _NAME = node; + // branch init 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 bd431a108..38a394c88 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.h +++ b/code/ryzom/server/src/entities_game_service/database_plr.h @@ -1,22 +1,7 @@ -// 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 INCLUDED_database_PLR_H -#define INCLUDED_database_PLR_H + + +#ifndef INCLUDED_DATABASE_PLR_H +#define INCLUDED_DATABASE_PLR_H ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// @@ -140,7 +125,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C class TGameTime - { + { public: @@ -183,7 +168,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TINTERFACES - { + { public: @@ -247,11 +232,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TUSER - { + { public: class TSKILL_POINTS_ - { + { public: @@ -294,7 +279,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TFACTION_POINTS_ - { + { public: @@ -337,7 +322,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TRRPS_LEVELS - { + { public: @@ -380,7 +365,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TNPC_CONTROL - { + { public: @@ -490,7 +475,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C ICDBStructNode *_IS_NEWBIE; ICDBStructNode *_IS_TRIAL; ICDBStructNode *_DEFAULT_WEIGHT_HANDS; - ICDBStructNode *_IS_INVISIBLE; + ICDBStructNode *_IS_INVISIBLE; ICDBStructNode *_COUNTER; TSKILL_POINTS_ _SKILL_POINTS_[4]; TFACTION_POINTS_ _FACTION_POINTS_[6]; @@ -954,6 +939,26 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return _DEFAULT_WEIGHT_HANDS; } + void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false) + { + + + _setProp(dbGroup, _IS_INVISIBLE, value, forceSending); + } + + bool getIS_INVISIBLE(const CCDBSynchronised &dbGroup) + { + bool value; + _getProp(dbGroup, _IS_INVISIBLE, value); + + return value; + } + + ICDBStructNode *getIS_INVISIBLECDBNode() + { + return _IS_INVISIBLE; + } + void setCOUNTER(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false) { @@ -976,20 +981,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _COUNTER; } - - void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false) - { - _setProp(dbGroup, _IS_INVISIBLE, value, forceSending); - } - - bool getIS_INVISIBLE(const CCDBSynchronised &dbGroup) - { - bool value; - _getProp(dbGroup, _IS_INVISIBLE, value); - - return value; - } - TSKILL_POINTS_ &getSKILL_POINTS_(uint32 index) { nlassert(index < 4); @@ -1013,15 +1004,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDEFENSE - { + { public: class TSLOTS - { + { public: class TArray - { + { public: @@ -1156,15 +1147,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TFLAGS - { + { public: class TBRICK_TICK_RANGE - { + { public: class TArray - { + { public: @@ -1309,20 +1300,19 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DODGE; } - - TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() + TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() { return _BRICK_TICK_RANGE; } - + }; - + class TTARGET - { + { public: class TBARS - { + { public: @@ -1482,15 +1472,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TCONTEXT_MENU - { + { public: class TMISSIONS_OPTIONS - { + { public: class TArray - { + { public: @@ -1602,11 +1592,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMISSION_RING - { + { public: class TArray - { + { public: @@ -1927,11 +1917,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TGROUP - { + { public: class TArray - { + { public: @@ -2109,19 +2099,19 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMISSIONS - { + { public: class TArray - { + { public: class TGOALS - { + { public: class TArray - { + { public: @@ -2209,7 +2199,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTARGET - { + { public: @@ -2294,11 +2284,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class THISTO - { + { public: class TArray - { + { public: @@ -2716,7 +2706,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDM_GIFT - { + { public: @@ -2759,15 +2749,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TEXCHANGE - { + { public: class TGIVE - { + { public: class TArray - { + { public: @@ -3062,11 +3052,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TRECEIVE - { + { public: class TArray - { + { public: @@ -3467,6 +3457,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { + + _setProp(dbGroup, _MONEY, value, forceSending); } @@ -3540,15 +3532,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TINVENTORY - { + { public: class THAND - { + { public: class TArray - { + { public: @@ -3618,11 +3610,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TEQUIP - { + { public: class TArray - { + { public: @@ -3692,11 +3684,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTEMP - { + { public: class TArray - { + { public: @@ -4033,11 +4025,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TSHARE - { + { public: class TArray - { + { public: @@ -4377,7 +4369,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTM_ - { + { public: @@ -4504,7 +4496,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TROOM - { + { public: @@ -4568,6 +4560,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { + + _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4575,14 +4569,17 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { uint64 value; _getProp(dbGroup, _MONEY, value); + return value; } - + ICDBStructNode *getMONEYCDBNode() { return _MONEY; } + }; + private: ICDBStructNode *_BranchNode; @@ -4605,8 +4602,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return _BranchNode; } + void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { + + _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4669,15 +4669,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMODIFIERS - { + { public: class TBONUS - { + { public: class TArray - { + { public: @@ -4786,11 +4786,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMALUS - { + { public: class TArray - { + { public: @@ -4948,11 +4948,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDISABLE_CONSUMABLE - { + { public: class TArray - { + { public: @@ -5040,15 +5040,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TBOTCHAT - { + { public: class TDM_CHOICE - { + { public: class TArray - { + { public: @@ -5310,11 +5310,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TASCENSOR - { + { public: class TArray - { + { public: @@ -5468,11 +5468,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TCHOOSE_MISSIONS - { + { public: class TArray - { + { public: @@ -5668,11 +5668,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTRADING - { + { public: class TArray - { + { public: @@ -6000,6 +6000,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false) { + + _setProp(dbGroup, _MONEY_SHEET, value, forceSending); } @@ -6466,11 +6468,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TBRICK_FAMILY - { + { public: class TArray - { + { public: @@ -6537,11 +6539,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TFABER_PLANS - { + { public: class TArray - { + { public: @@ -6608,19 +6610,19 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMISSIONS - { + { public: class TArray - { + { public: class TGOALS - { + { public: class TArray - { + { public: @@ -6708,7 +6710,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTARGET - { + { public: @@ -6793,11 +6795,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class THISTO - { + { public: class TArray - { + { public: @@ -7138,15 +7140,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TEXECUTE_PHRASE - { + { public: class TLINK - { + { public: class TArray - { + { public: @@ -7512,11 +7514,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TCHARACTER_INFO - { + { public: class TCHARACTERISTICS - { + { public: @@ -7562,7 +7564,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TSCORES - { + { public: @@ -7680,11 +7682,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMAGIC_RESISTANCE - { + { public: class TArray - { + { public: @@ -7778,11 +7780,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMAGIC_PROTECTION - { + { public: class TArray - { + { public: @@ -7900,7 +7902,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDODGE - { + { public: @@ -7970,7 +7972,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TPARRY - { + { public: @@ -8040,11 +8042,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TSKILLS - { + { public: class TArray - { + { public: @@ -8159,7 +8161,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TXP_CATALYSER - { + { public: @@ -8229,7 +8231,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TRING_XP_CATALYSER - { + { public: @@ -8299,7 +8301,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TPVP_FACTION_TAG - { + { public: @@ -8405,7 +8407,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TPVP_OUTPOST - { + { public: @@ -8532,15 +8534,15 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TSUCCESS_MODIFIER - { + { public: class TECO - { + { public: class TArray - { + { public: @@ -8836,11 +8838,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TPACK_ANIMAL - { + { public: class TBEAST - { + { public: @@ -8855,7 +8857,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C ICDBStructNode *_POS; ICDBStructNode *_HUNGER; ICDBStructNode *_DESPAWN; - ICDBStructNode *_NAME; + ICDBStructNode *_NAME; + public: void init(ICDBStructNode *parent, uint index); @@ -9044,9 +9047,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DESPAWN; } - + void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false) { + + _setProp(dbGroup, _NAME, value, forceSending); } @@ -9057,11 +9062,12 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return value; } - + ICDBStructNode *getNAMECDBNode() { return _NAME; } + }; @@ -9089,7 +9095,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDEBUG_INFO - { + { public: @@ -9132,11 +9138,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TMP_EVAL - { + { public: class TRESULT - { + { public: @@ -9284,7 +9290,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TRESULT_CRITICAL - { + { public: @@ -9481,7 +9487,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TCOMPASS - { + { public: @@ -9566,11 +9572,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TFAME - { + { public: class TPLAYER - { + { public: @@ -9655,7 +9661,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TTRIBE - { + { public: @@ -9860,7 +9866,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TSTATIC_DATA - { + { public: @@ -9903,11 +9909,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TDYN_CHAT - { + { public: class TCHANNEL - { + { public: @@ -10016,11 +10022,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TPVP_EFFECTS - { + { public: class TPVP_FACTION_POINTS - { + { public: @@ -10126,7 +10132,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TArray - { + { public: @@ -10240,7 +10246,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; class TWEATHER - { + { public: @@ -10483,4 +10489,4 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C }; -#endif // INCLUDED_database_PLR_H +#endif // INCLUDED_DATABASE_PLR_H From 92afe8e76a189089e7f7f35e301e02227630a948 Mon Sep 17 00:00:00 2001 From: botanic Date: Thu, 11 Sep 2014 10:50:34 -0700 Subject: [PATCH 2/3] FIX #200 dont crash when neldb is missing --- .../ams/plugins/Domain_Management/Domain_Management.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; + } } /** From 927ecb3daecb7b9a8a7eabb7a3475e0873eb65fc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Sep 2014 08:35:49 +0200 Subject: [PATCH 3/3] Remove dead code (CCharacterAchievements, CKnownBrickInfo) --- .../character_persistant_data.h | 1 - .../character_structure/known_brick_info.h | 49 ---------- .../player_manager/character.cpp | 17 ---- .../player_manager/character.h | 7 +- .../player_manager/character_achievements.cpp | 90 ------------------- .../player_manager/character_achievements.h | 78 ---------------- .../progression/progression_pve.cpp | 2 - 7 files changed, 1 insertion(+), 243 deletions(-) delete mode 100644 code/ryzom/server/src/entities_game_service/character_structure/known_brick_info.h delete mode 100644 code/ryzom/server/src/entities_game_service/player_manager/character_achievements.cpp delete mode 100644 code/ryzom/server/src/entities_game_service/player_manager/character_achievements.h diff --git a/code/ryzom/server/src/entities_game_service/character_structure/character_persistant_data.h b/code/ryzom/server/src/entities_game_service/character_structure/character_persistant_data.h index 4eff887e4..a685e26b3 100644 --- a/code/ryzom/server/src/entities_game_service/character_structure/character_persistant_data.h +++ b/code/ryzom/server/src/entities_game_service/character_structure/character_persistant_data.h @@ -26,7 +26,6 @@ #include "character_structure/pact_class.h" #include "character_structure/character_sentence.h" -#include "character_structure/known_brick_info.h" #include "game_item_manager/game_item.h" /** diff --git a/code/ryzom/server/src/entities_game_service/character_structure/known_brick_info.h b/code/ryzom/server/src/entities_game_service/character_structure/known_brick_info.h deleted file mode 100644 index f8ec17409..000000000 --- a/code/ryzom/server/src/entities_game_service/character_structure/known_brick_info.h +++ /dev/null @@ -1,49 +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 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/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() ) {