mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
* change the kill faction hits display before the xp message not after.
* removed the double level gain messages to display once either the level gained or the level. * implement the message "You will now lose experience when you die" and "Your items will no longer stay with you..." when reach a certain level already sets in the rule table.
This commit is contained in:
parent
6fad93aeee
commit
cc2a60feb2
@ -2144,6 +2144,10 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack
|
|||||||
if(give_exp && give_exp->IsClient())
|
if(give_exp && give_exp->IsClient())
|
||||||
give_exp_client = give_exp->CastToClient();
|
give_exp_client = give_exp->CastToClient();
|
||||||
|
|
||||||
|
//do faction hits even if we are a merchant, so long as a player killed us
|
||||||
|
if (give_exp_client && !RuleB(NPC, EnableMeritBasedFaction))
|
||||||
|
hate_list.DoFactionHits(GetNPCFactionID());
|
||||||
|
|
||||||
bool IsLdonTreasure = (this->GetClass() == LDON_TREASURE);
|
bool IsLdonTreasure = (this->GetClass() == LDON_TREASURE);
|
||||||
if (give_exp_client && !IsCorpse())
|
if (give_exp_client && !IsCorpse())
|
||||||
{
|
{
|
||||||
@ -2287,10 +2291,6 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//do faction hits even if we are a merchant, so long as a player killed us
|
|
||||||
if(give_exp_client && !RuleB(NPC, EnableMeritBasedFaction))
|
|
||||||
hate_list.DoFactionHits(GetNPCFactionID());
|
|
||||||
|
|
||||||
if (!HasOwner() && !IsMerc() && class_ != MERCHANT && class_ != ADVENTUREMERCHANT && !GetSwarmInfo()
|
if (!HasOwner() && !IsMerc() && class_ != MERCHANT && class_ != ADVENTUREMERCHANT && !GetSwarmInfo()
|
||||||
&& MerchantType == 0 && killer && (killer->IsClient() || (killer->HasOwner() && killer->GetUltimateOwner()->IsClient()) ||
|
&& MerchantType == 0 && killer && (killer->IsClient() || (killer->HasOwner() && killer->GetUltimateOwner()->IsClient()) ||
|
||||||
(killer->IsNPC() && killer->CastToNPC()->GetSwarmInfo() && killer->CastToNPC()->GetSwarmInfo()->GetOwner() && killer->CastToNPC()->GetSwarmInfo()->GetOwner()->IsClient())))
|
(killer->IsNPC() && killer->CastToNPC()->GetSwarmInfo() && killer->CastToNPC()->GetSwarmInfo()->GetOwner() && killer->CastToNPC()->GetSwarmInfo()->GetOwner()->IsClient())))
|
||||||
|
|||||||
28
zone/exp.cpp
28
zone/exp.cpp
@ -268,12 +268,17 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
|||||||
//this ammount of exp (once these loops complete)
|
//this ammount of exp (once these loops complete)
|
||||||
uint16 check_level = GetLevel()+1;
|
uint16 check_level = GetLevel()+1;
|
||||||
//see if we gained any levels
|
//see if we gained any levels
|
||||||
|
bool level_increase = true;
|
||||||
|
int8 level_count = 0;
|
||||||
|
|
||||||
while (set_exp >= GetEXPForLevel(check_level)) {
|
while (set_exp >= GetEXPForLevel(check_level)) {
|
||||||
check_level++;
|
check_level++;
|
||||||
if (check_level > 127) { //hard level cap
|
if (check_level > 127) { //hard level cap
|
||||||
check_level = 127;
|
check_level = 127;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
level_count++;
|
||||||
|
|
||||||
if(GetMercID())
|
if(GetMercID())
|
||||||
UpdateMercLevel();
|
UpdateMercLevel();
|
||||||
}
|
}
|
||||||
@ -284,6 +289,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
|||||||
check_level = 2;
|
check_level = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
level_increase = false;
|
||||||
if(GetMercID())
|
if(GetMercID())
|
||||||
UpdateMercLevel();
|
UpdateMercLevel();
|
||||||
}
|
}
|
||||||
@ -364,17 +370,21 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
|||||||
|
|
||||||
if ((GetLevel() != check_level) && !(check_level >= maxlevel)) {
|
if ((GetLevel() != check_level) && !(check_level >= maxlevel)) {
|
||||||
char val1[20]={0};
|
char val1[20]={0};
|
||||||
if (GetLevel() == check_level-1){
|
if (level_increase)
|
||||||
Message_StringID(MT_Experience, GAIN_LEVEL,ConvertArray(check_level,val1));
|
{
|
||||||
SendLevelAppearance();
|
if (level_count == 1)
|
||||||
/* Message(15, "You have gained a level! Welcome to level %i!", check_level); */
|
Message_StringID(MT_Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
|
||||||
}
|
else
|
||||||
if (GetLevel() == check_level){
|
Message(15, "Welcome to level %i!", check_level);
|
||||||
Message_StringID(MT_Experience, LOSE_LEVEL,ConvertArray(check_level,val1));
|
|
||||||
/* Message(15, "You lost a level! You are now level %i!", check_level); */
|
if (check_level == RuleI(Character, DeathItemLossLevel))
|
||||||
|
Message_StringID(15, CORPSE_ITEM_LOST);
|
||||||
|
|
||||||
|
if (check_level == RuleI(Character, DeathExpLossLevel))
|
||||||
|
Message_StringID(15, CORPSE_EXP_LOST);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Message(15, "Welcome to level %i!", check_level);
|
Message_StringID(MT_Experience, LOSE_LEVEL, ConvertArray(check_level, val1));
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
uint8 myoldlevel = GetLevel();
|
uint8 myoldlevel = GetLevel();
|
||||||
|
|||||||
@ -231,6 +231,8 @@
|
|||||||
#define MISSED_NOTE_OTHER 1219 //A missed note brings %1's song to a close!
|
#define MISSED_NOTE_OTHER 1219 //A missed note brings %1's song to a close!
|
||||||
#define SPELL_LEVEL_REQ 1226 //This spell only works on people who are level %1 and under.
|
#define SPELL_LEVEL_REQ 1226 //This spell only works on people who are level %1 and under.
|
||||||
#define CORPSE_DECAY_NOW 1227 //This corpse is waiting to expire.
|
#define CORPSE_DECAY_NOW 1227 //This corpse is waiting to expire.
|
||||||
|
#define CORPSE_ITEM_LOST 1228 //Your items will no longer stay with you when you respawn on death. You will now need to return to your corpse for your items.
|
||||||
|
#define CORPSE_EXP_LOST 1229 //You will now lose experience when you die.
|
||||||
#define SURNAME_REJECTED 1374 //Your new surname was rejected. Please try a different name.
|
#define SURNAME_REJECTED 1374 //Your new surname was rejected. Please try a different name.
|
||||||
#define DUEL_DECLINE 1383 //%1 has declined your challenge to duel to the death.
|
#define DUEL_DECLINE 1383 //%1 has declined your challenge to duel to the death.
|
||||||
#define DUEL_ACCEPTED 1384 //%1 has already accepted a duel with someone else.
|
#define DUEL_ACCEPTED 1384 //%1 has already accepted a duel with someone else.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user