mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Client] Remove unimplemented Client Insight Method. (#2663)
* [Cleanup] Remove unused Insight Method, and cleanup Magic Numbers * change emu->NPC back to 0, not Doug
This commit is contained in:
-330
@@ -3595,336 +3595,6 @@ float Client::CalcPriceMod(Mob* other, bool reverse)
|
||||
return chaformula; //Returns 1.10, expensive stuff!
|
||||
}
|
||||
|
||||
//neat idea from winter's roar, not implemented
|
||||
void Client::Insight(uint32 t_id)
|
||||
{
|
||||
Mob* who = entity_list.GetMob(t_id);
|
||||
if (!who)
|
||||
return;
|
||||
if (!who->IsNPC())
|
||||
{
|
||||
Message(0,"This ability can only be used on NPCs.");
|
||||
return;
|
||||
}
|
||||
if (Distance(static_cast<glm::vec3>(m_Position), static_cast<glm::vec3>(who->GetPosition())) > 200)
|
||||
{
|
||||
Message(0,"You must get closer to your target!");
|
||||
return;
|
||||
}
|
||||
if (!CheckLosFN(who))
|
||||
{
|
||||
Message(0,"You must be able to see your target!");
|
||||
return;
|
||||
}
|
||||
char hitpoints[64];
|
||||
char resists[320];
|
||||
char dmg[64];
|
||||
memset(hitpoints,0,sizeof(hitpoints));
|
||||
memset(resists,0,sizeof(resists));
|
||||
memset(dmg,0,sizeof(dmg));
|
||||
//Start with HP blah
|
||||
int avg_hp = GetLevelHP(who->GetLevel());
|
||||
int cur_hp = who->GetHP();
|
||||
if (cur_hp == avg_hp)
|
||||
{
|
||||
strn0cpy(hitpoints,"averagely tough",32);
|
||||
}
|
||||
else if (cur_hp >= avg_hp*5)
|
||||
{
|
||||
strn0cpy(hitpoints,"extremely tough",32);
|
||||
}
|
||||
else if (cur_hp >= avg_hp*4)
|
||||
{
|
||||
strn0cpy(hitpoints,"exceptionally tough",32);
|
||||
}
|
||||
else if (cur_hp >= avg_hp*3)
|
||||
{
|
||||
strn0cpy(hitpoints,"very tough",32);
|
||||
}
|
||||
else if (cur_hp >= avg_hp*2)
|
||||
{
|
||||
strn0cpy(hitpoints,"quite tough",32);
|
||||
}
|
||||
else if (cur_hp >= avg_hp*1.25)
|
||||
{
|
||||
strn0cpy(hitpoints,"rather tough",32);
|
||||
}
|
||||
else if (cur_hp > avg_hp)
|
||||
{
|
||||
strn0cpy(hitpoints,"slightly tough",32);
|
||||
}
|
||||
else if (cur_hp <= avg_hp*0.20)
|
||||
{
|
||||
strn0cpy(hitpoints,"extremely frail",32);
|
||||
}
|
||||
else if (cur_hp <= avg_hp*0.25)
|
||||
{
|
||||
strn0cpy(hitpoints,"exceptionally frail",32);
|
||||
}
|
||||
else if (cur_hp <= avg_hp*0.33)
|
||||
{
|
||||
strn0cpy(hitpoints,"very frail",32);
|
||||
}
|
||||
else if (cur_hp <= avg_hp*0.50)
|
||||
{
|
||||
strn0cpy(hitpoints,"quite frail",32);
|
||||
}
|
||||
else if (cur_hp <= avg_hp*0.75)
|
||||
{
|
||||
strn0cpy(hitpoints,"rather frail",32);
|
||||
}
|
||||
else if (cur_hp < avg_hp)
|
||||
{
|
||||
strn0cpy(hitpoints,"slightly frail",32);
|
||||
}
|
||||
|
||||
int avg_dmg = who->CastToNPC()->GetMaxDamage(who->GetLevel());
|
||||
int cur_dmg = who->CastToNPC()->GetMaxDMG();
|
||||
if (cur_dmg == avg_dmg)
|
||||
{
|
||||
strn0cpy(dmg,"averagely strong",32);
|
||||
}
|
||||
else if (cur_dmg >= avg_dmg*4)
|
||||
{
|
||||
strn0cpy(dmg,"extremely strong",32);
|
||||
}
|
||||
else if (cur_dmg >= avg_dmg*3)
|
||||
{
|
||||
strn0cpy(dmg,"exceptionally strong",32);
|
||||
}
|
||||
else if (cur_dmg >= avg_dmg*2)
|
||||
{
|
||||
strn0cpy(dmg,"very strong",32);
|
||||
}
|
||||
else if (cur_dmg >= avg_dmg*1.25)
|
||||
{
|
||||
strn0cpy(dmg,"quite strong",32);
|
||||
}
|
||||
else if (cur_dmg >= avg_dmg*1.10)
|
||||
{
|
||||
strn0cpy(dmg,"rather strong",32);
|
||||
}
|
||||
else if (cur_dmg > avg_dmg)
|
||||
{
|
||||
strn0cpy(dmg,"slightly strong",32);
|
||||
}
|
||||
else if (cur_dmg <= avg_dmg*0.20)
|
||||
{
|
||||
strn0cpy(dmg,"extremely weak",32);
|
||||
}
|
||||
else if (cur_dmg <= avg_dmg*0.25)
|
||||
{
|
||||
strn0cpy(dmg,"exceptionally weak",32);
|
||||
}
|
||||
else if (cur_dmg <= avg_dmg*0.33)
|
||||
{
|
||||
strn0cpy(dmg,"very weak",32);
|
||||
}
|
||||
else if (cur_dmg <= avg_dmg*0.50)
|
||||
{
|
||||
strn0cpy(dmg,"quite weak",32);
|
||||
}
|
||||
else if (cur_dmg <= avg_dmg*0.75)
|
||||
{
|
||||
strn0cpy(dmg,"rather weak",32);
|
||||
}
|
||||
else if (cur_dmg < avg_dmg)
|
||||
{
|
||||
strn0cpy(dmg,"slightly weak",32);
|
||||
}
|
||||
|
||||
//Resists
|
||||
int res;
|
||||
int i = 1;
|
||||
|
||||
//MR
|
||||
res = who->GetResist(i);
|
||||
i++;
|
||||
if (res >= 1000)
|
||||
{
|
||||
strcat(resists,"immune");
|
||||
}
|
||||
else if (res >= 500)
|
||||
{
|
||||
strcat(resists,"practically immune");
|
||||
}
|
||||
else if (res >= 250)
|
||||
{
|
||||
strcat(resists,"exceptionally resistant");
|
||||
}
|
||||
else if (res >= 150)
|
||||
{
|
||||
strcat(resists,"very resistant");
|
||||
}
|
||||
else if (res >= 100)
|
||||
{
|
||||
strcat(resists,"fairly resistant");
|
||||
}
|
||||
else if (res >= 50)
|
||||
{
|
||||
strcat(resists,"averagely resistant");
|
||||
}
|
||||
else if (res >= 25)
|
||||
{
|
||||
strcat(resists,"weakly resistant");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(resists,"barely resistant");
|
||||
}
|
||||
strcat(resists," to magic, ");
|
||||
|
||||
//FR
|
||||
res = who->GetResist(i);
|
||||
i++;
|
||||
if (res >= 1000)
|
||||
{
|
||||
strcat(resists,"immune");
|
||||
}
|
||||
else if (res >= 500)
|
||||
{
|
||||
strcat(resists,"practically immune");
|
||||
}
|
||||
else if (res >= 250)
|
||||
{
|
||||
strcat(resists,"exceptionally resistant");
|
||||
}
|
||||
else if (res >= 150)
|
||||
{
|
||||
strcat(resists,"very resistant");
|
||||
}
|
||||
else if (res >= 100)
|
||||
{
|
||||
strcat(resists,"fairly resistant");
|
||||
}
|
||||
else if (res >= 50)
|
||||
{
|
||||
strcat(resists,"averagely resistant");
|
||||
}
|
||||
else if (res >= 25)
|
||||
{
|
||||
strcat(resists,"weakly resistant");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(resists,"barely resistant");
|
||||
}
|
||||
strcat(resists," to fire, ");
|
||||
|
||||
//CR
|
||||
res = who->GetResist(i);
|
||||
i++;
|
||||
if (res >= 1000)
|
||||
{
|
||||
strcat(resists,"immune");
|
||||
}
|
||||
else if (res >= 500)
|
||||
{
|
||||
strcat(resists,"practically immune");
|
||||
}
|
||||
else if (res >= 250)
|
||||
{
|
||||
strcat(resists,"exceptionally resistant");
|
||||
}
|
||||
else if (res >= 150)
|
||||
{
|
||||
strcat(resists,"very resistant");
|
||||
}
|
||||
else if (res >= 100)
|
||||
{
|
||||
strcat(resists,"fairly resistant");
|
||||
}
|
||||
else if (res >= 50)
|
||||
{
|
||||
strcat(resists,"averagely resistant");
|
||||
}
|
||||
else if (res >= 25)
|
||||
{
|
||||
strcat(resists,"weakly resistant");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(resists,"barely resistant");
|
||||
}
|
||||
strcat(resists," to cold, ");
|
||||
|
||||
//PR
|
||||
res = who->GetResist(i);
|
||||
i++;
|
||||
if (res >= 1000)
|
||||
{
|
||||
strcat(resists,"immune");
|
||||
}
|
||||
else if (res >= 500)
|
||||
{
|
||||
strcat(resists,"practically immune");
|
||||
}
|
||||
else if (res >= 250)
|
||||
{
|
||||
strcat(resists,"exceptionally resistant");
|
||||
}
|
||||
else if (res >= 150)
|
||||
{
|
||||
strcat(resists,"very resistant");
|
||||
}
|
||||
else if (res >= 100)
|
||||
{
|
||||
strcat(resists,"fairly resistant");
|
||||
}
|
||||
else if (res >= 50)
|
||||
{
|
||||
strcat(resists,"averagely resistant");
|
||||
}
|
||||
else if (res >= 25)
|
||||
{
|
||||
strcat(resists,"weakly resistant");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(resists,"barely resistant");
|
||||
}
|
||||
strcat(resists," to poison, and ");
|
||||
|
||||
//MR
|
||||
res = who->GetResist(i);
|
||||
i++;
|
||||
if (res >= 1000)
|
||||
{
|
||||
strcat(resists,"immune");
|
||||
}
|
||||
else if (res >= 500)
|
||||
{
|
||||
strcat(resists,"practically immune");
|
||||
}
|
||||
else if (res >= 250)
|
||||
{
|
||||
strcat(resists,"exceptionally resistant");
|
||||
}
|
||||
else if (res >= 150)
|
||||
{
|
||||
strcat(resists,"very resistant");
|
||||
}
|
||||
else if (res >= 100)
|
||||
{
|
||||
strcat(resists,"fairly resistant");
|
||||
}
|
||||
else if (res >= 50)
|
||||
{
|
||||
strcat(resists,"averagely resistant");
|
||||
}
|
||||
else if (res >= 25)
|
||||
{
|
||||
strcat(resists,"weakly resistant");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(resists,"barely resistant");
|
||||
}
|
||||
strcat(resists," to disease.");
|
||||
|
||||
Message(0,"Your target is a level %i %s. It appears %s and %s for its level. It seems %s",who->GetLevel(),GetClassIDName(who->GetClass(),1),dmg,hitpoints,resists);
|
||||
}
|
||||
|
||||
void Client::GetGroupAAs(GroupLeadershipAA_Struct *into) const {
|
||||
memcpy(into, &m_pp.leader_abilities.group, sizeof(GroupLeadershipAA_Struct));
|
||||
}
|
||||
|
||||
@@ -1010,7 +1010,6 @@ public:
|
||||
bool CheckTradeLoreConflict(Client* other);
|
||||
bool CheckTradeNonDroppable();
|
||||
void LinkDead();
|
||||
void Insight(uint32 t_id);
|
||||
bool CheckDoubleAttack();
|
||||
bool CheckTripleAttack();
|
||||
bool CheckDoubleRangedAttack();
|
||||
|
||||
@@ -4057,37 +4057,6 @@ void Mob::SetNextIncHPEvent( int inchpevent )
|
||||
nextinchpevent = inchpevent;
|
||||
}
|
||||
|
||||
int16 Mob::GetResist(uint8 type) const
|
||||
{
|
||||
if (IsNPC())
|
||||
{
|
||||
if (type == 1)
|
||||
return MR + spellbonuses.MR + itembonuses.MR;
|
||||
else if (type == 2)
|
||||
return FR + spellbonuses.FR + itembonuses.FR;
|
||||
else if (type == 3)
|
||||
return CR + spellbonuses.CR + itembonuses.CR;
|
||||
else if (type == 4)
|
||||
return PR + spellbonuses.PR + itembonuses.PR;
|
||||
else if (type == 5)
|
||||
return DR + spellbonuses.DR + itembonuses.DR;
|
||||
}
|
||||
else if (IsClient())
|
||||
{
|
||||
if (type == 1)
|
||||
return CastToClient()->GetMR();
|
||||
else if (type == 2)
|
||||
return CastToClient()->GetFR();
|
||||
else if (type == 3)
|
||||
return CastToClient()->GetCR();
|
||||
else if (type == 4)
|
||||
return CastToClient()->GetPR();
|
||||
else if (type == 5)
|
||||
return CastToClient()->GetDR();
|
||||
}
|
||||
return 25;
|
||||
}
|
||||
|
||||
uint32 Mob::GetLevelHP(uint8 tlevel)
|
||||
{
|
||||
int multiplier = 0;
|
||||
|
||||
@@ -1229,7 +1229,6 @@ public:
|
||||
bool CheckWillAggro(Mob *mob);
|
||||
|
||||
void InstillDoubt(Mob *who);
|
||||
int16 GetResist(uint8 type) const;
|
||||
bool Charmed() const { return typeofpet == petCharmed; }
|
||||
static uint32 GetLevelHP(uint8 tlevel);
|
||||
uint32 GetZoneID() const; //for perl
|
||||
|
||||
+3
-3
@@ -2955,13 +2955,13 @@ uint32 NPC::GetSpawnPointID() const
|
||||
|
||||
void NPC::NPCSlotTexture(uint8 slot, uint16 texture)
|
||||
{
|
||||
if (slot == 7) {
|
||||
if (slot == EQ::invslot::slotNeck) {
|
||||
d_melee_texture1 = texture;
|
||||
}
|
||||
else if (slot == 8) {
|
||||
else if (slot == EQ::invslot::slotBack) {
|
||||
d_melee_texture2 = texture;
|
||||
}
|
||||
else if (slot < 6) {
|
||||
else if (slot < EQ::invslot::slotShoulders) {
|
||||
// Reserved for texturing individual armor slots
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2953,7 +2953,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
LogSpells("Spells the same but newer is higher or equal level, overwriting");
|
||||
return 1;
|
||||
}
|
||||
} else if (spellid1 == 2751) {
|
||||
} else if (spellid1 == SPELL_MANA_BURN) {
|
||||
LogSpells("Blocking spell because manaburn does not stack with itself");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user