diff --git a/zone/command.cpp b/zone/command.cpp index 983bfa4b0..6c7aba5d5 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -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); diff --git a/zone/entity.cpp b/zone/entity.cpp index 043524811..1fb5b09b5 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -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; diff --git a/zone/exp.cpp b/zone/exp.cpp index 5e8eb49f8..d807f7ef8 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -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); } } diff --git a/zone/mob.cpp b/zone/mob.cpp index 8d8c29699..c64847a37 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -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; } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 8731dfaab..a9110f361 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -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;