Merge with default

--HG--
branch : cdb-packed
hg/feature/cdb-packed
kaetemi 10 years ago
commit ba42ed3320

@ -1505,7 +1505,7 @@
<leaf name="DESPAWN" <leaf name="DESPAWN"
type="I7" /> type="I7" />
<leaf name="NAME" <leaf name="NAME"
type="TEXT" /> type="I32" />
</branch> </branch>
</branch> </branch>
<branch name="DEBUG_INFO" <branch name="DEBUG_INFO"

@ -26,7 +26,6 @@
#include "character_structure/pact_class.h" #include "character_structure/pact_class.h"
#include "character_structure/character_sentence.h" #include "character_structure/character_sentence.h"
#include "character_structure/known_brick_info.h"
#include "game_item_manager/game_item.h" #include "game_item_manager/game_item.h"
/** /**

@ -1,49 +0,0 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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 <http://www.gnu.org/licenses/>.
#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 */

@ -8977,26 +8977,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _DESPAWN; 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); _setProp(dbGroup, _NAME, value, forceSending);
} }
ucstring getNAME(const CCDBSynchronised &dbGroup) uint32 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 value; uint32 value;
_getProp(dbGroup, _NAME, value); _getProp(dbGroup, _NAME, value);

@ -147,8 +147,6 @@
#include "server_share/log_character_gen.h" #include "server_share/log_character_gen.h"
#include "server_share/log_item_gen.h" #include "server_share/log_item_gen.h"
#include "player_manager/character_achievements.h"
/////////// ///////////
// USING // // USING //
/////////// ///////////
@ -604,7 +602,6 @@ CCharacter::CCharacter(): CEntityBase(false),
_CurrentParrySkill = BarehandCombatSkill; _CurrentParrySkill = BarehandCombatSkill;
_EncycloChar = new CCharacterEncyclopedia(*this); _EncycloChar = new CCharacterEncyclopedia(*this);
_AchievementsChar = new CCharacterAchievements(*this);
_GameEvent = new CCharacterGameEvent(*this); _GameEvent = new CCharacterGameEvent(*this);
_RespawnPoints = new CCharacterRespawnPoints(*this); _RespawnPoints = new CCharacterRespawnPoints(*this);
_PlayerRoom = new CPlayerRoomInterface; _PlayerRoom = new CPlayerRoomInterface;
@ -1536,8 +1533,6 @@ uint32 CCharacter::tickUpdate()
nextUpdate = 8; nextUpdate = 8;
} }
//_AchievementsPlayer->tickUpdate();
return nextUpdate; return nextUpdate;
} // tickUpdate // } // tickUpdate //
@ -2797,7 +2792,6 @@ CCharacter::~CCharacter()
_BarUpdateTimer.reset(); _BarUpdateTimer.reset();
delete _EncycloChar; delete _EncycloChar;
delete _AchievementsChar;
delete _GameEvent; delete _GameEvent;
delete _RespawnPoints; delete _RespawnPoints;
delete _PlayerRoom; delete _PlayerRoom;
@ -2815,11 +2809,6 @@ CCharacter::~CCharacter()
} // destructor // } // destructor //
void CCharacter::mobKill(TDataSetRow creatureRowId)
{
_AchievementsChar->mobKill(creatureRowId);
}
//--------------------------------------------------- //---------------------------------------------------
// prepareToLoad: method called before applying a pdr save record // prepareToLoad: method called before applying a pdr save record
// //
@ -13138,7 +13127,6 @@ void CCharacter::setPlaces(const std::vector<const CPlace*> & places)
for ( uint i = 0; i < size; i++ ) for ( uint i = 0; i < size; i++ )
{ {
_Places[i] = places[i]->getId(); _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) 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 firstTribeFameIndex = CStaticFames::getInstance().getFirstTribeFameIndex();
uint32 firstTribeDbIndex = CStaticFames::getInstance().getDatabaseIndex( firstTribeFameIndex ); uint32 firstTribeDbIndex = CStaticFames::getInstance().getDatabaseIndex( firstTribeFameIndex );
uint32 fameIndexInDatabase = CStaticFames::getInstance().getDatabaseIndex( factionIndex ); uint32 fameIndexInDatabase = CStaticFames::getInstance().getDatabaseIndex( factionIndex );

@ -115,7 +115,6 @@ class CMissionEvent;
class CMissionSolo; class CMissionSolo;
class CCharacterVersionAdapter; class CCharacterVersionAdapter;
class CCharacterEncyclopedia; class CCharacterEncyclopedia;
class CCharacterAchievements;
class CCharacterGameEvent; class CCharacterGameEvent;
class CCharacterRespawnPoints; class CCharacterRespawnPoints;
class CCharacterShoppingList; class CCharacterShoppingList;
@ -443,10 +442,8 @@ private:
static const std::string &contactListActionToString(TConctactListAction e); static const std::string &contactListActionToString(TConctactListAction e);
NL_INSTANCE_COUNTER_DECL(CCharacter); NL_INSTANCE_COUNTER_DECL(CCharacter);
public:
void mobKill(TDataSetRow creatureRowId);
public:
// Start by declaring methods for persistent load/ save operations // Start by declaring methods for persistent load/ save operations
// The following macro is defined in persistent_data.h // The following macro is defined in persistent_data.h
// At time of writing it evaluated to: // At time of writing it evaluated to:
@ -3505,8 +3502,6 @@ private:
CCharacterEncyclopedia *_EncycloChar; CCharacterEncyclopedia *_EncycloChar;
CCharacterAchievements *_AchievementsChar;
CCharacterGameEvent *_GameEvent; CCharacterGameEvent *_GameEvent;
CCharacterRespawnPoints *_RespawnPoints; CCharacterRespawnPoints *_RespawnPoints;

@ -1,90 +0,0 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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 <http://www.gnu.org/licenses/>.
//-----------------------------------------------------------------------------
// 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
}

@ -1,78 +0,0 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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 <http://www.gnu.org/licenses/>.
#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

@ -1980,8 +1980,6 @@ bool CCharacterActions::dispatchXpGain( TDataSetRow actor, TDataSetRow creatureR
// compute xp gain on creature, cap xp gain per player to MaxXPGainPerPlayer // compute xp gain on creature, cap xp gain per player to MaxXPGainPerPlayer
const float xpGainPerOpponent = min( MaxXPGainPerPlayer.get(), float(xpFactor * maxXPGain / equivalentXpMembers) ); const float xpGainPerOpponent = min( MaxXPGainPerPlayer.get(), float(xpFactor * maxXPGain / equivalentXpMembers) );
c->mobKill(creatureRowId);
TSkillProgressPerOpponentContainer::iterator it = _SkillProgressPerOpponent.find( creatureRowId ); TSkillProgressPerOpponentContainer::iterator it = _SkillProgressPerOpponent.find( creatureRowId );
if( it != _SkillProgressPerOpponent.end() ) if( it != _SkillProgressPerOpponent.end() )
{ {

@ -67,6 +67,8 @@ function domain_management_hook_get_db()
{ {
global $domain_management_return_set; global $domain_management_return_set;
try {
$db = new DBLayer( 'shard' ); $db = new DBLayer( 'shard' );
//get all domains //get all domains
@ -91,6 +93,10 @@ function domain_management_hook_get_db()
} }
return $rows; return $rows;
} catch (Exception $e) {
return null;
}
} }
/** /**

Loading…
Cancel
Save