diff options
54 files changed, 111 insertions, 111 deletions
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 3bc1c569889..ee1dddc966a 100644 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -2573,10 +2573,11 @@ bool ChatHandler::HandleListItemCommand(const char *args) } char* c_count = strtok(NULL, " "); - int count = c_count ? atol(c_count) : 10; + int _count = c_count ? atol(c_count) : 10; - if (count < 0) + if (_count < 0) return false; + uint32 count = uint32(_count); QueryResult_AutoPtr result; @@ -2591,7 +2592,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) "SELECT ci.item, cibag.slot AS bag, ci.slot, ci.guid, characters.account,characters.name " "FROM character_inventory AS ci LEFT JOIN character_inventory AS cibag ON (cibag.item=ci.bag),characters " "WHERE ci.item_template='%u' AND ci.guid = characters.guid LIMIT %u ", - item_id,uint32(count)); + item_id, count); if (result) { @@ -2619,7 +2620,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) item_guid,owner_name.c_str(),owner_guid,owner_acc,item_pos); } while (result->NextRow()); - int64 res_count = result->GetRowCount(); + uint32 res_count = uint32(result->GetRowCount()); if (count > res_count) count-=res_count; @@ -2640,7 +2641,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) "SELECT mail_items.item_guid, mail.sender, mail.receiver, char_s.account, char_s.name, char_r.account, char_r.name " "FROM mail,mail_items,characters as char_s,characters as char_r " "WHERE mail_items.item_template='%u' AND char_s.guid = mail.sender AND char_r.guid = mail.receiver AND mail.id=mail_items.mail_id LIMIT %u", - item_id,uint32(count)); + item_id, count); } else result = QueryResult_AutoPtr(NULL); @@ -2664,7 +2665,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) item_guid,item_s_name.c_str(),item_s,item_s_acc,item_r_name.c_str(),item_r,item_r_acc,item_pos); } while (result->NextRow()); - int64 res_count = result->GetRowCount(); + uint32 res_count = uint32(result->GetRowCount()); if (count > res_count) count-=res_count; @@ -2684,7 +2685,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) // 0 1 2 3 "SELECT auctionhouse.itemguid, auctionhouse.itemowner, characters.account, characters.name " "FROM auctionhouse,characters WHERE auctionhouse.item_template='%u' AND characters.guid = auctionhouse.itemowner LIMIT %u", - item_id,uint32(count)); + item_id, count); } else result = QueryResult_AutoPtr(NULL); @@ -2715,7 +2716,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) // 0 1 2 "SELECT gi.item_guid, gi.guildid, guild.name " "FROM guild_bank_item AS gi, guild WHERE gi.item_entry='%u' AND gi.guildid = guild.guildid LIMIT %u ", - item_id,uint32(count)); + item_id, count); if (result) { @@ -2731,7 +2732,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) PSendSysMessage(LANG_ITEMLIST_GUILD,item_guid,guild_name.c_str(),guild_guid,item_pos); } while (result->NextRow()); - int64 res_count = result->GetRowCount(); + uint32 res_count = uint32(result->GetRowCount()); if (count > res_count) count-=res_count; @@ -6112,10 +6113,10 @@ bool ChatHandler::HandlePDumpWriteCommand(const char *args) if (!file || !p2) return false; - uint32 guid; + uint64 guid; // character name can't start from number if (isNumeric(p2)) - guid = atoi(p2); + guid = MAKE_NEW_GUID(atoi(p2), 0, HIGHGUID_PLAYER); else { std::string name = extractPlayerNameFromLink(p2); diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 97414c35529..5a35e0b537a 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -93,7 +93,7 @@ void CreatureGroupManager::LoadCreatureFormations() return; } - uint32 total_records = result->GetRowCount(); + uint64 total_records = result->GetRowCount(); barGoLink bar(total_records); Field *fields; @@ -145,7 +145,7 @@ void CreatureGroupManager::LoadCreatureFormations() while (result->NextRow()) ; sLog.outString(); - sLog.outString(">> Loaded %u creatures in formations", total_records); + sLog.outString(">> Loaded " UI64FMTD " creatures in formations", total_records); sLog.outString(); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 161addda839..1c4c19a77eb 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11085,9 +11085,9 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint scripted = true; int32 apBonus = int32(std::max(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAttackPowerValue(RANGED_ATTACK))); if (apBonus > DoneAdvertisedBenefit) - DoneTotal += apBonus * 0.22f; // 22% of AP per tick + DoneTotal += int32(apBonus * 0.22f); // 22% of AP per tick else - DoneTotal += DoneAdvertisedBenefit * 0.377f; //37.7% of BH per tick + DoneTotal += int32(DoneAdvertisedBenefit * 0.377f); //37.7% of BH per tick } // Earthliving - 0.45% of normal hot coeff else if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000) diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 3245776508d..f286ddf3e2c 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -223,7 +223,7 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse) CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY()); uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord; - sObjectMgr.DeleteCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID()); + sObjectMgr.DeleteCorpseCellData(corpse->GetMapId(), cell_id, GUID_LOPART(corpse->GetOwnerGUID())); i_player2corpse.erase(iter); } @@ -244,7 +244,7 @@ void ObjectAccessor::AddCorpse(Corpse* corpse) CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY()); uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord; - sObjectMgr.AddCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID(), corpse->GetInstanceId()); + sObjectMgr.AddCorpseCellData(corpse->GetMapId(), cell_id, GUID_LOPART(corpse->GetOwnerGUID()), corpse->GetInstanceId()); } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 880044ff760..aa6b348e4c9 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1499,7 +1499,7 @@ float GridMap::getLiquidLevel(float x, float y) uint8 GridMap::getTerrainType(float x, float y) { if (!m_liquid_type) - return m_liquidType; + return 0; x = 16 * (32 - x/SIZE_OF_GRIDS); y = 16 * (32 - y/SIZE_OF_GRIDS); diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 078d272f62a..d2d5a84cf3a 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -55,9 +55,8 @@ void WaypointStore::Load() } WaypointPath* path_data = NULL; - uint32 total_records = result->GetRowCount(); - barGoLink bar(total_records); + barGoLink bar(result->GetRowCount()); uint32 count = 0; Field *fields; uint32 last_id = 0; diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index e5025aa5bd0..e47e5e917d9 100644 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -562,7 +562,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult_AutoPtr result, std::string friendNote) { uint64 friendGuid; - uint64 friendAcctid; + uint32 friendAcctid; uint32 team; FriendsResult friendResult; @@ -697,7 +697,7 @@ void WorldSession::HandleSetContactNotesOpcode(WorldPacket & recv_data) uint64 guid; std::string note; recv_data >> guid >> note; - _player->GetSocial()->SetFriendNote(guid, note); + _player->GetSocial()->SetFriendNote(GUID_LOPART(guid), note); } void WorldSession::HandleBugOpcode(WorldPacket & recv_data) diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index e81cc59e0ff..05a6685105b 100644 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -157,9 +157,9 @@ void WorldSession::HandleMoveWorldportAckOpcode() { if (mapDiff->resetTime) { - if (uint32 timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff)) + if (time_t timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff)) { - uint32 timeleft = timeReset - time(NULL); + uint32 timeleft = uint32(timeReset - time(NULL)); GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft); } } diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp index da52ead96d0..19af7e18b01 100644 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp @@ -263,14 +263,14 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) // result == NULL also correct in case no sign yet if (result) - signs = result->GetRowCount(); + signs = uint8(result->GetRowCount()); sLog.outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low); WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12)); data << uint64(petitionguid); // petition guid data << uint64(_player->GetGUID()); // owner guid - data << uint32(petitionguid_low); // guild guid (in mangos always same as GUID_LOPART(petitionguid) + data << uint32(petitionguid_low); // guild guid data << uint8(signs); // sign's count for (uint8 i = 1; i <= signs; ++i) @@ -279,7 +279,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) uint64 plguid = fields2[0].GetUInt64(); data << uint64(plguid); // Player GUID - data << (uint32)0; // there 0 ... + data << uint32(0); // there 0 ... result->NextRow(); } @@ -664,12 +664,12 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) result = CharacterDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE petitionguid = '%u'", GUID_LOPART(petitionguid)); // result == NULL also correct charter without signs if (result) - signs = result->GetRowCount(); + signs = uint8(result->GetRowCount()); WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+signs+signs*12)); data << uint64(petitionguid); // petition guid data << uint64(_player->GetGUID()); // owner guid - data << uint32(GUID_LOPART(petitionguid)); // guild guid (in mangos always same as GUID_LOPART(petition guid) + data << uint32(GUID_LOPART(petitionguid)); // guild guid data << uint8(signs); // sign's count for (uint8 i = 1; i <= signs; ++i) @@ -678,7 +678,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) plguid = fields2[0].GetUInt64(); data << uint64(plguid); // Player GUID - data << (uint32)0; // there 0 ... + data << uint32(0); // there 0 ... result->NextRow(); } @@ -750,7 +750,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) uint8 signs; result = CharacterDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE petitionguid = '%u'", GUID_LOPART(petitionguid)); if (result) - signs = result->GetRowCount(); + signs = uint8(result->GetRowCount()); else signs = 0; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index aa6e3ee8c7c..3c70bfe4914 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1858,7 +1858,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const //maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG SpellNonMeleeDamage damageInfo(caster, target, spellProto->Id, spellProto->SchoolMask); //no SpellDamageBonus for burn mana - caster->CalculateSpellDamageTaken(&damageInfo, gain * dmgMultiplier, spellProto); + caster->CalculateSpellDamageTaken(&damageInfo, int32(gain * dmgMultiplier), spellProto); caster->DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb); @@ -4974,7 +4974,7 @@ void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const * aurA float percent = target->GetHealthPct(); target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(GetAmount()), apply); if (target->isAlive()) - target->SetHealth(target->CountPctFromMaxHealth(percent)); + target->SetHealth(target->CountPctFromMaxHealth(int32(percent))); } void AuraEffect::HandleAuraIncreaseBaseHealthPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp index 83c736f3229..02bbd92c431 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -57,7 +57,7 @@ public: void SummonSpirits(Unit* victim) { - if (Creature *Spirit = DoSpawnCreature(9178, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) + if (Creature *Spirit = DoSpawnCreature(9178, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) Spirit->AI()->AttackStart(victim); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp index 2b483b4ae43..5ed1b85787e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp @@ -67,13 +67,13 @@ public: void SummonAdds(Unit* victim) { - if (Creature *SummonedAdd = DoSpawnCreature(8901, irand(-14,14), irand(-14,14), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + if (Creature *SummonedAdd = DoSpawnCreature(8901, float(irand(-14,14)), float(irand(-14,14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) SummonedAdd->AI()->AttackStart(victim); } void SummonMedics(Unit* victim) { - if (Creature *SummonedMedic = DoSpawnCreature(8894, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + if (Creature *SummonedMedic = DoSpawnCreature(8894, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) SummonedMedic->AI()->AttackStart(victim); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 00d80f06771..a8210e2bae3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -131,7 +131,7 @@ public: if (AddTimer <= diff) { //Summon Astral Flare - Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); Unit *pTarget = NULL; pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 3cfb2669127..7cfec5403b0 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -205,7 +205,7 @@ public: uint64 axes[2]; uint64 enfeeble_targets[5]; - uint64 enfeeble_health[5]; + uint32 enfeeble_health[5]; uint32 phase; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 70c70a643a0..db9c87bd2f8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -683,7 +683,7 @@ public: if (CycloneTimer <= diff) { - if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, urand(0,9), urand(0,9), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0,9)), float(urand(0,9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true); CycloneTimer = 30000; } else CycloneTimer -= diff; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 13a19e8cb63..3e8038a465b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -254,7 +254,6 @@ public: case TYPE_NIGHTBANE: return m_auiEncounter[11]; case DATA_OPERA_PERFORMANCE: return m_uiOperaEvent; case DATA_OPERA_OZ_DEATHCOUNT: return m_uiOzDeathCount; - case DATA_IMAGE_OF_MEDIVH: return ImageGUID; } return 0; @@ -278,6 +277,7 @@ public: case DATA_GO_NETHER_DOOR: return m_uiNetherspaceDoor; case DATA_MASTERS_TERRACE_DOOR_1: return MastersTerraceDoor[0]; case DATA_MASTERS_TERRACE_DOOR_2: return MastersTerraceDoor[1]; + case DATA_IMAGE_OF_MEDIVH: return ImageGUID; } return 0; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp index 446bab0a1b2..d9f1041c0e0 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp @@ -67,7 +67,7 @@ public: { m_uiPyroblastTimer = 7*IN_MILLISECONDS; // These timers are probably wrong m_uiEarthquakeTimer = 3*IN_MILLISECONDS; - m_uiBuffTimer = 2.5*IN_MILLISECONDS; + m_uiBuffTimer = 2500; m_bEnraged = false; DoCast(me, SPELL_MAGMASPLASH, true); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 3ea9ce2aec5..893e381c821 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -571,7 +571,7 @@ public: SaySound(SAY_REJOINED); DoCast(me, SPELL_HEAD); caster->GetMotionMaster()->Clear(false); - caster->GetMotionMaster()->MoveFollow(me,6,urand(0,5)); + caster->GetMotionMaster()->MoveFollow(me,6,float(urand(0,5))); //DoResetThreat();//not sure if need std::list<HostileReference*>::const_iterator itr; for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr) @@ -594,7 +594,7 @@ public: me->SetName("Headless Horseman, Unhorsed"); if (!headGUID) - headGUID = DoSpawnCreature(HEAD,rand()%6,rand()%6,0,0,TEMPSUMMON_DEAD_DESPAWN,0)->GetGUID(); + headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6),0,0,TEMPSUMMON_DEAD_DESPAWN,0)->GetGUID(); Unit* Head = Unit::GetUnit((*me), headGUID); if (Head && Head->isAlive()) { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 605071cc641..13031669248 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -65,7 +65,7 @@ public: void SummonIllusions(Unit* victim) { - if (Creature *Illusion = DoSpawnCreature(11439, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) + if (Creature *Illusion = DoSpawnCreature(11439, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) Illusion->AI()->AttackStart(victim); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 2524113d668..218da0357aa 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -63,13 +63,13 @@ public: void SummonMinions(Unit* victim) { - if (Creature *SummonedMinion = DoSpawnCreature(16119, irand(-7,7), irand(-7,7), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + if (Creature *SummonedMinion = DoSpawnCreature(16119, float(irand(-7,7)), float(irand(-7,7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) SummonedMinion->AI()->AttackStart(victim); } void SummonMages(Unit* victim) { - if (Creature *SummonedMage = DoSpawnCreature(16120, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) + if (Creature *SummonedMage = DoSpawnCreature(16120, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000)) SummonedMage->AI()->AttackStart(victim); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index dc74b1757a4..d3a4ca0e041 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -75,7 +75,7 @@ public: void RaiseUndeadScarab(Unit* pVictim) { - if (Creature* pUndeadScarab = DoSpawnCreature(10876, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) if (pUndeadScarab->AI()) pUndeadScarab->AI()->AttackStart(pVictim); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 2fdc3d3b843..7fde694879f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -338,7 +338,7 @@ public: break; case TIMER_HUMANOIDES: for (uint8 i = 0; i < 6; ++i) - me->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0); + me->SummonCreature(uint32(Humanoides[i][0]),Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0); Timer[TIMER_HUMANOIDES] = 60000; break; case TIMER_PHASE: @@ -547,7 +547,7 @@ public: void JustDied(Unit* /*killer*/) { for (uint8 i = 0; i < 8; ++i) - me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); + me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 61aed76f1a8..dfd3fb87868 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -223,8 +223,8 @@ class boss_akilzon : public CreatureScript z = me->GetPositionZ(); for (uint8 i = 0; i < 5+rand()%5; ++i) { - x = 343+rand()%60; - y = 1380+rand()%60; + x = 343.0f+rand()%60; + y = 1380.0f+rand()%60; if (Unit *trigger = me->SummonTrigger(x, y, z, 0, 2000)) { trigger->setFaction(35); @@ -368,7 +368,7 @@ class boss_akilzon : public CreatureScript y = pTarget->GetPositionY() + irand(-10,10); z = pTarget->GetPositionZ() + urand(16,20); if (z > 95) - z = 95 - urand(0,5); + z = 95.0f - urand(0,5); } Creature *pCreature = me->SummonCreature(MOB_SOARING_EAGLE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); if (pCreature) @@ -407,7 +407,7 @@ class mob_akilzon_eagle : public CreatureScript uint32 EagleSwoop_Timer; bool arrived; - uint32 TargetGUID; + uint64 TargetGUID; void Reset() { @@ -452,7 +452,7 @@ class mob_akilzon_eagle : public CreatureScript y = pTarget->GetPositionY() + irand(-10,10); z = pTarget->GetPositionZ() + urand(10,15); if (z > 95) - z = 95 - urand(0,5); + z = 95.0f - urand(0,5); } else { diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 5823b135a2d..b403e6bfb77 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -223,8 +223,8 @@ class boss_janalai : public CreatureScript float dx, dy; for (int i(0); i < 40; ++i) { - dx = irand(-area_dx/2, area_dx/2); - dy = irand(-area_dy/2, area_dy/2); + dx = float(irand(-area_dx/2, area_dx/2)); + dy = float(irand(-area_dy/2, area_dy/2)); Creature* bomb = DoSpawnCreature(MOB_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); if (bomb) FireBombGUIDs[i] = bomb->GetGUID(); @@ -638,9 +638,9 @@ class mob_janalai_hatchling : public CreatureScript { BuffetTimer = 7000; if (me->GetPositionY() > 1150) - me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0]+rand()%4-2,1150+rand()%4-2,hatcherway[0][3][2]); + me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0]+rand()%4-2,1150.0f+rand()%4-2,hatcherway[0][3][2]); else - me->GetMotionMaster()->MovePoint(0,hatcherway[1][3][0]+rand()%4-2,1150+rand()%4-2,hatcherway[1][3][2]); + me->GetMotionMaster()->MovePoint(0, hatcherway[1][3][0]+rand()%4-2,1150.0f+rand()%4-2,hatcherway[1][3][2]); me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); } diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 430266952cc..75a0084d12c 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -78,7 +78,7 @@ public: void SummonHounds(Unit* pVictim) { - if (Creature *Hound = DoSpawnCreature(19207, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) + if (Creature *Hound = DoSpawnCreature(19207, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) Hound->AI()->AttackStart(pVictim); } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 5c4fb5264d1..ff4475f2678 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -555,7 +555,7 @@ public: if (SummonWispTimer <= diff) { - DoSpawnCreature(CREATURE_ANCIENT_WISP, rand()%40, rand()%40, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoSpawnCreature(CREATURE_ANCIENT_WISP, float(rand()%40), float(rand()%40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); SummonWispTimer = 1500; ++WispCount; } else SummonWispTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 182891a5ea2..7715e39b64b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -720,7 +720,7 @@ void hyjalAI::DeSpawnVeins() if (!ai)return; for (uint8 i = 0; i<7; ++i) { - if (GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i]))) + if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i])) gem->Delete(); } } else if (Faction) @@ -731,7 +731,7 @@ void hyjalAI::DeSpawnVeins() if (!ai)return; for (uint8 i = 7; i<14; ++i) { - if (GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i]))) + if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i])) gem->Delete(); } } diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index 1399704979f..7319d8a4cd0 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -63,7 +63,7 @@ public: void SummonAdds(Unit* pVictim) { - if (Creature *Add = DoSpawnCreature(13456, irand(-7,7), irand(-7,7), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000)) + if (Creature *Add = DoSpawnCreature(13456, float(irand(-7,7)), float(irand(-7,7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000)) Add->AI()->AttackStart(pVictim); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 6fe01a99f5f..06a74f6c912 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -730,7 +730,7 @@ public: if (pUnit && i->second == true) { //Teleport each player out - DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, rand()%6); + DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6)); //Cast knockback on them DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true); @@ -767,7 +767,7 @@ public: if (pUnit->IsWithinDist3d(&KickPos, 15.0f)) { //Teleport each player out - DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, rand()%6); + DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6)); //Cast knockback on them DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index cf00031ebac..309f4b91019 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -55,8 +55,8 @@ public: uint32 SpawnHatchlings_Timer; uint32 SpawnSpawns_Timer; int Rand; - int RandX; - int RandY; + float RandX; + float RandY; Creature* Hatchling; Creature* Spawn; @@ -76,15 +76,15 @@ public: Rand = 10 + (rand()%10); switch (rand()%2) { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; + case 0: RandX = 0.0f - Rand; break; + case 1: RandX = 0.0f + Rand; break; } Rand = 0; Rand = 10 + (rand()%10); switch (rand()%2) { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; + case 0: RandY = 0.0f - Rand; break; + case 1: RandY = 0.0f + Rand; break; } Rand = 0; Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 6552d008143..2b8b590022d 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -314,7 +314,7 @@ public: if (pyramidSpawns[i][0] == (float)wave) { Position pos = {pyramidSpawns[i][2], pyramidSpawns[i][3], 8.87f, 0}; - TempSummon* ts = instance->SummonCreature(pyramidSpawns[i][1],pos); + TempSummon* ts = instance->SummonCreature(uint32(pyramidSpawns[i][1]),pos); ts->GetMotionMaster()->MoveRandom(10); addsAtBase.push_back(ts->GetGUID()); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 1097c1b97ef..e78f70590ec 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -319,7 +319,7 @@ public: if (Creature *pImpaleTarget = DoSummonImpaleTarget(target)) me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false); } - uiPoundTimer = 16.5f*IN_MILLISECONDS; + uiPoundTimer = 16500; } else uiPoundTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 4db4526d5bb..544c77829bb 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -77,7 +77,7 @@ public: uiBellowingRoarTimer = 33*IN_MILLISECONDS; uiGrievousBiteTimer = 20*IN_MILLISECONDS; - uiManglingSlashTimer = 18.5*IN_MILLISECONDS; + uiManglingSlashTimer = 18500; uiFearsomeRoarTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS); uiPiercingSlashTimer = 17*IN_MILLISECONDS; uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index ade2633d05e..e647e7532de 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -82,7 +82,7 @@ public: void Reset() { uiConsumeTimer = 15*IN_MILLISECONDS; - uiAuraCountTimer = 15.5f*IN_MILLISECONDS; + uiAuraCountTimer = 15500; uiCrushTimer = urand(1*IN_MILLISECONDS,5*IN_MILLISECONDS); uiInfectedWoundTimer = urand(60*IN_MILLISECONDS,10*IN_MILLISECONDS); uiExplodeCorpseTimer = 3*IN_MILLISECONDS; diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index ccc832470e6..11b039e6cad 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -140,7 +140,7 @@ public: void JustSummoned(Creature* pSummon) { if (HealthBelowPct(5)) - pSummon->DealDamage(pSummon, pSummon->GetHealth() * 0.5, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + pSummon->DealDamage(pSummon, uint32(pSummon->GetHealth() * 0.5), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); pSummon->AI()->AttackStart(me->getVictim()); } }; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 1265b755bef..6a2da3e6b5d 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -293,7 +293,7 @@ public: if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { DoCast(pTarget, SPELL_ICE_NOVA, false); - uiCooldown = 1.5f*IN_MILLISECONDS; + uiCooldown = 1500; } uiIceNovaTimer = 15*IN_MILLISECONDS; } else uiIceNovaTimer -= diff; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 12d9ac5569a..8dd7363181f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -243,7 +243,7 @@ public: void Reset() { - SpellCrystalSpikeDamageTimer = 3.7*IN_MILLISECONDS; + SpellCrystalSpikeDamageTimer = 3700; SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS; } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index f2972b22bd6..25c62237830 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -234,7 +234,7 @@ public: { if (uiSplitTimer <= uiDiff) { - uiSplitTimer = 2.5*IN_MILLISECONDS; + uiSplitTimer = 2500; // Return sparks to where Ionar splitted if (bIsSplitPhase) diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index bfaac47683f..9ce5d2ba09d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -155,7 +155,7 @@ public: dmg = DUNGEON_MODE(100, 150); // need to correct damage if (m_fDist > 1.0f) // Further from 1 yard - dmg *= m_fDist; + dmg = int32(dmg*m_fDist); me->CastCustomSpell(i->getSource(), DUNGEON_MODE(52942, 59837), &dmg, 0, 0, false); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index 6a5da06cb21..9762ca7c560 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -482,7 +482,7 @@ public: case EVENT_THORIM_S_HAMMER: // Tower of Storms for (uint8 i = 0; i < 7; ++i) { - if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, urand(20,60), 20000, TEMPSUMMON_TIMED_DESPAWN)) + if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, float(urand(20,60)), 20000, TEMPSUMMON_TIMED_DESPAWN)) pThorim->GetMotionMaster()->MoveRandom(100); } DoScriptText(SAY_TOWER_STORM, me); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index dd2014b167d..8f2b55d659c 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -374,10 +374,10 @@ public: //Some randomes are added so they wont spawn in a pile switch(rand() % 4) { - case 0: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(LR_X - 3, LR_X + 3), irand(LR_Y - 3, LR_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; - case 1: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(LL_X - 3, LL_X + 3), irand(LL_Y - 3, LL_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; - case 2: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(UR_X - 3, UR_X + 3), irand(UR_Y - 3, UR_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; - case 3: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(UL_X - 3, UL_X + 3), irand(UL_Y - 3, UL_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; + case 0: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(LR_X - 3, LR_X + 3)), float(irand(LR_Y - 3, LR_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; + case 1: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(LL_X - 3, LL_X + 3)), float(irand(LL_Y - 3, LL_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; + case 2: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(UR_X - 3, UR_X + 3)), float(irand(UR_Y - 3, UR_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; + case 3: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(UL_X - 3, UL_X + 3)), float(irand(UL_Y - 3, UL_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; } } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index d9ee68c95fc..21639f2e668 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -160,28 +160,28 @@ public: case 0: DoScriptText(SAY_DIALOG_WITH_ARTHAS_1, me); ++uiIntroPhase; - uiIntroTimer = 3.5f*IN_MILLISECONDS; + uiIntroTimer = 3500; break; case 1: DoScriptText(SAY_DIALOG_OF_ARTHAS_1, pArthas); ++uiIntroPhase; - uiIntroTimer = 3.5f*IN_MILLISECONDS; + uiIntroTimer = 3500; break; case 2: DoScriptText(SAY_DIALOG_WITH_ARTHAS_2, me); ++uiIntroPhase; - uiIntroTimer = 3.5f*IN_MILLISECONDS; + uiIntroTimer = 3500; break; case 3: DoScriptText(SAY_DIALOG_OF_ARTHAS_2, pArthas); ++uiIntroPhase; - uiIntroTimer = 3.5f*IN_MILLISECONDS; + uiIntroTimer = 3500; break; case 4: DoScriptText(SAY_DIALOG_WITH_ARTHAS_3, me); DoCast(me, SPELL_SVALA_TRANSFORMING1); ++uiIntroPhase; - uiIntroTimer = 2.8f*IN_MILLISECONDS; + uiIntroTimer = 2800; break; case 5: DoCast(me, SPELL_SVALA_TRANSFORMING2); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index c0847e5cd47..5ad35f231a7 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -271,7 +271,7 @@ public: if (m_bIsActiveWithBJORN && m_uiAbility_BJORN_Timer <= diff) { //DoCast(me, SPELL_SUMMON_SPIRIT_FOUNT); // works fine, but using summon has better control - if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385+rand()%10, -330+rand()%10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000)) + if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385.0f+rand()%10, -330.0f+rand()%10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000)) { pTemp->SetSpeed(MOVE_RUN, 0.4f); pTemp->CastSpell(pTemp, DUNGEON_MODE(SPELL_SPIRIT_FOUNT, H_SPELL_SPIRIT_FOUNT), true); diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index f61d7dfa7f9..d0df1d19391 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -697,27 +697,27 @@ struct violet_hold_trashAI : public npc_escortAI { case 0: if (uiPointId == 5) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; case 1: if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1)) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; case 2: if (uiPointId == 7) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; case 3: if (uiPointId == 8) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; case 4: if (uiPointId == 5) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; case 5: if (uiPointId == 3) - CreatureStartAttackDoor(me->GetGUID()); + CreatureStartAttackDoor(); break; } } @@ -787,7 +787,7 @@ struct violet_hold_trashAI : public npc_escortAI pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1); } - void CreatureStartAttackDoor(uint32 /*creature_guid*/) + void CreatureStartAttackDoor() { me->SetReactState(REACT_PASSIVE); DoCast(SPELL_DESTROY_DOOR_SEAL); diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index cc9ca7df95a..fdc37b32bd5 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -70,7 +70,7 @@ public: void InitializeAI() { float x, y, z; - me->GetNearPoint(me, x, y, z, 1, 100, M_PI*2*rand_norm()); + me->GetNearPoint(me, x, y, z, 1, 100, float(M_PI*2*rand_norm())); me->GetMotionMaster()->MovePoint(0, x, y, z); me->SetVisibility(VISIBILITY_OFF); me->CastSpell(me,SPELL_MOLTEN_FLAME,true); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 7340ff34af1..b63dfdcbd4a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -688,7 +688,7 @@ public: { //DoCast(me, SPELL_SUMMON_CYCLONE); // Doesn't work Cyclone_Timer = 30000+rand()%10000; - Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000); + Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000); if (Cyclone) { CAST_CRE(Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index d80ce007fd5..08a39b3cfb5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -271,7 +271,7 @@ public: Map::PlayerList const &PlayerList = pMap->GetPlayers(); for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->getSource() && i->getSource()->isAlive() && me->HasInArc((double)diff/20000*(double)M_PI*2,i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater()) + if (i->getSource() && i->getSource()->isAlive() && me->HasInArc(float(diff/20000*M_PI*2),i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater()) DoCast(i->getSource(), SPELL_SPOUT, true);//only knock back palyers in arc, in 100yards, not in water } } diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp index 795991bcafb..9c0b2490da6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -76,9 +76,9 @@ public: if (Mushroom_Timer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); else - me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); Mushroom_Timer = 10000; } else Mushroom_Timer -= diff; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index d8b00f62306..665312bcf3e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -234,8 +234,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript { //move in bladedance float x,y,randx,randy; - randx = (rand()%40); - randy = (rand()%40); + randx = 0.0f + rand()%40; + randy = 0.0f + rand()%40; x = 210+ randx ; y = -60- randy ; me->GetMotionMaster()->MovePoint(1,x,y,me->GetPositionZ()); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index d913ec28aeb..f62d9723c9d 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -290,7 +290,7 @@ class boss_alar : public CreatureScript float dist = 3.0f; if (me->IsWithinDist3d(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f)) dist = 5.0f; - WaitTimer = 1000 + floor(dist / 80 * 1000.0f); + WaitTimer = 1000 + uint32(floor(dist / 80 * 1000.0f)); me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f); me->StopMoving(); WaitEvent = WE_LAND; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index abfc717df4a..71e0f82fff7 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -188,7 +188,7 @@ class boss_high_astromancer_solarian : public CreatureScript float Portal_Y(float x, float radius) { - float z = RAND(1, -1); + float z = RAND(1.0f, -1.0f); return (z*sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index bdf7341bcc6..aab6127cefd 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1691,8 +1691,8 @@ public: //Add delta to make them not all hit the same time uint32 delta = (rand() % 7) * 100; - me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta); - me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , Info->attackpower); + me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta)); + me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , float(Info->attackpower)); } //Redefined for random target selection: diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index b8e3eff92a5..4659b082254 100644 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -97,7 +97,7 @@ class DBCStorage result = WorldDatabase.Query(query.c_str()); if (result) { - sqlRecordCount = result->GetRowCount(); + sqlRecordCount = uint32(result->GetRowCount()); if (sql->indexPos >= 0) { fields = result->Fetch(); diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index 2a52e054acd..9a862c6dd81 100644 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -29,7 +29,7 @@ void TCSoapRunnable::run() pool.activate (THR_NEW_LWP | THR_JOINABLE, POOL_SIZE); struct soap soap; - int m, s; + SOCKET m, s; soap_init(&soap); soap_set_imode(&soap, SOAP_C_UTFSTRING); soap_set_omode(&soap, SOAP_C_UTFSTRING); |