Compare commits

...

13 Commits

Author SHA1 Message Date
E Spause a3f21cc9ea Additional fixups. 2017-03-16 13:27:58 -04:00
E Spause 3c9e6d913a Merge remote-tracking branch 'refs/remotes/origin/master' into 2002_fixes 2017-03-16 13:23:56 -04:00
E Spause 9c08d6f25b Fix additional logic cases for merc disbanding. 2017-03-15 07:09:14 -04:00
E Spause f8d000d660 Don't allow disbanding mercs that have their owner in combat if the rule is set. 2017-03-15 06:52:16 -04:00
E Spause b2c6bb4df5 Set default, no-skill value for bash to 1. This is consistent with what demonstar was seeing on live with no skill and slam.
GetBaseDamage is now used for Bash/Slam additionally.
2017-03-15 06:39:57 -04:00
E Spause 542d0795c4 Add rule instead of define for IDLE_WHEN_EMPTY 2017-03-15 06:37:03 -04:00
E Spause c3b7f6d0bf Merge remote-tracking branch 'refs/remotes/origin/master' into 2002_fixes 2017-03-15 06:15:04 -04:00
E Spause 21e53a3cd0 Fix up slam some more 2017-03-15 06:15:01 -04:00
E Spause 3ce99d9f00 Stupid sexy floats 2017-03-14 22:42:14 -04:00
E Spause 598196329d Bash min skill fix 2017-03-14 22:15:22 -04:00
E Spause bbfacd902c Woops 2017-03-13 15:08:20 -04:00
E Spause 5cfb3111a6 SoF-era con system. New rule, UseOldConSystem to disable this functionality. 2017-03-13 15:07:56 -04:00
E Spause 5b674f23bd Merge remote-tracking branch 'refs/remotes/origin/master' into 2002_fixes 2017-03-13 15:05:26 -04:00
13 changed files with 335 additions and 193 deletions
+3
View File
@@ -56,6 +56,7 @@ RULE_REAL(Character, GroupExpMultiplier, 0.5)
RULE_REAL(Character, RaidExpMultiplier, 0.2)
RULE_BOOL(Character, UseXPConScaling, true)
RULE_INT(Character, ShowExpValues, 0) //0 - normal, 1 - Show raw experience values, 2 - Show raw experience values AND percent.
RULE_INT(Character, GreenModifier, 20)
RULE_INT(Character, LightBlueModifier, 40)
RULE_INT(Character, BlueModifier, 90)
RULE_INT(Character, WhiteModifier, 100)
@@ -149,6 +150,7 @@ RULE_INT(Character, AvoidanceCap, 750) // 750 Is a pretty good value, seen peopl
RULE_BOOL(Character, AllowMQTarget, false) // Disables putting players in the 'hackers' list for targeting beyond the clip plane or attempting to target something untargetable
RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound behavior
RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation
RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation
RULE_CATEGORY_END()
RULE_CATEGORY(Mercs)
@@ -264,6 +266,7 @@ RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hour
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
RULE_BOOL(Zone, EnableZoneControllerGlobals, false) // Enables the ability to use quest globals with the zone controller NPC
RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc.
RULE_BOOL(Zone, IdleWhenEmpty, true) // Don't process NPCs while zone is empty. Defaults to true.
RULE_CATEGORY_END()
RULE_CATEGORY(Map)
+6 -6
View File
@@ -158,7 +158,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
if (RuleB(Aggro, UseLevelAggro))
{
if (GetLevel() < 18 && mob->GetLevelCon(GetLevel()) == CON_GREEN && GetBodyType() != 3)
if (GetLevel() < 18 && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3)
{
towho->Message(0, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2);
return;
@@ -166,7 +166,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
}
else
{
if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GREEN ) {
if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GRAY ) {
towho->Message(0, "...%s is red to me (basically)", mob->GetName(),
dist2, iAggroRange2);
return;
@@ -339,7 +339,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
( GetLevel() >= 18 )
||(GetBodyType() == 3)
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
||( mob->GetLevelCon(GetLevel()) != CON_GREEN )
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
)
&&
@@ -372,7 +372,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
(
( GetINT() <= RuleI(Aggro, IntAggroThreshold) )
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
||( mob->GetLevelCon(GetLevel()) != CON_GREEN )
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
)
&&
@@ -449,7 +449,7 @@ int EntityList::GetHatedCount(Mob *attacker, Mob *exclude)
if (mob->IsFeared() || mob->IsMezzed())
continue;
if (attacker->GetLevelCon(mob->GetLevel()) == CON_GREEN)
if (attacker->GetLevelCon(mob->GetLevel()) == CON_GRAY)
continue;
if (!mob->CheckAggro(attacker))
@@ -508,7 +508,7 @@ void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) {
{
//if they are in range, make sure we are not green...
//then jump in if they are our friend
if(mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GREEN)
if(mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY)
{
bool useprimfaction = false;
if(mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction())
+1 -1
View File
@@ -2247,7 +2247,7 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQEmu::skills::Skil
else {
if (!IsLdonTreasure && MerchantType == 0) {
int conlevel = give_exp->GetLevelCon(GetLevel());
if (conlevel != CON_GREEN) {
if (conlevel != CON_GRAY) {
if (!GetOwner() || (GetOwner() && !GetOwner()->IsClient())) {
give_exp_client->AddEXP((finalxp), conlevel);
if (killer_mob && (killer_mob->GetID() == give_exp_client->GetID() || killer_mob->GetUltimateOwner()->GetID() == give_exp_client->GetID()))
+1 -1
View File
@@ -2342,7 +2342,7 @@ bool Client::CheckIncreaseSkill(EQEmu::skills::SkillType skillid, Mob *against_w
if(against_who)
{
if(against_who->GetSpecialAbility(IMMUNE_AGGRO) || against_who->IsClient() ||
GetLevelCon(against_who->GetLevel()) == CON_GREEN)
GetLevelCon(against_who->GetLevel()) == CON_GRAY)
{
//false by default
if( !mod_can_increase_skill(skillid, against_who) ) { return(false); }
+84 -12
View File
@@ -4728,12 +4728,22 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
else
con->faction = 1;
con->level = GetLevelCon(tmob->GetLevel());
if (ClientVersion() <= EQEmu::versions::ClientVersion::Titanium) {
if (con->level == CON_GRAY) {
con->level = CON_GREEN;
}
if (con->level == CON_WHITE) {
con->level = CON_WHITE_TITANIUM;
}
}
if (zone->IsPVPZone()) {
if (!tmob->IsNPC())
con->pvpcon = tmob->CastToClient()->GetPVP();
}
// Mongrel: If we're feigned show NPC as indifferent
// If we're feigned show NPC as indifferent
if (tmob->IsNPC())
{
if (GetFeigned())
@@ -4779,6 +4789,7 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
case CON_BLUE:
color = 4;
break;
case CON_WHITE_TITANIUM:
case CON_WHITE:
color = 10;
break;
@@ -4788,7 +4799,17 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
case CON_RED:
color = 13;
break;
case CON_GRAY:
color = 6;
break;
}
if (ClientVersion() <= EQEmu::versions::ClientVersion::Titanium) {
if (color == 6) {
color = 2;
}
}
SendColoredText(color, std::string("This creature would take an army to defeat!"));
}
safe_delete(outapp);
@@ -6528,9 +6549,30 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
if (group->GroupCount() < 3)
{
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
if (!RuleB(Mercs, AllowMercSuspendInCombat)) {
if (GetMerc())
{
Mob* mercOwner = GetMerc()->GetOwner();
if (mercOwner && mercOwner->IsClient()) {
if (mercOwner->CastToClient()->CheckCanSpawnMerc(mercOwner->CastToClient()->GetMercInfo().MercTemplateID)) {
group->DisbandGroup();
GetMerc()->Suspend();
}
}
}
else
{
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
}
}
else
{
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
}
}
else if (group->IsLeader(this) && GetTarget() == nullptr)
{
@@ -6541,9 +6583,30 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
}
else
{
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
if (!RuleB(Mercs, AllowMercSuspendInCombat)) {
if (GetMerc())
{
Mob* mercOwner = GetMerc()->GetOwner();
if (mercOwner && mercOwner->IsClient()) {
if (mercOwner->CastToClient()->CheckCanSpawnMerc(mercOwner->CastToClient()->GetMercInfo().MercTemplateID)) {
group->DisbandGroup();
GetMerc()->Suspend();
}
}
}
else
{
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
}
}
else {
group->DisbandGroup();
if (GetMerc())
GetMerc()->Suspend();
}
}
}
else if (group->IsLeader(this) && (GetTarget() == this || memberToDisband == this))
@@ -6561,8 +6624,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
if (group->IsLeader(this))
{
// the group leader can kick other members out of the group...
if (memberToDisband->IsClient())
{
if (memberToDisband->IsClient()) {
group->DelMember(memberToDisband, false);
Client* memberClient = memberToDisband->CastToClient();
Merc* memberMerc = memberToDisband->CastToClient()->GetMerc();
@@ -6571,9 +6633,19 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
memberMerc->MercJoinClientGroup();
}
}
else if (memberToDisband->IsMerc())
{
memberToDisband->CastToMerc()->Suspend();
else if (memberToDisband->IsMerc()) {
//Can only remove mercs that aren't in combat if the rule is set.
if (!RuleB(Mercs, AllowMercSuspendInCombat)) {
Mob* mercOwner = memberToDisband->CastToMerc()->GetOwner();
if (mercOwner && mercOwner->IsClient()) {
if (mercOwner->CastToClient()->CheckCanSpawnMerc(mercOwner->CastToClient()->GetMercInfo().MercTemplateID)) {
memberToDisband->CastToMerc()->Suspend();
}
}
}
else {
memberToDisband->CastToMerc()->Suspend();
}
}
}
else
+3 -1
View File
@@ -31,9 +31,11 @@
#define CON_GREEN 2
#define CON_LIGHTBLUE 18
#define CON_BLUE 4
#define CON_WHITE 20
#define CON_WHITE 10
#define CON_WHITE_TITANIUM 20
#define CON_YELLOW 15
#define CON_RED 13
#define CON_GRAY 6
#define DMG_BLOCKED -1
#define DMG_PARRIED -2
+9 -7
View File
@@ -408,10 +408,10 @@ void EntityList::RaidProcess()
void EntityList::DoorProcess()
{
#ifdef IDLE_WHEN_EMPTY
if (numclients < 1)
return;
#endif
if (RuleB(Zone, IdleWhenEmpty)) {
if (numclients < 1)
return;
}
if (door_list.empty()) {
net.door_timer.Disable();
return;
@@ -477,7 +477,7 @@ void EntityList::MobProcess()
size_t sz = mob_list.size();
#ifdef IDLE_WHEN_EMPTY
if (RuleB(Zone, IdleWhenEmpty)) {
if (numclients > 0 ||
mob->GetWanderType() == 4 || mob->GetWanderType() == 6) {
// Normal processing, or assuring that spawns that should
@@ -490,9 +490,11 @@ void EntityList::MobProcess()
// At the very least, process that.
mob_dead = mob->CastToNPC()->GetDepop();
}
#else
}
else
{
mob_dead = !mob->Process();
#endif
}
size_t a_sz = mob_list.size();
if(a_sz > sz) {
+11 -4
View File
@@ -101,9 +101,12 @@ uint32 Client::CalcEXP(uint8 conlevel) {
if (conlevel != 0xFF) {
switch (conlevel)
{
case CON_GREEN:
case CON_GRAY:
in_add_exp = 0;
return 0;
case CON_GREEN:
in_add_exp = in_add_exp * RuleI(Character, GreenModifier) / 100;
break;
case CON_LIGHTBLUE:
in_add_exp = in_add_exp * RuleI(Character, LightBlueModifier)/100;
break;
@@ -206,10 +209,14 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
if (conlevel != 0xFF && !resexp) {
switch (conlevel)
{
case CON_GREEN:
case CON_GRAY:
add_exp = 0;
add_aaxp = 0;
return;
case CON_GREEN:
add_exp = add_exp * RuleI(Character, GreenModifier) / 100;
add_aaxp = add_aaxp * RuleI(Character, GreenModifier) / 100;
break;
case CON_LIGHTBLUE:
add_exp = add_exp * RuleI(Character, LightBlueModifier)/100;
add_aaxp = add_aaxp * RuleI(Character, LightBlueModifier)/100;
@@ -798,7 +805,7 @@ void Group::SplitExp(uint32 exp, Mob* other) {
groupexp += (uint32)((float)exp * groupmod * (RuleR(Character, GroupExpMultiplier)));
int conlevel = Mob::GetLevelCon(maxlevel, other->GetLevel());
if(conlevel == CON_GREEN)
if(conlevel == CON_GRAY)
return; //no exp for greenies...
if (membercount == 0)
@@ -845,7 +852,7 @@ void Raid::SplitExp(uint32 exp, Mob* other) {
groupexp = (uint32)((float)groupexp * (1.0f-(RuleR(Character, RaidExpMultiplier))));
int conlevel = Mob::GetLevelCon(maxlevel, other->GetLevel());
if(conlevel == CON_GREEN)
if(conlevel == CON_GRAY)
return; //no exp for greenies...
if (membercount == 0)
+4 -1
View File
@@ -72,9 +72,12 @@ void Mob::CheckFlee() {
float run_ratio;
switch(con) {
//these values are not 100% researched
case CON_GREEN:
case CON_GRAY:
run_ratio = fleeratio;
break;
case CON_GREEN:
run_ratio = fleeratio * 9 / 10;
break;
case CON_LIGHTBLUE:
run_ratio = fleeratio * 9 / 10;
break;
+7 -1
View File
@@ -4293,8 +4293,14 @@ bool Merc::CheckConfidence() {
CurrentCon = this->GetLevelCon(mob->GetLevel());
switch(CurrentCon) {
case CON_GREEN: {
case CON_GRAY: {
ConRating = 0;
break;
}
case CON_GREEN: {
ConRating = 0.1;
break;
}
+1 -1
View File
@@ -530,7 +530,7 @@ public:
//AI
static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel);
inline uint32 GetLevelCon(uint8 iOtherLevel) const {
return this ? GetLevelCon(GetLevel(), iOtherLevel) : CON_GREEN; }
return this ? GetLevelCon(GetLevel(), iOtherLevel) : CON_GRAY; }
virtual void AddToHateList(Mob* other, uint32 hate = 0, int32 damage = 0, bool iYellForHelp = true,
bool bFrenzy = false, bool iBuffTic = false, uint16 spell_id = SPELL_UNKNOWN);
bool RemoveFromHateList(Mob* mob);
+202 -152
View File
@@ -2024,166 +2024,216 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
}
uint32 Mob::GetLevelCon(uint8 mylevel, uint8 iOtherLevel) {
int16 diff = iOtherLevel - mylevel;
uint32 conlevel=0;
if (diff == 0)
return CON_WHITE;
else if (diff >= 1 && diff <= 2)
return CON_YELLOW;
else if (diff >= 3)
return CON_RED;
uint32 conlevel = 0;
if (mylevel <= 8)
if (RuleB(Character, UseOldConSystem))
{
if (diff <= -4)
conlevel = CON_GREEN;
int16 diff = iOtherLevel - mylevel;
if (diff == 0)
return CON_WHITE;
else if (diff >= 1 && diff <= 2)
return CON_YELLOW;
else if (diff >= 3)
return CON_RED;
if (mylevel <= 8)
{
if (diff <= -4)
conlevel = CON_GRAY;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 9)
{
if (diff <= -6)
conlevel = CON_GRAY;
else if (diff <= -4)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 13)
{
if (diff <= -7)
conlevel = CON_GRAY;
else if (diff <= -5)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 15)
{
if (diff <= -7)
conlevel = CON_GRAY;
else if (diff <= -5)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 17)
{
if (diff <= -8)
conlevel = CON_GRAY;
else if (diff <= -6)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 21)
{
if (diff <= -9)
conlevel = CON_GRAY;
else if (diff <= -7)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 25)
{
if (diff <= -10)
conlevel = CON_GRAY;
else if (diff <= -8)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 29)
{
if (diff <= -11)
conlevel = CON_GRAY;
else if (diff <= -9)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 31)
{
if (diff <= -12)
conlevel = CON_GRAY;
else if (diff <= -9)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 33)
{
if (diff <= -13)
conlevel = CON_GRAY;
else if (diff <= -10)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 37)
{
if (diff <= -14)
conlevel = CON_GRAY;
else if (diff <= -11)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 41)
{
if (diff <= -16)
conlevel = CON_GRAY;
else if (diff <= -12)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 45)
{
if (diff <= -17)
conlevel = CON_GRAY;
else if (diff <= -13)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 49)
{
if (diff <= -18)
conlevel = CON_GRAY;
else if (diff <= -14)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 53)
{
if (diff <= -19)
conlevel = CON_GRAY;
else if (diff <= -15)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 55)
{
if (diff <= -20)
conlevel = CON_GRAY;
else if (diff <= -15)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else
conlevel = CON_BLUE;
}
else if (mylevel <= 9)
{
if (diff <= -6)
conlevel = CON_GREEN;
else if (diff <= -4)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 13)
{
if (diff <= -7)
conlevel = CON_GREEN;
else if (diff <= -5)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 15)
{
if (diff <= -7)
conlevel = CON_GREEN;
else if (diff <= -5)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 17)
{
if (diff <= -8)
conlevel = CON_GREEN;
else if (diff <= -6)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 21)
{
if (diff <= -9)
conlevel = CON_GREEN;
else if (diff <= -7)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 25)
{
if (diff <= -10)
conlevel = CON_GREEN;
else if (diff <= -8)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 29)
{
if (diff <= -11)
conlevel = CON_GREEN;
else if (diff <= -9)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 31)
{
if (diff <= -12)
conlevel = CON_GREEN;
else if (diff <= -9)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 33)
{
if (diff <= -13)
conlevel = CON_GREEN;
else if (diff <= -10)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 37)
{
if (diff <= -14)
conlevel = CON_GREEN;
else if (diff <= -11)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 41)
{
if (diff <= -16)
conlevel = CON_GREEN;
else if (diff <= -12)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 45)
{
if (diff <= -17)
conlevel = CON_GREEN;
else if (diff <= -13)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 49)
{
if (diff <= -18)
conlevel = CON_GREEN;
else if (diff <= -14)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 53)
{
if (diff <= -19)
conlevel = CON_GREEN;
else if (diff <= -15)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
else if (mylevel <= 55)
{
if (diff <= -20)
conlevel = CON_GREEN;
else if (diff <= -15)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
{
if (diff <= -21)
conlevel = CON_GRAY;
else if (diff <= -16)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
}
else
{
if (diff <= -21)
conlevel = CON_GREEN;
else if (diff <= -16)
conlevel = CON_LIGHTBLUE;
int16 diff = iOtherLevel - mylevel;
uint32 conGrayLvl = mylevel - (int32)((mylevel + 5) / 3);
uint32 conGreenLvl = mylevel - (int32)((mylevel + 7) / 4);
if (diff == 0)
return CON_WHITE;
else if (diff >= 1 && diff <= 3)
return CON_YELLOW;
else if (diff >= 4)
return CON_RED;
if (mylevel <= 15)
{
if (diff <= -6)
conlevel = CON_GRAY;
else
conlevel = CON_BLUE;
}
else
conlevel = CON_BLUE;
if (mylevel <= 20)
{
if (iOtherLevel <= conGrayLvl)
conlevel = CON_GRAY;
else
if (iOtherLevel <= conGreenLvl)
conlevel = CON_GREEN;
else
conlevel = CON_BLUE;
}
else
{
if (iOtherLevel <= conGrayLvl)
conlevel = CON_GRAY;
else
if (iOtherLevel <= conGreenLvl)
conlevel = CON_GREEN;
else
if (diff <= -6)
conlevel = CON_LIGHTBLUE;
else
conlevel = CON_BLUE;
}
}
return conlevel;
}
+3 -6
View File
@@ -96,6 +96,7 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target)
ac_bonus = inst->GetItemArmorClass(true) / 25.0f;
else
return 0; // return 0 in cases where we don't have an item
if (ac_bonus > skill_bonus)
ac_bonus = skill_bonus;
return static_cast<int>(ac_bonus + skill_bonus);
@@ -301,15 +302,11 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
ca_atk->m_skill == EQEmu::skills::SkillBash) { // SLAM - Bash without a shield equipped
if (GetTarget() != this) {
CheckIncreaseSkill(EQEmu::skills::SkillBash, GetTarget(), 10);
//CheckIncreaseSkill(EQEmu::skills::SkillBash, GetTarget(), 10);
DoAnim(animTailRake);
int32 ht = 0;
if (GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::inventory::slotSecondary)) <= 0 &&
GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::inventory::slotShoulders)) <= 0)
dmg = -5;
else
ht = dmg = GetBaseSkillDamage(EQEmu::skills::SkillBash, GetTarget());
ht = dmg = GetBaseSkillDamage(EQEmu::skills::SkillBash, GetTarget());
ReuseTime = BashReuseTime - 1 - skill_reduction;
ReuseTime = (ReuseTime * HasteMod) / 100;