mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 00:32:25 +00:00
explicit conversion to uint32)
This commit is contained in:
parent
ead1b1d63d
commit
d07114b7d7
@ -6030,7 +6030,7 @@ void command_wpadd(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
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);
|
||||
if (tmp_grid)
|
||||
t->CastToNPC()->SetGrid(tmp_grid);
|
||||
|
||||
@ -3669,8 +3669,8 @@ Corpse *EntityList::GetClosestCorpse(Mob *sender, const char *Name)
|
||||
if (Name && strcasecmp(CurrentCorpse->GetOwnerName(), Name))
|
||||
continue;
|
||||
|
||||
CurrentDistance = ((CurrentCorpse->GetY() - sender->GetY()) * (CurrentCorpse->GetY() - sender->GetY())) +
|
||||
((CurrentCorpse->GetX() - sender->GetX()) * (CurrentCorpse->GetX() - sender->GetX()));
|
||||
CurrentDistance = (int32)(((CurrentCorpse->GetY() - sender->GetY()) * (CurrentCorpse->GetY() - sender->GetY())) +
|
||||
((CurrentCorpse->GetX() - sender->GetX()) * (CurrentCorpse->GetX() - sender->GetX())));
|
||||
|
||||
if (CurrentDistance < ClosestDistance) {
|
||||
ClosestDistance = CurrentDistance;
|
||||
@ -4528,8 +4528,8 @@ Mob *EntityList::GetClosestMobByBodyType(Mob *sender, bodyType BodyType)
|
||||
if (CurrentMob->GetBodyType() != BodyType)
|
||||
continue;
|
||||
|
||||
CurrentDistance = ((CurrentMob->GetY() - sender->GetY()) * (CurrentMob->GetY() - sender->GetY())) +
|
||||
((CurrentMob->GetX() - sender->GetX()) * (CurrentMob->GetX() - sender->GetX()));
|
||||
CurrentDistance = (uint32)(((CurrentMob->GetY() - sender->GetY()) * (CurrentMob->GetY() - sender->GetY())) +
|
||||
((CurrentMob->GetX() - sender->GetX()) * (CurrentMob->GetX() - sender->GetX())));
|
||||
|
||||
if (CurrentDistance < ClosestDistance) {
|
||||
ClosestDistance = CurrentDistance;
|
||||
|
||||
@ -178,8 +178,8 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
|
||||
|
||||
if(RuleB(Zone, LevelBasedEXPMods)){
|
||||
if(zone->level_exp_mod[GetLevel()].ExpMod){
|
||||
add_exp *= zone->level_exp_mod[GetLevel()].ExpMod;
|
||||
add_aaxp *= zone->level_exp_mod[GetLevel()].AAExpMod;
|
||||
add_exp = (uint32)(add_exp * zone->level_exp_mod[GetLevel()].ExpMod);
|
||||
add_aaxp = (uint32)(add_aaxp * zone->level_exp_mod[GetLevel()].AAExpMod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -604,7 +604,7 @@ int32 Mob::CalcMaxMana() {
|
||||
|
||||
int32 Mob::CalcMaxHP() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -901,7 +901,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
action->source = caster ? caster->GetID() : GetID();
|
||||
action->level = 65;
|
||||
action->instrument_mod = 10;
|
||||
action->sequence = (GetHeading() * 12345 / 2);
|
||||
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||
action->type = 231;
|
||||
action->spell = spell_id;
|
||||
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->level = 65;
|
||||
action->instrument_mod = 10;
|
||||
action->sequence = (GetHeading() * 12345 / 2);
|
||||
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||
action->type = 231;
|
||||
action->spell = spell_id;
|
||||
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->level = 65;
|
||||
action->instrument_mod = 10;
|
||||
action->sequence = (GetHeading() * 12345 / 2);
|
||||
action->sequence = (uint32)(GetHeading() * 12345 / 2);
|
||||
action->type = 231;
|
||||
action->spell = spell_id;
|
||||
action->buff_unknown = 4;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user