mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 03:07:33 +00:00
explicit conversion to uint32)
This commit is contained in:
+1
-1
@@ -6030,7 +6030,7 @@ void command_wpadd(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strcmp("-h",sep->arg[2]) == 0)
|
if (strcmp("-h",sep->arg[2]) == 0)
|
||||||
heading = c->GetHeading();
|
heading = (int)c->GetHeading();
|
||||||
uint32 tmp_grid = database.AddWPForSpawn(c, s2info->GetID(), c->GetX(),c->GetY(),c->GetZ(), pause, type1, type2, zone->GetZoneID(), heading);
|
uint32 tmp_grid = database.AddWPForSpawn(c, s2info->GetID(), c->GetX(),c->GetY(),c->GetZ(), pause, type1, type2, zone->GetZoneID(), heading);
|
||||||
if (tmp_grid)
|
if (tmp_grid)
|
||||||
t->CastToNPC()->SetGrid(tmp_grid);
|
t->CastToNPC()->SetGrid(tmp_grid);
|
||||||
|
|||||||
+4
-4
@@ -3669,8 +3669,8 @@ Corpse *EntityList::GetClosestCorpse(Mob *sender, const char *Name)
|
|||||||
if (Name && strcasecmp(CurrentCorpse->GetOwnerName(), Name))
|
if (Name && strcasecmp(CurrentCorpse->GetOwnerName(), Name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CurrentDistance = ((CurrentCorpse->GetY() - sender->GetY()) * (CurrentCorpse->GetY() - sender->GetY())) +
|
CurrentDistance = (int32)(((CurrentCorpse->GetY() - sender->GetY()) * (CurrentCorpse->GetY() - sender->GetY())) +
|
||||||
((CurrentCorpse->GetX() - sender->GetX()) * (CurrentCorpse->GetX() - sender->GetX()));
|
((CurrentCorpse->GetX() - sender->GetX()) * (CurrentCorpse->GetX() - sender->GetX())));
|
||||||
|
|
||||||
if (CurrentDistance < ClosestDistance) {
|
if (CurrentDistance < ClosestDistance) {
|
||||||
ClosestDistance = CurrentDistance;
|
ClosestDistance = CurrentDistance;
|
||||||
@@ -4528,8 +4528,8 @@ Mob *EntityList::GetClosestMobByBodyType(Mob *sender, bodyType BodyType)
|
|||||||
if (CurrentMob->GetBodyType() != BodyType)
|
if (CurrentMob->GetBodyType() != BodyType)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CurrentDistance = ((CurrentMob->GetY() - sender->GetY()) * (CurrentMob->GetY() - sender->GetY())) +
|
CurrentDistance = (uint32)(((CurrentMob->GetY() - sender->GetY()) * (CurrentMob->GetY() - sender->GetY())) +
|
||||||
((CurrentMob->GetX() - sender->GetX()) * (CurrentMob->GetX() - sender->GetX()));
|
((CurrentMob->GetX() - sender->GetX()) * (CurrentMob->GetX() - sender->GetX())));
|
||||||
|
|
||||||
if (CurrentDistance < ClosestDistance) {
|
if (CurrentDistance < ClosestDistance) {
|
||||||
ClosestDistance = CurrentDistance;
|
ClosestDistance = CurrentDistance;
|
||||||
|
|||||||
+2
-2
@@ -178,8 +178,8 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
|
|||||||
|
|
||||||
if(RuleB(Zone, LevelBasedEXPMods)){
|
if(RuleB(Zone, LevelBasedEXPMods)){
|
||||||
if(zone->level_exp_mod[GetLevel()].ExpMod){
|
if(zone->level_exp_mod[GetLevel()].ExpMod){
|
||||||
add_exp *= zone->level_exp_mod[GetLevel()].ExpMod;
|
add_exp = (uint32)(add_exp * zone->level_exp_mod[GetLevel()].ExpMod);
|
||||||
add_aaxp *= zone->level_exp_mod[GetLevel()].AAExpMod;
|
add_aaxp = (uint32)(add_aaxp * zone->level_exp_mod[GetLevel()].AAExpMod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -604,7 +604,7 @@ int32 Mob::CalcMaxMana() {
|
|||||||
|
|
||||||
int32 Mob::CalcMaxHP() {
|
int32 Mob::CalcMaxHP() {
|
||||||
max_hp = (base_hp + itembonuses.HP + spellbonuses.HP);
|
max_hp = (base_hp + itembonuses.HP + spellbonuses.HP);
|
||||||
max_hp += max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f);
|
max_hp =(int32)(max_hp+ max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f));
|
||||||
return max_hp;
|
return max_hp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -901,7 +901,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
action->source = caster ? caster->GetID() : GetID();
|
action->source = caster ? caster->GetID() : GetID();
|
||||||
action->level = 65;
|
action->level = 65;
|
||||||
action->instrument_mod = 10;
|
action->instrument_mod = 10;
|
||||||
action->sequence = (GetHeading() * 12345 / 2);
|
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||||
action->type = 231;
|
action->type = 231;
|
||||||
action->spell = spell_id;
|
action->spell = spell_id;
|
||||||
action->buff_unknown = 4;
|
action->buff_unknown = 4;
|
||||||
@@ -950,7 +950,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
action->source = caster ? caster->GetID() : GetID();
|
action->source = caster ? caster->GetID() : GetID();
|
||||||
action->level = 65;
|
action->level = 65;
|
||||||
action->instrument_mod = 10;
|
action->instrument_mod = 10;
|
||||||
action->sequence = (GetHeading() * 12345 / 2);
|
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||||
action->type = 231;
|
action->type = 231;
|
||||||
action->spell = spell_id;
|
action->spell = spell_id;
|
||||||
action->buff_unknown = 4;
|
action->buff_unknown = 4;
|
||||||
@@ -986,7 +986,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
action->source = caster ? caster->GetID() : GetID();
|
action->source = caster ? caster->GetID() : GetID();
|
||||||
action->level = 65;
|
action->level = 65;
|
||||||
action->instrument_mod = 10;
|
action->instrument_mod = 10;
|
||||||
action->sequence = (GetHeading() * 12345 / 2);
|
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||||
action->type = 231;
|
action->type = 231;
|
||||||
action->spell = spell_id;
|
action->spell = spell_id;
|
||||||
action->buff_unknown = 4;
|
action->buff_unknown = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user