Salut tout le monde , je balance en vrac des trucs que j'avais fait pour Netherstorm
Xp Progressif :
formulas.h dans la fonction : inline uint32 Gain (Player *plr , Unit *u)
[code=cpp] if(plvl < 10)
return xp_gain *= 2;
if(plvl < 20 && plvl > 9)
return xp_gain *= 4;
if(plvl < 20 && plvl > 19)
return xp_gain *= 5;
if(plvl < 40 && plvl > 29)
return xp_gain *= 6;
if(plvl < 50 && plvl > 39)
return xp_gain *= 7;
if(plvl < 60 && plvl > 49)
return xp_gain *= 8;
if(plvl < 70 && plvl > 59)
return xp_gain *= 10;
if(plvl < 80 && plvl > 69)
return xp_gain *= 13;[/code]
Xp en pvp :
Player.cpp , changez la fonction RewardSinglePlayerAtKill par :
[code=cpp]void Player::RewardSinglePlayerAtKill(Unit* pVictim)
{
bool PvP = pVictim->isCharmedOwnedByPlayerOrPlayer();
uint32 xp = MaNGOS::XP::Gain(this, pVictim);
// honor and Xp can be in PvP and !PvP (racial leader) cases
RewardHonor(pVictim,1);
GiveXP(xp, pVictim);
if(Pet* pet = GetPet())
pet->GivePetXP(xp);
//reputation only in !PvP case
if(!PvP)
{
RewardReputation(pVictim,1);
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
if(CreatureInfo const* normalInfo = ObjectMgr::GetCreatureTemplate(pVictim->GetEntry()))
KilledMonster(normalInfo, pVictim->GetObjectGuid());
}
}
[/code]
Dans formulas.h
[code=cpp] //Pour éviter d'avoir de l'or a chaque kill lvl 80
if(plvl == 80 && u->isCharmedOwnedByPlayerOrPlayer())
return 0;[/code]
Patch mmaps :
Bon alors je l'ai pas testé mais ça compile sans problème chez moi (il y aura peut être besoin de modif) , je le partage quand même au cas où ça intéresse
Lien
Cordialement
PS: Si j'ai le temps je vais faire en sorte qu'on puisse choisir les rates via les .conf