[7918] Improve portability in work with uint64 string format specifiers and in code literals.

* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
  I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
  Please always use UI64LIT(0x00001) instead less portable 0x00001LL
This commit is contained in:
VladimirMangos 2009-05-30 22:37:31 +04:00
parent e8cd008005
commit 2a27a44e2a
36 changed files with 372 additions and 362 deletions

View file

@ -34,7 +34,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
sLog.outDebug("Inspect Arena stats " I64FMTD, guid);
sLog.outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
if(Player *plr = objmgr.GetPlayer(guid))
{

View file

@ -606,7 +606,8 @@ void WorldSession::HandleAuctionListItems( WorldPacket & recv_data )
AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap( pCreature->getFaction() );
//sLog.outDebug("Auctionhouse search guid: " I64FMTD ", list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u", guid, listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
//sLog.outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
WorldPacket data( SMSG_AUCTION_LIST_RESULT, (4+4+4) );
uint32 count = 0;

View file

@ -682,6 +682,6 @@ void AuctionEntry::SaveToDB() const
{
//No SQL injection (no strings)
CharacterDatabase.PExecute("INSERT INTO auctionhouse (id,auctioneerguid,itemguid,item_template,itemowner,buyoutprice,time,buyguid,lastbid,startbid,deposit) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '" I64FMTD "', '%u', '%u', '%u', '%u')",
"VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u')",
Id, auctioneer, item_guidlow, item_template, owner, buyout, (uint64)expire_time, bidder, bid, startbid, deposit);
}

View file

@ -465,7 +465,7 @@ void BattleGround::SendPacketToAll(WorldPacket *packet)
if (plr)
plr->GetSession()->SendPacket(packet);
else
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
}
}
@ -477,7 +477,7 @@ void BattleGround::SendPacketToTeam(uint32 TeamID, WorldPacket *packet, Player *
if (!plr)
{
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
@ -509,7 +509,7 @@ void BattleGround::PlaySoundToTeam(uint32 SoundID, uint32 TeamID)
if (!plr)
{
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
@ -532,7 +532,7 @@ void BattleGround::CastSpellOnTeam(uint32 SpellID, uint32 TeamID)
if (!plr)
{
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
@ -552,7 +552,7 @@ void BattleGround::RewardHonorToTeam(uint32 Honor, uint32 TeamID)
if (!plr)
{
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
@ -577,7 +577,7 @@ void BattleGround::RewardReputationToTeam(uint32 faction_id, uint32 Reputation,
if (!plr)
{
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
@ -676,7 +676,7 @@ void BattleGround::EndBattleGround(uint32 winner)
else
loser_arena_team->OfflineMemberLost(itr->first, winner_rating);
}
sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
sLog.outError("BattleGround: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}

View file

@ -143,7 +143,7 @@ void BattleGroundEY::CheckSomeoneJoinedPoint()
Player *plr = objmgr.GetPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
if (!plr)
{
sLog.outError("BattleGroundEY: Player " I64FMTD " not found!", m_PlayersNearPoint[EY_POINTS_MAX][j]);
sLog.outError("BattleGroundEY: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
++j;
continue;
}
@ -183,7 +183,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint()
Player *plr = objmgr.GetPlayer(m_PlayersNearPoint[i][j]);
if (!plr)
{
sLog.outError("BattleGroundEY: Player " I64FMTD " not found!", m_PlayersNearPoint[i][j]);
sLog.outError("BattleGroundEY: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);

View file

@ -38,7 +38,7 @@ void WorldSession::HandleBattlemasterHelloOpcode( WorldPacket & recv_data )
uint64 guid;
recv_data >> guid;
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from: " I64FMT, guid);
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
@ -93,7 +93,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
BattleGroundTypeId bgTypeId = BattleGroundTypeId(bgTypeId_);
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from: " I64FMT, guid);
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
// can do this, since it's battleground, not arena
BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, 0);

View file

@ -1188,7 +1188,7 @@ void BattleGroundMgr::Update(uint32 diff)
{
DistributeArenaPoints();
m_NextAutoDistributionTime = time_t(sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = '"I64FMTD"'", uint64(m_NextAutoDistributionTime));
CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = '"UI64FMTD"'", uint64(m_NextAutoDistributionTime));
}
m_AutoDistributionTimeChecker = 600000; // check 10 minutes
}
@ -1759,7 +1759,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution()
{
sLog.outDebug("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now.");
m_NextAutoDistributionTime = time_t(sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ('"I64FMTD"')", uint64(m_NextAutoDistributionTime));
CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ('"UI64FMTD"')", uint64(m_NextAutoDistributionTime));
}
else
{

View file

@ -70,7 +70,7 @@ bool LoginQueryHolder::Initialize()
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADREPUTATION, "SELECT faction,standing,flags FROM character_reputation WHERE guid = '%u'", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, "SELECT data,bag,slot,item,item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag,slot", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADACTIONS, "SELECT button,action,type,misc FROM character_action WHERE guid = '%u' ORDER BY button", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILCOUNT, "SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" I64FMTD "'", GUID_LOPART(m_guid),(uint64)time(NULL));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILCOUNT, "SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(m_guid),(uint64)time(NULL));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILDATE, "SELECT MIN(deliver_time) FROM mail WHERE receiver = '%u' AND (checked & 1)=0", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, "SELECT friend,flags,note FROM character_social WHERE guid = '%u' LIMIT 255", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, "SELECT map,zone,position_x,position_y,position_z FROM character_homebind WHERE guid = '%u'", GUID_LOPART(m_guid));

View file

@ -105,7 +105,7 @@ bool Group::Create(const uint64 &guid, const char * name)
CharacterDatabase.PExecute("DELETE FROM groups WHERE leaderGuid ='%u'", GUID_LOPART(m_leaderGuid));
CharacterDatabase.PExecute("DELETE FROM group_member WHERE leaderGuid ='%u'", GUID_LOPART(m_leaderGuid));
CharacterDatabase.PExecute("INSERT INTO groups(leaderGuid,mainTank,mainAssistant,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,isRaid,difficulty) "
"VALUES('%u','%u','%u','%u','%u','%u','" I64FMTD "','" I64FMTD "','" I64FMTD "','" I64FMTD "','" I64FMTD "','" I64FMTD "','" I64FMTD "','" I64FMTD "','%u','%u')",
"VALUES('%u','%u','%u','%u','%u','%u','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','%u','%u')",
GUID_LOPART(m_leaderGuid), GUID_LOPART(m_mainTank), GUID_LOPART(m_mainAssistant), uint32(m_lootMethod),
GUID_LOPART(m_looterGuid), uint32(m_lootThreshold), m_targetIcons[0], m_targetIcons[1], m_targetIcons[2], m_targetIcons[3], m_targetIcons[4], m_targetIcons[5], m_targetIcons[6], m_targetIcons[7], isRaidGroup(), m_difficulty);
}

View file

@ -82,7 +82,7 @@ bool Guild::create(Player* leader, std::string gname)
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", Id);
CharacterDatabase.PExecute("DELETE FROM guild_member WHERE guildid='%u'", Id);
CharacterDatabase.PExecute("INSERT INTO guild (guildid,name,leaderguid,info,motd,createdate,EmblemStyle,EmblemColor,BorderStyle,BorderColor,BackgroundColor,BankMoney) "
"VALUES('%u','%s','%u', '%s', '%s', NOW(),'%u','%u','%u','%u','%u','" I64FMTD "')",
"VALUES('%u','%s','%u', '%s', '%s', NOW(),'%u','%u','%u','%u','%u','" UI64FMTD "')",
Id, gname.c_str(), GUID_LOPART(leaderGuid), dbGINFO.c_str(), dbMOTD.c_str(), EmblemStyle, EmblemColor, BorderStyle, BorderColor, BackgroundColor, guildbank_money);
CharacterDatabase.CommitTransaction();
@ -916,7 +916,7 @@ void Guild::LogGuildEvent(uint8 EventType, uint32 PlayerGuid1, uint32 PlayerGuid
// Add entry to map
m_GuildEventlog.push_back(NewEvent);
// Add new eventlog entry into DB
CharacterDatabase.PExecute("INSERT INTO guild_eventlog (guildid, LogGuid, EventType, PlayerGuid1, PlayerGuid2, NewRank, TimeStamp) VALUES ('%u','%u','%u','%u','%u','%u','" I64FMTD "')",
CharacterDatabase.PExecute("INSERT INTO guild_eventlog (guildid, LogGuid, EventType, PlayerGuid1, PlayerGuid2, NewRank, TimeStamp) VALUES ('%u','%u','%u','%u','%u','%u','" UI64FMTD "')",
Id, NewEvent->LogGuid, uint32(NewEvent->EventType), NewEvent->PlayerGuid1, NewEvent->PlayerGuid2, uint32(NewEvent->NewRank), NewEvent->TimeStamp);
}
@ -1299,7 +1299,7 @@ void Guild::SetBankMoney(int64 money)
money = 0;
guildbank_money = money;
CharacterDatabase.PExecute("UPDATE guild SET BankMoney='" I64FMTD "' WHERE guildid='%u'", money, Id);
CharacterDatabase.PExecute("UPDATE guild SET BankMoney='" UI64FMTD "' WHERE guildid='%u'", money, Id);
}
// *************************************************
@ -1665,7 +1665,7 @@ void Guild::LogBankEvent(uint8 LogEntry, uint8 TabId, uint32 PlayerGuidLow, uint
}
m_GuildBankEventLog_Item[TabId].push_back(NewEvent);
}
CharacterDatabase.PExecute("INSERT INTO guild_bank_eventlog (guildid,LogGuid,LogEntry,TabId,PlayerGuid,ItemOrMoney,ItemStackCount,DestTabId,TimeStamp) VALUES ('%u','%u','%u','%u','%u','%u','%u','%u','" I64FMTD "')",
CharacterDatabase.PExecute("INSERT INTO guild_bank_eventlog (guildid,LogGuid,LogEntry,TabId,PlayerGuid,ItemOrMoney,ItemStackCount,DestTabId,TimeStamp) VALUES ('%u','%u','%u','%u','%u','%u','%u','%u','" UI64FMTD "')",
Id, NewEvent->LogGuid, uint32(NewEvent->LogEntry), uint32(TabId), NewEvent->PlayerGuid, NewEvent->ItemOrMoney, uint32(NewEvent->ItemStackCount), uint32(NewEvent->DestTabId), NewEvent->TimeStamp);
}

View file

@ -130,7 +130,7 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId)
{
// save the resettime for normal instances only when they get unloaded
if(time_t resettime = itr->second->GetResetTimeForDB())
CharacterDatabase.PExecute("UPDATE instance SET resettime = '"I64FMTD"' WHERE id = '%u'", (uint64)resettime, InstanceId);
CharacterDatabase.PExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", (uint64)resettime, InstanceId);
delete itr->second;
m_instanceSaveById.erase(itr);
}
@ -168,7 +168,7 @@ void InstanceSave::SaveToDB()
}
}
CharacterDatabase.PExecute("INSERT INTO instance VALUES ('%u', '%u', '"I64FMTD"', '%u', '%s')", m_instanceid, GetMapId(), (uint64)GetResetTimeForDB(), GetDifficulty(), data.c_str());
CharacterDatabase.PExecute("INSERT INTO instance VALUES ('%u', '%u', '"UI64FMTD"', '%u', '%s')", m_instanceid, GetMapId(), (uint64)GetResetTimeForDB(), GetDifficulty(), data.c_str());
}
time_t InstanceSave::GetResetTimeForDB()
@ -395,7 +395,7 @@ void InstanceSaveManager::LoadResetTimes()
ResetTimeMapType::iterator itr = InstResetTime.find(instance);
if(itr != InstResetTime.end() && itr->second.second != resettime)
{
CharacterDatabase.DirectPExecute("UPDATE instance SET resettime = '"I64FMTD"' WHERE id = '%u'", uint64(resettime), instance);
CharacterDatabase.DirectPExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", uint64(resettime), instance);
itr->second.second = resettime;
}
}
@ -430,7 +430,7 @@ void InstanceSaveManager::LoadResetTimes()
uint64 oldresettime = fields[1].GetUInt64();
uint64 newresettime = (oldresettime / DAY) * DAY + diff;
if(oldresettime != newresettime)
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"I64FMTD"' WHERE mapid = '%u'", newresettime, mapid);
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u'", newresettime, mapid);
m_resetTimeByMapId[mapid] = newresettime;
} while(result->NextRow());
@ -439,7 +439,7 @@ void InstanceSaveManager::LoadResetTimes()
// clean expired instances, references to them will be deleted in CleanupInstances
// must be done before calculating new reset times
_DelHelper(CharacterDatabase, "id, map, difficulty", "instance", "LEFT JOIN instance_reset ON mapid = map WHERE (instance.resettime < '"I64FMTD"' AND instance.resettime > '0') OR (NOT instance_reset.resettime IS NULL AND instance_reset.resettime < '"I64FMTD"')", (uint64)now, (uint64)now);
_DelHelper(CharacterDatabase, "id, map, difficulty", "instance", "LEFT JOIN instance_reset ON mapid = map WHERE (instance.resettime < '"UI64FMTD"' AND instance.resettime > '0') OR (NOT instance_reset.resettime IS NULL AND instance_reset.resettime < '"UI64FMTD"')", (uint64)now, (uint64)now);
// calculate new global reset times for expired instances and those that have never been reset yet
// add the global reset times to the priority queue
@ -459,7 +459,7 @@ void InstanceSaveManager::LoadResetTimes()
{
// initialize the reset time
t = today + period + diff;
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','"I64FMTD"')", i, (uint64)t);
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','"UI64FMTD"')", i, (uint64)t);
}
if(t < now)
@ -468,7 +468,7 @@ void InstanceSaveManager::LoadResetTimes()
// calculate the next reset time
t = (t / DAY) * DAY;
t += ((today - t) / period + 1) * period + diff;
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"I64FMTD"' WHERE mapid = '%u'", (uint64)t, i);
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u'", (uint64)t, i);
}
m_resetTimeByMapId[temp->map] = t;
@ -611,7 +611,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
uint32 period = temp->reset_delay * DAY;
uint64 next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
// update it in the DB
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"I64FMTD"' WHERE mapid = '%d'", next_reset, mapid);
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d'", next_reset, mapid);
}
MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps();

View file

@ -642,7 +642,7 @@ bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args)
uint64 titles = 0;
sscanf((char*)args, I64FMTD, &titles);
sscanf((char*)args, UI64FMTD, &titles);
Player *chr = getSelectedPlayer();
if (!chr)

View file

@ -84,7 +84,7 @@ bool ChatHandler::HandleMuteCommand(const char* args)
if (target)
target->GetSession()->m_muteTime = mutetime;
loginDatabase.PExecute("UPDATE account SET mutetime = " I64FMTD " WHERE id = '%u'",uint64(mutetime), account_id );
loginDatabase.PExecute("UPDATE account SET mutetime = " UI64FMTD " WHERE id = '%u'",uint64(mutetime), account_id );
if(target)
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime);

View file

@ -873,7 +873,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
CharacterDatabase.BeginTransaction();
CharacterDatabase.escape_string(subject);
CharacterDatabase.PExecute("INSERT INTO mail (id,messageType,stationery,mailTemplateId,sender,receiver,subject,itemTextId,has_items,expire_time,deliver_time,money,cod,checked) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '%s', '%u', '%u', '" I64FMTD "','" I64FMTD "', '%u', '%u', '%d')",
"VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '%s', '%u', '%u', '" UI64FMTD "','" UI64FMTD "', '%u', '%u', '%d')",
mailId, messageType, stationery, mailTemplateId, sender_guidlow_or_entry, receiver_guidlow, subject.c_str(), itemTextId, (mi && !mi->empty() ? 1 : 0), (uint64)expire_time, (uint64)deliver_time, money, COD, checked);
if(mi)

View file

@ -428,7 +428,7 @@ Map::Add(T *obj)
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::Add: Object " I64FMTD " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::Add: Object (GUID: %u TypeId: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@ -482,7 +482,7 @@ void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Object " I64FMTD " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::MessageBroadcast: Object (GUID: %u TypeId: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@ -527,7 +527,7 @@ void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Object " I64FMTD " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::MessageBroadcast: Object (GUID: %u TypeId: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@ -732,7 +732,7 @@ Map::Remove(T *obj, bool remove)
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::Remove: Object " I64FMT " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::Remove: Object (GUID: %u TypeId:%u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@ -740,7 +740,7 @@ Map::Remove(T *obj, bool remove)
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
DEBUG_LOG("Remove object " I64FMT " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
DEBUG_LOG("Remove object (GUID: %u TypeId:%u) from grid[%u,%u]", obj->GetGUIDLow(), obj->GetTypeId(), cell.data.Part.grid_x, cell.data.Part.grid_y);
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
assert( grid != NULL );

View file

@ -1076,8 +1076,8 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket&/* recv_data*/)
recv_data >> Orientation;
// TODO for later may be we can use for anticheat
DEBUG_LOG("Guid " I64FMTD,guid);
DEBUG_LOG("unknown1 " I64FMTD,unknown1);
DEBUG_LOG("Guid " UI64FMTD,guid);
DEBUG_LOG("unknown1 " UI64FMTD,unknown1);
DEBUG_LOG("unknown2 %u",unknown2);
DEBUG_LOG("X %f",PositionX);
DEBUG_LOG("Y %f",PositionY);
@ -1110,8 +1110,8 @@ void WorldSession::HandleMoveRootAck(WorldPacket&/* recv_data*/)
recv_data >> Orientation;
// for later may be we can use for anticheat
DEBUG_LOG("Guid " I64FMTD,guid);
DEBUG_LOG("unknown1 " I64FMTD,unknown1);
DEBUG_LOG("Guid " UI64FMTD,guid);
DEBUG_LOG("unknown1 " UI64FMTD,unknown1);
DEBUG_LOG("unknown1 %u",unknown2);
DEBUG_LOG("X %f",PositionX);
DEBUG_LOG("Y %f",PositionY);
@ -1166,7 +1166,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
uint64 guid;
recv_data >> guid;
DEBUG_LOG("Inspected guid is " I64FMTD, guid);
DEBUG_LOG("Inspected guid is (GUID: %u TypeId: %u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
_player->SetSelection(guid);
@ -1456,7 +1456,7 @@ void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data )
sLog.outDebug("Removed FarSight from player %u", _player->GetGUIDLow());
break;
case 1:
sLog.outDebug("Added FarSight " I64FMT " to player %u", _player->GetFarSight(), _player->GetGUIDLow());
sLog.outDebug("Added FarSight (GUID:%u TypeId:%u) to player %u", GUID_LOPART(_player->GetFarSight()), GuidHigh2TypeId(GUID_HIPART(_player->GetFarSight())), _player->GetGUIDLow());
break;
}
}

View file

@ -171,7 +171,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
recv_data >> guid;
recv_data >> flags >> time;
DEBUG_LOG("Guid " I64FMTD,guid);
DEBUG_LOG("Guid " UI64FMTD,guid);
DEBUG_LOG("Flags %u, time %u",flags, time/IN_MILISECONDS);
Unit *mover = _player->m_mover;

View file

@ -89,7 +89,7 @@ Object::~Object( )
if(IsInWorld())
{
///- Do NOT call RemoveFromWorld here, if the object is a player it will crash
sLog.outError("Object::~Object - guid="I64FMTD", typeid=%d deleted but still in world!!", GetGUID(), GetTypeId());
sLog.outError("Object::~Object (GUID: %u TypeId: %u) deleted but still in world!!", GetGUIDLow(), GetTypeId());
//assert(0);
}

View file

@ -125,7 +125,7 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
CellPair q = MaNGOS::ComputeCellPair(obj->GetPositionX(),obj->GetPositionY());
if(q.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || q.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("ObjectAccessor::GetObjecInWorld: object "I64FMTD" has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord);
sLog.outError("ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord);
return NULL;
}

View file

@ -23,8 +23,8 @@
// used for creating values for respawn for example
#define MAKE_PAIR64(l, h) uint64( uint32(l) | ( uint64(h) << 32 ) )
#define PAIR64_HIPART(x) (uint32)((uint64(x) >> 32) & 0x00000000FFFFFFFFLL)
#define PAIR64_LOPART(x) (uint32)(uint64(x) & 0x00000000FFFFFFFFLL)
#define PAIR64_HIPART(x) (uint32)((uint64(x) >> 32) & UI64LIT(0x00000000FFFFFFFF))
#define PAIR64_LOPART(x) (uint32)(uint64(x) & UI64LIT(0x00000000FFFFFFFF))
#define MAKE_PAIR32(l, h) uint32( uint16(l) | ( uint32(h) << 16 ) )
#define PAIR32_HIPART(x) (uint16)((uint32(x) >> 16) & 0x0000FFFF)
@ -70,9 +70,9 @@ enum HighGuid
// We have different low and middle part size for different guid types
#define _GUID_ENPART_2(x) 0
#define _GUID_ENPART_3(x) (uint32)((uint64(x) >> 24) & 0x0000000000FFFFFFLL)
#define _GUID_LOPART_2(x) (uint32)(uint64(x) & 0x00000000FFFFFFFFLL)
#define _GUID_LOPART_3(x) (uint32)(uint64(x) & 0x0000000000FFFFFFLL)
#define _GUID_ENPART_3(x) (uint32)((uint64(x) >> 24) & UI64LIT(0x0000000000FFFFFF))
#define _GUID_LOPART_2(x) (uint32)(uint64(x) & UI64LIT(0x00000000FFFFFFFF))
#define _GUID_LOPART_3(x) (uint32)(uint64(x) & UI64LIT(0x0000000000FFFFFF))
inline bool IsGuidHaveEnPart(uint64 const& guid)
{

View file

@ -4300,9 +4300,9 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
sLog.outDebug("Returning mails current time: hour: %d, minute: %d, second: %d ", localtime(&basetime)->tm_hour, localtime(&basetime)->tm_min, localtime(&basetime)->tm_sec);
//delete all old mails without item and without body immediately, if starting server
if (!serverUp)
CharacterDatabase.PExecute("DELETE FROM mail WHERE expire_time < '" I64FMTD "' AND has_items = '0' AND itemTextId = 0", (uint64)basetime);
CharacterDatabase.PExecute("DELETE FROM mail WHERE expire_time < '" UI64FMTD "' AND has_items = '0' AND itemTextId = 0", (uint64)basetime);
// 0 1 2 3 4 5 6 7 8 9
QueryResult* result = CharacterDatabase.PQuery("SELECT id,messageType,sender,receiver,itemTextId,has_items,expire_time,cod,checked,mailTemplateId FROM mail WHERE expire_time < '" I64FMTD "'", (uint64)basetime);
QueryResult* result = CharacterDatabase.PQuery("SELECT id,messageType,sender,receiver,itemTextId,has_items,expire_time,cod,checked,mailTemplateId FROM mail WHERE expire_time < '" UI64FMTD "'", (uint64)basetime);
if ( !result )
{
barGoLink bar(1);
@ -4377,7 +4377,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
else
{
//mail will be returned:
CharacterDatabase.PExecute("UPDATE mail SET sender = '%u', receiver = '%u', expire_time = '" I64FMTD "', deliver_time = '" I64FMTD "',cod = '0', checked = '%u' WHERE id = '%u'", m->receiver, m->sender, (uint64)(basetime + 30*DAY), (uint64)basetime, MAIL_CHECK_MASK_RETURNED, m->messageID);
CharacterDatabase.PExecute("UPDATE mail SET sender = '%u', receiver = '%u', expire_time = '" UI64FMTD "', deliver_time = '" UI64FMTD "',cod = '0', checked = '%u' WHERE id = '%u'", m->receiver, m->sender, (uint64)(basetime + 30*DAY), (uint64)basetime, MAIL_CHECK_MASK_RETURNED, m->messageID);
delete m;
continue;
}
@ -6030,7 +6030,7 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t
mCreatureRespawnTimes[MAKE_PAIR64(loguid,instance)] = t;
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u' AND instance = '%u'", loguid, instance);
if(t)
WorldDatabase.PExecute("INSERT INTO creature_respawn VALUES ( '%u', '" I64FMTD "', '%u' )", loguid, uint64(t), instance);
WorldDatabase.PExecute("INSERT INTO creature_respawn VALUES ( '%u', '" UI64FMTD "', '%u' )", loguid, uint64(t), instance);
}
void ObjectMgr::DeleteCreatureData(uint32 guid)
@ -6048,7 +6048,7 @@ void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
mGORespawnTimes[MAKE_PAIR64(loguid,instance)] = t;
WorldDatabase.PExecute("DELETE FROM gameobject_respawn WHERE guid = '%u' AND instance = '%u'", loguid, instance);
if(t)
WorldDatabase.PExecute("INSERT INTO gameobject_respawn VALUES ( '%u', '" I64FMTD "', '%u' )", loguid, uint64(t), instance);
WorldDatabase.PExecute("INSERT INTO gameobject_respawn VALUES ( '%u', '" UI64FMTD "', '%u' )", loguid, uint64(t), instance);
}
void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)

View file

@ -1077,7 +1077,7 @@ void Pet::_SaveSpellCooldowns()
m_CreatureSpellCooldowns.erase(itr++);
else
{
CharacterDatabase.PExecute("INSERT INTO pet_spell_cooldown (guid,spell,time) VALUES ('%u', '%u', '" I64FMTD "')", m_charmInfo->GetPetNumber(), itr->first, uint64(itr->second));
CharacterDatabase.PExecute("INSERT INTO pet_spell_cooldown (guid,spell,time) VALUES ('%u', '%u', '" UI64FMTD "')", m_charmInfo->GetPetNumber(), itr->first, uint64(itr->second));
++itr;
}
}
@ -1250,7 +1250,7 @@ void Pet::_SaveAuras()
if (i == 3)
{
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
"VALUES ('%u', '" I64FMTD "', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
"VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
m_charmInfo->GetPetNumber(), itr2->second->GetCasterGUID(),(uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), stackCounter, itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->GetAuraCharges()));
}
}

View file

@ -66,7 +66,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
CharmInfo *charmInfo = pet->GetCharmInfo();
if(!charmInfo)
{
sLog.outError("WorldSession::HandlePetAction: object "I64FMTD" is considered pet-like but doesn't have a charminfo!", pet->GetGUID());
sLog.outError("WorldSession::HandlePetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@ -344,7 +344,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
CharmInfo *charmInfo = pet->GetCharmInfo();
if(!charmInfo)
{
sLog.outError("WorldSession::HandlePetSetAction: object "I64FMTD" is considered pet-like but doesn't have a charminfo!", pet->GetGUID());
sLog.outError("WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@ -515,7 +515,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
CharmInfo *charmInfo = pet->GetCharmInfo();
if(!charmInfo)
{
sLog.outError("WorldSession::HandlePetUnlearnOpcode: object "I64FMTD" is considered pet-like but doesn't have a charminfo!", pet->GetGUID());
sLog.outError("WorldSession::HandlePetUnlearnOpcode: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
pet->resetTalents();
@ -553,7 +553,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
CharmInfo *charmInfo = pet->GetCharmInfo();
if(!charmInfo)
{
sLog.outError("WorldSession::HandlePetSpellAutocastOpcod: object "I64FMTD" is considered pet-like but doesn't have a charminfo!", pet->GetGUID());
sLog.outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}

View file

@ -3352,7 +3352,7 @@ void Player::_SaveSpellCooldowns()
m_spellCooldowns.erase(itr++);
else if(itr->second.end <= infTime) // not save locked cooldowns, it will be reset or set at reload
{
CharacterDatabase.PExecute("INSERT INTO character_spell_cooldown (guid,spell,item,time) VALUES ('%u', '%u', '%u', '" I64FMTD "')", GetGUIDLow(), itr->first, itr->second.itemid, uint64(itr->second.end));
CharacterDatabase.PExecute("INSERT INTO character_spell_cooldown (guid,spell,item,time) VALUES ('%u', '%u', '%u', '" UI64FMTD "')", GetGUIDLow(), itr->first, itr->second.itemid, uint64(itr->second.end));
++itr;
}
else
@ -14790,7 +14790,7 @@ void Player::_LoadMailedItems(Mail *mail)
void Player::_LoadMailInit(QueryResult *resultUnread, QueryResult *resultDelivery)
{
//set a count of unread mails
//QueryResult *resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" I64FMTD "'", GUID_LOPART(playerGuid),(uint64)cTime);
//QueryResult *resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(playerGuid),(uint64)cTime);
if (resultUnread)
{
Field *fieldMail = resultUnread->Fetch();
@ -15589,7 +15589,7 @@ void Player::_SaveAuras()
if (i == 3)
{
CharacterDatabase.PExecute("INSERT INTO character_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
"VALUES ('%u', '" I64FMTD "' ,'%u', '%u', '%u', '%d', '%d', '%d', '%d')",
"VALUES ('%u', '" UI64FMTD "' ,'%u', '%u', '%u', '%d', '%d', '%d', '%d')",
GetGUIDLow(), itr2->second->GetCasterGUID(), (uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), stackCounter, itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->GetAuraCharges()));
}
}
@ -15696,7 +15696,7 @@ void Player::_SaveMail()
Mail *m = (*itr);
if (m->state == MAIL_STATE_CHANGED)
{
CharacterDatabase.PExecute("UPDATE mail SET itemTextId = '%u',has_items = '%u',expire_time = '" I64FMTD "', deliver_time = '" I64FMTD "',money = '%u',cod = '%u',checked = '%u' WHERE id = '%u'",
CharacterDatabase.PExecute("UPDATE mail SET itemTextId = '%u',has_items = '%u',expire_time = '" UI64FMTD "', deliver_time = '" UI64FMTD "',money = '%u',cod = '%u',checked = '%u' WHERE id = '%u'",
m->itemTextId, m->HasItems() ? 1 : 0, (uint64)m->expire_time, (uint64)m->deliver_time, m->money, m->COD, m->checked, m->messageID);
if(m->removedItems.size())
{
@ -15744,11 +15744,11 @@ void Player::_SaveQuestStatus()
{
case QUEST_NEW :
CharacterDatabase.PExecute("INSERT INTO character_queststatus (guid,quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '" I64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
"VALUES ('%u', '%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
break;
case QUEST_CHANGED :
CharacterDatabase.PExecute("UPDATE character_queststatus SET status = '%u',rewarded = '%u',explored = '%u',timer = '" I64FMTD "',mobcount1 = '%u',mobcount2 = '%u',mobcount3 = '%u',mobcount4 = '%u',itemcount1 = '%u',itemcount2 = '%u',itemcount3 = '%u',itemcount4 = '%u' WHERE guid = '%u' AND quest = '%u' ",
CharacterDatabase.PExecute("UPDATE character_queststatus SET status = '%u',rewarded = '%u',explored = '%u',timer = '" UI64FMTD "',mobcount1 = '%u',mobcount2 = '%u',mobcount3 = '%u',mobcount4 = '%u',itemcount1 = '%u',itemcount2 = '%u',itemcount3 = '%u',itemcount4 = '%u' WHERE guid = '%u' AND quest = '%u' ",
i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first );
break;
case QUEST_UNCHANGED:
@ -15771,7 +15771,7 @@ void Player::_SaveDailyQuestStatus()
CharacterDatabase.PExecute("DELETE FROM character_queststatus_daily WHERE guid = '%u'",GetGUIDLow());
for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
if(GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx))
CharacterDatabase.PExecute("INSERT INTO character_queststatus_daily (guid,quest,time) VALUES ('%u', '%u','" I64FMTD "')",
CharacterDatabase.PExecute("INSERT INTO character_queststatus_daily (guid,quest,time) VALUES ('%u', '%u','" UI64FMTD "')",
GetGUIDLow(), GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx),uint64(m_lastDailyQuestTime));
}
@ -16465,7 +16465,7 @@ void Player::PossessSpellInitialize()
if(!charmInfo)
{
sLog.outError("Player::PossessSpellInitialize(): charm ("I64FMTD") has no charminfo!", charm->GetGUID());
sLog.outError("Player::PossessSpellInitialize(): charm (GUID: %u TypeId: %u) has no charminfo!", charm->GetGUIDLow(),charm->GetTypeId());
return;
}
@ -16493,7 +16493,7 @@ void Player::CharmSpellInitialize()
CharmInfo *charmInfo = charm->GetCharmInfo();
if(!charmInfo)
{
sLog.outError("Player::CharmSpellInitialize(): the player's charm ("I64FMTD") has no charminfo!", charm->GetGUID());
sLog.outError("Player::CharmSpellInitialize(): the player's charm (GUID: %u TypeId: %u) has no charminfo!", charm->GetGUIDLow(),charm->GetTypeId());
return;
}
@ -19957,9 +19957,9 @@ void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)
if(CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemId))
{
if(apply)
SetFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(1LL << (ctEntry->BitIndex-1)));
SetFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(UI64LIT(1) << (ctEntry->BitIndex-1)));
else
RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(1LL << (ctEntry->BitIndex-1)));
RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(UI64LIT(1) << (ctEntry->BitIndex-1)));
}
}

View file

@ -402,48 +402,48 @@ enum PlayerFlags
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
// can't use enum for uint64 values
#define PLAYER_TITLE_DISABLED 0x0000000000000000LL
#define PLAYER_TITLE_NONE 0x0000000000000001LL
#define PLAYER_TITLE_PRIVATE 0x0000000000000002LL // 1
#define PLAYER_TITLE_CORPORAL 0x0000000000000004LL // 2
#define PLAYER_TITLE_SERGEANT_A 0x0000000000000008LL // 3
#define PLAYER_TITLE_MASTER_SERGEANT 0x0000000000000010LL // 4
#define PLAYER_TITLE_SERGEANT_MAJOR 0x0000000000000020LL // 5
#define PLAYER_TITLE_KNIGHT 0x0000000000000040LL // 6
#define PLAYER_TITLE_KNIGHT_LIEUTENANT 0x0000000000000080LL // 7
#define PLAYER_TITLE_KNIGHT_CAPTAIN 0x0000000000000100LL // 8
#define PLAYER_TITLE_KNIGHT_CHAMPION 0x0000000000000200LL // 9
#define PLAYER_TITLE_LIEUTENANT_COMMANDER 0x0000000000000400LL // 10
#define PLAYER_TITLE_COMMANDER 0x0000000000000800LL // 11
#define PLAYER_TITLE_MARSHAL 0x0000000000001000LL // 12
#define PLAYER_TITLE_FIELD_MARSHAL 0x0000000000002000LL // 13
#define PLAYER_TITLE_GRAND_MARSHAL 0x0000000000004000LL // 14
#define PLAYER_TITLE_SCOUT 0x0000000000008000LL // 15
#define PLAYER_TITLE_GRUNT 0x0000000000010000LL // 16
#define PLAYER_TITLE_SERGEANT_H 0x0000000000020000LL // 17
#define PLAYER_TITLE_SENIOR_SERGEANT 0x0000000000040000LL // 18
#define PLAYER_TITLE_FIRST_SERGEANT 0x0000000000080000LL // 19
#define PLAYER_TITLE_STONE_GUARD 0x0000000000100000LL // 20
#define PLAYER_TITLE_BLOOD_GUARD 0x0000000000200000LL // 21
#define PLAYER_TITLE_LEGIONNAIRE 0x0000000000400000LL // 22
#define PLAYER_TITLE_CENTURION 0x0000000000800000LL // 23
#define PLAYER_TITLE_CHAMPION 0x0000000001000000LL // 24
#define PLAYER_TITLE_LIEUTENANT_GENERAL 0x0000000002000000LL // 25
#define PLAYER_TITLE_GENERAL 0x0000000004000000LL // 26
#define PLAYER_TITLE_WARLORD 0x0000000008000000LL // 27
#define PLAYER_TITLE_HIGH_WARLORD 0x0000000010000000LL // 28
#define PLAYER_TITLE_GLADIATOR 0x0000000020000000LL // 29
#define PLAYER_TITLE_DUELIST 0x0000000040000000LL // 30
#define PLAYER_TITLE_RIVAL 0x0000000080000000LL // 31
#define PLAYER_TITLE_CHALLENGER 0x0000000100000000LL // 32
#define PLAYER_TITLE_SCARAB_LORD 0x0000000200000000LL // 33
#define PLAYER_TITLE_CONQUEROR 0x0000000400000000LL // 34
#define PLAYER_TITLE_JUSTICAR 0x0000000800000000LL // 35
#define PLAYER_TITLE_CHAMPION_OF_THE_NAARU 0x0000001000000000LL // 36
#define PLAYER_TITLE_MERCILESS_GLADIATOR 0x0000002000000000LL // 37
#define PLAYER_TITLE_OF_THE_SHATTERED_SUN 0x0000004000000000LL // 38
#define PLAYER_TITLE_HAND_OF_ADAL 0x0000008000000000LL // 39
#define PLAYER_TITLE_VENGEFUL_GLADIATOR 0x0000010000000000LL // 40
#define PLAYER_TITLE_DISABLED UI64LIT(0x0000000000000000)
#define PLAYER_TITLE_NONE UI64LIT(0x0000000000000001)
#define PLAYER_TITLE_PRIVATE UI64LIT(0x0000000000000002) // 1
#define PLAYER_TITLE_CORPORAL UI64LIT(0x0000000000000004) // 2
#define PLAYER_TITLE_SERGEANT_A UI64LIT(0x0000000000000008) // 3
#define PLAYER_TITLE_MASTER_SERGEANT UI64LIT(0x0000000000000010) // 4
#define PLAYER_TITLE_SERGEANT_MAJOR UI64LIT(0x0000000000000020) // 5
#define PLAYER_TITLE_KNIGHT UI64LIT(0x0000000000000040) // 6
#define PLAYER_TITLE_KNIGHT_LIEUTENANT UI64LIT(0x0000000000000080) // 7
#define PLAYER_TITLE_KNIGHT_CAPTAIN UI64LIT(0x0000000000000100) // 8
#define PLAYER_TITLE_KNIGHT_CHAMPION UI64LIT(0x0000000000000200) // 9
#define PLAYER_TITLE_LIEUTENANT_COMMANDER UI64LIT(0x0000000000000400) // 10
#define PLAYER_TITLE_COMMANDER UI64LIT(0x0000000000000800) // 11
#define PLAYER_TITLE_MARSHAL UI64LIT(0x0000000000001000) // 12
#define PLAYER_TITLE_FIELD_MARSHAL UI64LIT(0x0000000000002000) // 13
#define PLAYER_TITLE_GRAND_MARSHAL UI64LIT(0x0000000000004000) // 14
#define PLAYER_TITLE_SCOUT UI64LIT(0x0000000000008000) // 15
#define PLAYER_TITLE_GRUNT UI64LIT(0x0000000000010000) // 16
#define PLAYER_TITLE_SERGEANT_H UI64LIT(0x0000000000020000) // 17
#define PLAYER_TITLE_SENIOR_SERGEANT UI64LIT(0x0000000000040000) // 18
#define PLAYER_TITLE_FIRST_SERGEANT UI64LIT(0x0000000000080000) // 19
#define PLAYER_TITLE_STONE_GUARD UI64LIT(0x0000000000100000) // 20
#define PLAYER_TITLE_BLOOD_GUARD UI64LIT(0x0000000000200000) // 21
#define PLAYER_TITLE_LEGIONNAIRE UI64LIT(0x0000000000400000) // 22
#define PLAYER_TITLE_CENTURION UI64LIT(0x0000000000800000) // 23
#define PLAYER_TITLE_CHAMPION UI64LIT(0x0000000001000000) // 24
#define PLAYER_TITLE_LIEUTENANT_GENERAL UI64LIT(0x0000000002000000) // 25
#define PLAYER_TITLE_GENERAL UI64LIT(0x0000000004000000) // 26
#define PLAYER_TITLE_WARLORD UI64LIT(0x0000000008000000) // 27
#define PLAYER_TITLE_HIGH_WARLORD UI64LIT(0x0000000010000000) // 28
#define PLAYER_TITLE_GLADIATOR UI64LIT(0x0000000020000000) // 29
#define PLAYER_TITLE_DUELIST UI64LIT(0x0000000040000000) // 30
#define PLAYER_TITLE_RIVAL UI64LIT(0x0000000080000000) // 31
#define PLAYER_TITLE_CHALLENGER UI64LIT(0x0000000100000000) // 32
#define PLAYER_TITLE_SCARAB_LORD UI64LIT(0x0000000200000000) // 33
#define PLAYER_TITLE_CONQUEROR UI64LIT(0x0000000400000000) // 34
#define PLAYER_TITLE_JUSTICAR UI64LIT(0x0000000800000000) // 35
#define PLAYER_TITLE_CHAMPION_OF_THE_NAARU UI64LIT(0x0000001000000000) // 36
#define PLAYER_TITLE_MERCILESS_GLADIATOR UI64LIT(0x0000002000000000) // 37
#define PLAYER_TITLE_OF_THE_SHATTERED_SUN UI64LIT(0x0000004000000000) // 38
#define PLAYER_TITLE_HAND_OF_ADAL UI64LIT(0x0000008000000000) // 39
#define PLAYER_TITLE_VENGEFUL_GLADIATOR UI64LIT(0x0000010000000000) // 40
// used in PLAYER_FIELD_BYTES values
enum PlayerFieldByteFlags

View file

@ -768,28 +768,28 @@ void Spell::prepareDataForTriggerSystem()
switch (m_spellInfo->SpellFamilyName)
{
case SPELLFAMILY_MAGE: // Arcane Missles / Blizzard triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000200080))
m_canTrigger = true;
break;
case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000800000000060))
m_canTrigger = true;
break;
case SPELLFAMILY_PRIEST: // For Penance heal/damage triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0001800000000000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001800000000000))
m_canTrigger = true;
break;
case SPELLFAMILY_ROGUE: // For poisons need do it
if (m_spellInfo->SpellFamilyFlags & 0x000000101001E000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000101001E000))
m_canTrigger = true;
break;
case SPELLFAMILY_HUNTER: // Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot
if (m_spellInfo->SpellFamilyFlags & 0x0100200000000214LL ||
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0100200000000214)) ||
m_spellInfo->SpellFamilyFlags2 & 0x200)
m_canTrigger = true;
break;
case SPELLFAMILY_PALADIN: // For Judgements (all) / Holy Shock triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0001000900B80400LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001000900B80400))
m_canTrigger = true;
break;
default:
@ -837,7 +837,7 @@ void Spell::prepareDataForTriggerSystem()
}
// Hunter traps spells (for Entrapment trigger)
// Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap ....
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x000020000000001CLL)
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000020000000001C)))
m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION;
}
@ -894,7 +894,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
m_delayMoment = target.timeDelay;
}
else
target.timeDelay = 0LL;
target.timeDelay = UI64LIT(0);
// If target reflect spell back to caster
if (target.missCondition == SPELL_MISS_REFLECT)
@ -957,7 +957,7 @@ void Spell::AddGOTarget(GameObject* pVictim, uint32 effIndex)
m_delayMoment = target.timeDelay;
}
else
target.timeDelay = 0LL;
target.timeDelay = UI64LIT(0);
// Add target to list
m_UniqueGOTargetInfo.push_back(target);
@ -1079,7 +1079,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
caster->DealSpellDamage(&damageInfo, true);
// Judgement of Blood
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL && m_spellInfo->SpellIconID==153)
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000800000000)) && m_spellInfo->SpellIconID==153)
{
int32 damagePoint = damageInfo.damage * 33 / 100;
m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true);
@ -1371,7 +1371,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
{
case SPELLFAMILY_DRUID:
// Starfall
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
if (m_spellInfo->SpellFamilyFlags2 & UI64LIT(0x00000100))
unMaxTargets = 2;
break;
default:
@ -2393,7 +2393,8 @@ void Spell::cast(bool skipCheck)
}
case SPELLFAMILY_MAGE:
{
if (m_spellInfo->SpellFamilyFlags&0x0000008000000000LL) // Ice Block
// Ice Block
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000008000000000))
m_preCastSpell = 41425; // Hypothermia
break;
}
@ -2408,7 +2409,8 @@ void Spell::cast(bool skipCheck)
}
case SPELLFAMILY_PALADIN:
{
if (m_spellInfo->SpellFamilyFlags&0x0000000000400080LL) // Divine Shield, Divine Protection or Hand of Protection
// Divine Shield, Divine Protection or Hand of Protection
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000400080))
m_preCastSpell = 25771; // Forbearance
break;
}
@ -3861,9 +3863,8 @@ SpellCastResult Spell::CheckCast(bool strict)
{
//Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
//Exclusion for Mutilate:Facing Limitation was removed in 2.0.1 and 3.0.3, but they still use the same, old Ex-Flags
if( (m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || m_spellInfo->SpellFamilyFlags != 0x0000000000020000LL) &&
(m_spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || m_spellInfo->SpellFamilyFlags != 0x0020000000000000LL)
)
if ((m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || (m_spellInfo->SpellFamilyFlags != UI64LIT(0x0000000000020000))) &&
(m_spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || (m_spellInfo->SpellFamilyFlags != UI64LIT(0x0020000000000000))))
{
SendInterrupted(2);
return SPELL_FAILED_NOT_BEHIND;
@ -5380,7 +5381,7 @@ bool Spell::CheckTargetCreatureType(Unit* target) const
uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType;
// Curse of Doom : not find another way to fix spell target check :/
if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags == 0x0200000000LL)
if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags == UI64LIT(0x0200000000))
{
// not allow cast at player
if(target->GetTypeId()==TYPEID_PLAYER)

View file

@ -983,19 +983,19 @@ void Aura::_AddAura()
m_target->ModifyAuraState(AURA_STATE_IMMOLATE, true);
// Faerie Fire (druid versions)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
m_target->ModifyAuraState(AURA_STATE_FAERIE_FIRE, true);
// Victorious
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags & 0x0004000000000000LL)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && (m_spellProto->SpellFamilyFlags & UI64LIT(0x0004000000000000)))
m_target->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, true);
// Swiftmend state on Regrowth & Rejuvenation
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags & 0x50 )
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && (m_spellProto->SpellFamilyFlags & UI64LIT(0x50)))
m_target->ModifyAuraState(AURA_STATE_SWIFTMEND, true);
// Deadly poison aura state
if(m_spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && m_spellProto->SpellFamilyFlags & 0x10000)
if(m_spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && (m_spellProto->SpellFamilyFlags & UI64LIT(0x10000)))
m_target->ModifyAuraState(AURA_STATE_DEADLY_POISON, true);
// Enrage aura state
@ -1083,28 +1083,28 @@ void Aura::_RemoveAura()
removeState = AURA_STATE_JUDGEMENT; // Update Seals information
break;
case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags & 4)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x4))
removeState = AURA_STATE_IMMOLATE; // Conflagrate aura state
break;
case SPELLFAMILY_DRUID:
if(m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000400))
removeState = AURA_STATE_FAERIE_FIRE; // Faerie Fire (druid versions)
else if(m_spellProto->SpellFamilyFlags & 0x50)
else if(m_spellProto->SpellFamilyFlags & UI64LIT(0x50))
{
removeFamilyFlag = 0x50;
removeState = AURA_STATE_SWIFTMEND; // Swiftmend aura state
}
break;
case SPELLFAMILY_WARRIOR:
if(m_spellProto->SpellFamilyFlags & 0x0004000000000000LL)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x0004000000000000))
removeState = AURA_STATE_WARRIOR_VICTORY_RUSH; // Victorious
break;
case SPELLFAMILY_ROGUE:
if(m_spellProto->SpellFamilyFlags & 0x10000)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x10000))
removeState = AURA_STATE_DEADLY_POISON; // Deadly poison aura state
break;
case SPELLFAMILY_HUNTER:
if(m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x1000000000000000))
removeState = AURA_STATE_FAERIE_FIRE; // Sting (hunter versions)
}
@ -1295,7 +1295,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
// reapply some passive spells after add/remove related spellmods
if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (spellFamilyMask & 0x0000100000000000LL))
if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (spellFamilyMask & UI64LIT(0x0000100000000000)))
{
m_target->RemoveAurasDueToSpell(45471);
@ -1910,7 +1910,7 @@ void Aura::TriggerSpell()
{
SpellEntry const* spell = itr->second->GetSpellProto();
if( spell->SpellFamilyName == SPELLFAMILY_SHAMAN &&
spell->SpellFamilyFlags & 0x0000000000000400L)
(spell->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
return;
}
target->RemoveAurasDueToSpell(28820);
@ -2077,7 +2077,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
// Earth Shield
if ( caster && GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (GetSpellProto()->SpellFamilyFlags & 0x40000000000LL))
if ( caster && GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x40000000000)))
{
// prevent double apply bonuses
if(m_target->GetTypeId() != TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
@ -2158,14 +2158,14 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
{
// Stop caster Arcane Missle chanelling on death
if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE &&
m_spellProto->SpellFamilyFlags&0x0000000000000800LL)
(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000800)))
{
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return;
}
// Stop caster Penance chanelling on death
if (m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST &&
m_spellProto->SpellFamilyFlags2 & 0x00000080)
(m_spellProto->SpellFamilyFlags2 & UI64LIT(0x00000080)))
{
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return;
@ -2291,8 +2291,8 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_PCT;
mod->spellId = GetId();
mod->mask = 0x0000200000000000LL;
mod->mask2= 0LL;
mod->mask = UI64LIT(0x0000200000000000);
mod->mask2= UI64LIT(0x0);
m_spellmod = mod;
}
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
@ -2317,8 +2317,8 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount/7;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask = 0x001000000000LL;
mod->mask2= 0LL;
mod->mask = UI64LIT(0x001000000000);
mod->mask2= UI64LIT(0x0);
m_spellmod = mod;
}
@ -2343,7 +2343,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
// Lifebloom
if ( GetSpellProto()->SpellFamilyFlags & 0x1000000000LL )
if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x1000000000))
{
if ( apply )
{
@ -2362,7 +2362,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
Unit::AuraList auras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::iterator itr = auras.begin(); itr!=auras.end(); ++itr)
if((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x1000000000LL)
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x1000000000)))
return;
// final heal
@ -2400,12 +2400,14 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
switch (m_effIndex)
{
case 0:
mod->mask = 0x00200000000LL; // Windfury Totem
mod->mask2= 0LL;
// Windfury Totem
mod->mask = UI64LIT(0x00200000000);
mod->mask2= UI64LIT(0x0);
break;
case 1:
mod->mask = 0x00400000000LL; // Flametongue Totem
mod->mask2= 0LL;
// Flametongue Totem
mod->mask = UI64LIT(0x00400000000);
mod->mask2= UI64LIT(0x0);
break;
}
@ -3268,7 +3270,7 @@ void Aura::HandleModCharm(bool apply, bool Real)
if(m_target->GetCharmInfo())
m_target->GetCharmInfo()->SetPetNumber(0, true);
else
sLog.outError("Aura::HandleModCharm: target="I64FMTD" with typeid=%d has a charm aura but no charm info!", m_target->GetGUID(), m_target->GetTypeId());
sLog.outError("Aura::HandleModCharm: target (GUID: %u TypeId: %u) has a charm aura but no charm info!", m_target->GetGUIDLow(), m_target->GetTypeId());
}
}
@ -3477,7 +3479,7 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
}
// Wyvern Sting
if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000100000000000LL)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & UI64LIT(0x0000100000000000))
{
Unit* caster = GetCaster();
if( !caster || caster->GetTypeId()!=TYPEID_PLAYER )
@ -3548,7 +3550,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
pTarget->CastCustomSpell(pTarget,31665,&bp,NULL,NULL,true);
}
// Overkill
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & 0x0000000000400000LL)
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000400000))
{
pTarget->RemoveAurasDueToSpell(58428);
pTarget->CastSpell(pTarget, 58427, true);
@ -3588,7 +3590,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
if ((*i)->GetSpellProto()->SpellIconID == 2114)
pTarget->CastSpell(pTarget, 31666, true);
// Overkill
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & 0x0000000000400000LL)
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000400000))
pTarget->CastSpell(pTarget, 58428, true);
}
}
@ -4264,7 +4266,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_WARRIOR:
{
// Rend
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000020))
{
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
@ -4279,21 +4281,21 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_DRUID:
{
// Rake
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000001000))
{
// $AP*0.06 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return;
}
// Lacerate
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000010000000000))
{
// $AP*0.05/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
}
// Rip
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000800000))
{
// 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER)
@ -4315,7 +4317,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return;
}
// Lock Jaw
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x1000000000000000))
{
// 0.15*$AP
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
@ -4326,7 +4328,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_ROGUE:
{
// Rupture
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000100000))
{
if (caster->GetTypeId() != TYPEID_PLAYER)
return;
@ -4342,14 +4344,14 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return;
}
// Garrote
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000000100))
{
// $AP*0.07 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
return;
}
// Deadly Poison
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000010000))
{
// 0.08*$AP / 4 * amount of stack
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
@ -4360,14 +4362,14 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_HUNTER:
{
// Serpent Sting
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000))
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return;
}
// Immolation Trap
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678)
if ((m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004)) && m_spellProto->SpellIconID == 678)
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
@ -5591,7 +5593,7 @@ void Aura::HandleSpiritOfRedemption( bool apply, bool Real )
void Aura::CleanupTriggeredSpells()
{
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags & 0x0000001000000020LL)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000001000000020)))
{
// Blood Frenzy remove
m_target->RemoveAurasDueToSpell(30069);
@ -5640,7 +5642,9 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
}
break;
case SPELLFAMILY_MAGE:
if(m_spellProto->SpellFamilyFlags == 0x80100 || m_spellProto->SpellFamilyFlags == 0x8 || m_spellProto->SpellFamilyFlags == 0x100000000LL)
if (m_spellProto->SpellFamilyFlags == UI64LIT(0x80100) ||
m_spellProto->SpellFamilyFlags == UI64LIT(0x8) ||
m_spellProto->SpellFamilyFlags == UI64LIT(0x100000000))
{
//frost ward, fire ward, ice barrier
//+10% from +spd bonus
@ -5747,7 +5751,7 @@ void Aura::PeriodicTick()
pdamage = pCaster->SpellDamageBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount());
// Curse of Agony damage-per-tick calculation
if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL) && GetSpellProto()->SpellIconID==544)
if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000400)) && GetSpellProto()->SpellIconID==544)
{
// 1..4 ticks, 1/2 from normal tick damage
if (m_duration >= ((m_maxduration-m_modifier.periodictime) * 2 / 3))
@ -6458,7 +6462,7 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_HUNTER:
{
// Explosive Shot
if (spell->SpellFamilyFlags & 0x8000000000000000LL)
if (spell->SpellFamilyFlags & UI64LIT(0x8000000000000000))
{
if (!caster)
return;
@ -6508,17 +6512,17 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_DEATHKNIGHT:
{
// Death and Decay
if (spell->SpellFamilyFlags & 0x0000000000000020LL)
if (spell->SpellFamilyFlags & UI64LIT(0x0000000000000020))
{
if (caster)
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this);
return;
}
// Raise Dead
// if (spell->SpellFamilyFlags & 0x0000000000001000LL)
// if (spell->SpellFamilyFlags & UI64LIT(0x0000000000001000))
// return;
// Chains of Ice
if (spell->SpellFamilyFlags & 0x0000400000000000LL)
if (spell->SpellFamilyFlags & UI64LIT(0x0000400000000000))
{
// Get 0 effect aura
Aura *slow = m_target->GetAura(GetId(), 0);
@ -6533,10 +6537,10 @@ void Aura::PeriodicDummyTick()
return;
}
// Summon Gargoyle
// if (spell->SpellFamilyFlags & 0x0000008000000000LL)
// if (spell->SpellFamilyFlags & UI64LIT(0x0000008000000000))
// return;
// Death Rune Mastery
// if (spell->SpellFamilyFlags & 0x0000000000004000LL)
// if (spell->SpellFamilyFlags & UI64LIT(0x0000000000004000))
// return;
// Bladed Armor
if (spell->SpellIconID == 2653)
@ -6589,7 +6593,7 @@ void Aura::HandleManaShield(bool apply, bool Real)
switch(m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
if(m_spellProto->SpellFamilyFlags & 0x8000)
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x8000))
{
// Mana Shield
// +50% from +spd bonus

View file

@ -359,7 +359,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_MAGE:
{
// Arcane Blast
if(m_spellInfo->SpellFamilyFlags & 0x20000000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x20000000))
{
m_caster->CastSpell(m_caster, 36032, true);
}
@ -368,27 +368,27 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_WARRIOR:
{
// Bloodthirst
if(m_spellInfo->SpellFamilyFlags & 0x40000000000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x40000000000))
{
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
}
// Shield Slam
else if(m_spellInfo->SpellFamilyFlags & 0x0000020000000000LL && m_spellInfo->Category==1209)
else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000020000000000)) && m_spellInfo->Category==1209)
damage += int32(m_caster->GetShieldBlockValue());
// Victory Rush
else if(m_spellInfo->SpellFamilyFlags & 0x10000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x10000000000))
{
damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false);
}
// Revenge ${$m1+$AP*0.207} to ${$M1+$AP*0.207}
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000400LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000400))
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.207f);
// Heroic Throw ${$m1+$AP*.50}
else if(m_spellInfo->SpellFamilyFlags & 0x0000000100000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000100000000))
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
// Shockwave ${$m3/100*$AP}
else if(m_spellInfo->SpellFamilyFlags & 0x0000800000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000800000000000))
{
int32 pct = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget);
if (pct > 0)
@ -400,7 +400,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_WARLOCK:
{
// Incinerate Rank 1 & 2
if((m_spellInfo->SpellFamilyFlags & 0x00004000000000LL) && m_spellInfo->SpellIconID==2128)
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x00004000000000)) && m_spellInfo->SpellIconID==2128)
{
// Incinerate does more dmg (dmg*0.25) if the target is Immolated.
if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE))
@ -411,14 +411,14 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_PRIEST:
{
// Shadow Word: Death - deals damage equal to damage done to caster
if (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000200000000))
m_caster->CastCustomSpell(m_caster, 32409, &damage, 0, 0, true);
break;
}
case SPELLFAMILY_DRUID:
{
// Ferocious Bite
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & 0x000800000) && m_spellInfo->SpellVisual[0]==6587)
if (m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000800000)) && m_spellInfo->SpellVisual[0]==6587)
{
// converts each extra point of energy into ($f1+$AP/410) additional damage
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
@ -428,22 +428,22 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
m_caster->SetPower(POWER_ENERGY,0);
}
// Rake
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000001000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000001000))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
}
// Swipe
else if(m_spellInfo->SpellFamilyFlags & 0x0010000000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0010000000000000))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f);
}
//Mangle Bonus for the initial damage of Lacerate and Rake
if((m_spellInfo->SpellFamilyFlags==0x0000000000001000LL && m_spellInfo->SpellIconID==494) ||
(m_spellInfo->SpellFamilyFlags==0x0000010000000000LL && m_spellInfo->SpellIconID==2246))
if ((m_spellInfo->SpellFamilyFlags==UI64LIT(0x0000000000001000) && m_spellInfo->SpellIconID==494) ||
(m_spellInfo->SpellFamilyFlags==UI64LIT(0x0000010000000000) && m_spellInfo->SpellIconID==2246))
{
Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
if((*i)->GetSpellProto()->SpellFamilyFlags & 0x0000044000000000LL && (*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID)
if(((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000044000000000)) && (*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID)
{
damage = int32(damage*(100.0f+(*i)->GetModifier()->m_amount)/100.0f);
break;
@ -454,7 +454,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_ROGUE:
{
// Envenom
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & 0x800000000LL))
if (m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)))
{
// consume from stack dozes not more that have combo-points
if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
@ -464,7 +464,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x10000 &&
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x10000)) &&
(*itr)->GetCasterGUID()==m_caster->GetGUID() )
{
poison = *itr;
@ -488,7 +488,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
}
}
// Eviscerate
else if((m_spellInfo->SpellFamilyFlags & 0x00020000LL) && m_caster->GetTypeId()==TYPEID_PLAYER)
else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x00020000)) && m_caster->GetTypeId()==TYPEID_PLAYER)
{
if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
{
@ -501,17 +501,17 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
}
}
// Gouge
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000008LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000008))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.21f);
}
// Instant Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002000))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.10f);
}
// Wound Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000010000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000010000000))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.04f);
}
@ -520,28 +520,28 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_HUNTER:
{
// Mongoose Bite
if((m_spellInfo->SpellFamilyFlags & 0x000000002) && m_spellInfo->SpellVisual[0]==342)
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000002)) && m_spellInfo->SpellVisual[0]==342)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
}
// Counterattack
else if(m_spellInfo->SpellFamilyFlags & 0x0008000000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0008000000000000))
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
}
// Arcane Shot
else if((m_spellInfo->SpellFamilyFlags & 0x00000800) && m_spellInfo->maxLevel > 0)
else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800)) && m_spellInfo->maxLevel > 0)
{
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.15f);
}
// Steady Shot
else if(m_spellInfo->SpellFamilyFlags & 0x100000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x100000000))
{
int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE));
damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.2f);
}
// Explosive Trap Effect
else if(m_spellInfo->SpellFamilyFlags & 0x00000004)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000004))
{
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.1f);
}
@ -550,7 +550,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case SPELLFAMILY_PALADIN:
{
// Judgement of Vengeance ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance on the target
if((m_spellInfo->SpellFamilyFlags & 0x800000000LL) && m_spellInfo->SpellIconID==2292)
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@ -570,7 +570,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
damage += damage * stacks * 10 /100;
}
// Avenger's Shield ($m1+0.07*$SPH+0.07*$AP) - ranged sdb for future
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000004000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000))
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@ -578,7 +578,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
damage += int32(ap * 0.07f) + int32(holy * 7 / 100);
}
// Hammer of Wrath ($m1+0.15*$SPH+0.15*$AP) - ranged type sdb future fix
else if(m_spellInfo->SpellFamilyFlags & 0x0000008000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000008000000000))
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@ -586,7 +586,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
damage += int32(ap * 0.15f) + int32(holy * 15 / 100);
}
// Hammer of the Righteous
else if(m_spellInfo->SpellFamilyFlags&0x0004000000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0004000000000000))
{
// Add main hand dps * effect[2] amount
float average = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
@ -594,7 +594,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
damage += count * int32(average * IN_MILISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
}
// Shield of Righteousness
else if(m_spellInfo->SpellFamilyFlags&0x0010000000000000LL)
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0010000000000000))
{
damage+=int32(m_caster->GetShieldBlockValue());
}
@ -1220,14 +1220,14 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_WARRIOR:
// Charge
if(m_spellInfo->SpellFamilyFlags & 0x1 && m_spellInfo->SpellVisual[0] == 867)
if((m_spellInfo->SpellFamilyFlags & UI64LIT(0x1)) && m_spellInfo->SpellVisual[0] == 867)
{
int32 chargeBasePoints0 = damage;
m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true);
return;
}
// Execute
if(m_spellInfo->SpellFamilyFlags & 0x20000000)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x20000000))
{
if(!unitTarget)
return;
@ -1244,7 +1244,7 @@ void Spell::EffectDummy(uint32 i)
return;
}
// Slam
if(m_spellInfo->SpellFamilyFlags & 0x0000000000200000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000200000))
{
if(!unitTarget)
return;
@ -1253,7 +1253,7 @@ void Spell::EffectDummy(uint32 i)
return;
}
// Concussion Blow
if(m_spellInfo->SpellFamilyFlags & 0x0000000004000000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000004000000))
{
m_damage+= uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
@ -1285,7 +1285,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_WARLOCK:
// Life Tap
if (m_spellInfo->SpellFamilyFlags & 0x0000000000040000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000040000))
{
// In 303 exist spirit depend
uint32 spirit = uint32(m_caster->GetStat(STAT_SPIRIT));
@ -1341,7 +1341,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_PRIEST:
// Penance
if (m_spellInfo->SpellFamilyFlags & 0x0080000000000000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0080000000000000))
{
if (!unitTarget)
return;
@ -1367,7 +1367,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_DRUID:
// Starfall
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
if (m_spellInfo->SpellFamilyFlags2 & UI64LIT(0x00000100))
{
//Shapeshifting into an animal form or mounting cancels the effect.
if(m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
@ -1443,7 +1443,7 @@ void Spell::EffectDummy(uint32 i)
uint32 classspell = itr->first;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & 0x0000024000000860LL))
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & UI64LIT(0x0000024000000860)))
((Player*)m_caster)->RemoveSpellCooldown(classspell,true);
}
return;
@ -1457,7 +1457,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_HUNTER:
// Steady Shot
if(m_spellInfo->SpellFamilyFlags & 0x100000000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x100000000))
{
if( !unitTarget || !unitTarget->isAlive())
return;
@ -1562,8 +1562,8 @@ void Spell::EffectDummy(uint32 i)
mod->value = -50;
mod->type = SPELLMOD_PCT;
mod->spellId = m_spellInfo->Id;
mod->mask = 0x0000020000000000LL;
mod->mask2= 0LL;
mod->mask = UI64LIT(0x0000020000000000);
mod->mask2= UI64LIT(0x0);
((Player*)m_caster)->AddSpellMod(mod, true);
m_caster->CastSpell(unitTarget, spell_proto, true, NULL);
@ -1693,19 +1693,19 @@ void Spell::EffectDummy(uint32 i)
return;
}
// Cleansing Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000004000000LL && m_spellInfo->SpellIconID==1673)
if((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000004000000)) && m_spellInfo->SpellIconID==1673)
{
m_caster->CastSpell(unitTarget, 52025, true);
return;
}
// Healing Stream Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002000))
{
m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
return;
}
// Mana Spring Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000000004000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000))
{
if(unitTarget->getPowerType()!=POWER_MANA)
return;
@ -1739,7 +1739,7 @@ void Spell::EffectDummy(uint32 i)
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
{
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000200000LL &&
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000200000)) &&
(*itr)->GetCastItemGUID() == item->GetGUID())
{
m_damage += m_damage * damage / 100;
@ -1752,7 +1752,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_DEATHKNIGHT:
// Death Coil
if(m_spellInfo->SpellFamilyFlags & 0x002000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x002000))
{
if(m_caster->IsFriendlyTo(unitTarget))
{
@ -2303,7 +2303,7 @@ void Spell::EffectApplyAura(uint32 i)
return;
// Prayer of Mending (jump animation), we need formal caster instead original for correct animation
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags & 0x00002000000000LL))
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x00002000000000)))
m_caster->CastSpell(unitTarget, 41637, true, NULL, Aur, m_originalCasterGUID);
}
@ -2469,7 +2469,7 @@ void Spell::EffectHeal( uint32 /*i*/ )
if(!targetAura)
{
sLog.outError("Target(GUID:" I64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
sLog.outError("Target (GUID: %u TypeId: %u) has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUIDLow(), unitTarget->GetTypeId());
return;
}
int idx = 0;
@ -4322,7 +4322,7 @@ void Spell::EffectWeaponDmg(uint32 i)
case SPELLFAMILY_WARRIOR:
{
// Whirlwind, single only spell with 2 weapon white damage apply if have
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & 0x00000400000000LL))
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000400000000)))
{
if(((Player*)m_caster)->GetWeaponForAttack(OFF_ATTACK,true))
spell_bonus += m_caster->CalculateDamage (OFF_ATTACK, normalized);
@ -4337,7 +4337,7 @@ void Spell::EffectWeaponDmg(uint32 i)
{
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if( spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR &&
spellInfo->SpellFamilyFlags & 0x0000000000004000LL &&
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000)) &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
{
(*itr).second->RefreshAura();
@ -4352,7 +4352,7 @@ void Spell::EffectWeaponDmg(uint32 i)
case SPELLFAMILY_ROGUE:
{
// Mutilate (for each hand)
if(m_spellInfo->SpellFamilyFlags & 0x600000000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x600000000))
{
bool found = false;
// fast check
@ -4380,7 +4380,7 @@ void Spell::EffectWeaponDmg(uint32 i)
case SPELLFAMILY_PALADIN:
{
// Seal of Command - receive benefit from Spell Damage and Healing
if(m_spellInfo->SpellFamilyFlags & 0x00000002000000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000002000000))
{
spellBonusNeedWeaponDamagePercentMod = true;// apply weaponDamagePercentMod to spell_bonus (and then to all bonus, fixes and weapon already have applied)
spell_bonus += int32(0.23f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
@ -4392,7 +4392,7 @@ void Spell::EffectWeaponDmg(uint32 i)
{
// Skyshatter Harness item set bonus
// Stormstrike
if(m_spellInfo->SpellFamilyFlags & 0x001000000000LL)
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x001000000000))
{
Unit::AuraList const& m_OverrideClassScript = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(Unit::AuraList::const_iterator citr = m_OverrideClassScript.begin(); citr != m_OverrideClassScript.end(); ++citr)
@ -4469,14 +4469,14 @@ void Spell::EffectWeaponDmg(uint32 i)
m_damage+= eff_damage;
// Hemorrhage
if(m_spellInfo->SpellFamilyName==SPELLFAMILY_ROGUE && (m_spellInfo->SpellFamilyFlags & 0x2000000))
if (m_spellInfo->SpellFamilyName==SPELLFAMILY_ROGUE && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x2000000)))
{
if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1);
}
// Mangle (Cat): CP
if(m_spellInfo->SpellFamilyName==SPELLFAMILY_DRUID && (m_spellInfo->SpellFamilyFlags==0x0000040000000000LL))
if (m_spellInfo->SpellFamilyName==SPELLFAMILY_DRUID && (m_spellInfo->SpellFamilyFlags==UI64LIT(0x0000040000000000)))
{
if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1);
@ -5029,7 +5029,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if(spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK &&
spellInfo->SpellFamilyFlags & 0x0000000000000002LL &&
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000002)) &&
(*itr).second->GetCasterGUID()==m_caster->GetGUID())
(*itr).second->RefreshAura();
}
@ -5053,7 +5053,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if (spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST &&
spellInfo->SpellFamilyFlags & 0x0000000000008000LL &&
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000008000)) &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
{
(*itr).second->RefreshAura();
@ -5084,29 +5084,29 @@ void Spell::EffectScriptEffect(uint32 effIndex)
continue;
// Search only Serpent Sting, Viper Sting, Scorpid Sting auras
uint64 familyFlag = aura->GetSpellProto()->SpellFamilyFlags;
if (!(familyFlag & 0x000000800000C000LL))
if (!(familyFlag & UI64LIT(0x000000800000C000)))
continue;
// Refresh aura duration
aura->RefreshAura();
// Serpent Sting - Instantly deals 40% of the damage done by your Serpent Sting.
if (familyFlag & 0x0000000000004000LL && aura->GetEffIndex() == 0)
if ((familyFlag & UI64LIT(0x0000000000004000)) && aura->GetEffIndex() == 0)
{
spellId = 53353; // 53353 Chimera Shot - Serpent
basePoint = aura->GetModifier()->m_amount * 5 * 40 / 100;
}
// Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
if (familyFlag & 0x0000008000000000LL && aura->GetEffIndex() == 0)
if ((familyFlag & UI64LIT(0x0000008000000000)) && aura->GetEffIndex() == 0)
{
spellId = 53358; // 53358 Chimera Shot - Viper
basePoint = aura->GetModifier()->m_amount * 4 * 60 / 100;
}
// Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute.
if (familyFlag & 0x0000000000008000LL)
if (familyFlag & UI64LIT(0x0000000000008000))
spellId = 53359; // 53359 Chimera Shot - Scorpid
// ?? nothing say in spell desc (possibly need addition check)
//if (familyFlag & 0x0000010000000000LL || // dot
// familyFlag & 0x0000100000000000LL) // stun
//if ((familyFlag & UI64LIT(0x0000010000000000)) || // dot
// (familyFlag & UI64LIT(0x0000100000000000))) // stun
//{
// spellId = 53366; // 53366 Chimera Shot - Wyvern
//}
@ -5123,7 +5123,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case SPELLFAMILY_PALADIN:
{
// Judgement
if (m_spellInfo->SpellFamilyFlags & 0x0000000000800000LL)
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000800000))
{
if(!unitTarget || !unitTarget->isAlive())
return;

View file

@ -138,17 +138,17 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
case SPELLFAMILY_MAGE:
{
// family flags 18(Molten), 25(Frost/Ice), 28(Mage)
if (spellInfo->SpellFamilyFlags & 0x12040000)
if (spellInfo->SpellFamilyFlags & UI64LIT(0x12040000))
return SPELL_MAGE_ARMOR;
if ((spellInfo->SpellFamilyFlags & 0x1000000) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
if ((spellInfo->SpellFamilyFlags & UI64LIT(0x1000000)) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
return SPELL_MAGE_POLYMORPH;
break;
}
case SPELLFAMILY_WARRIOR:
{
if (spellInfo->SpellFamilyFlags & 0x00008000010000LL)
if (spellInfo->SpellFamilyFlags & UI64LIT(0x00008000010000))
return SPELL_POSITIVE_SHOUT;
break;
@ -160,7 +160,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_CURSE;
// Warlock (Demon Armor | Demon Skin | Fel Armor)
if (spellInfo->SpellFamilyFlags & 0x2000002000000000LL || spellInfo->SpellFamilyFlags2 & 0x00000010)
if (spellInfo->SpellFamilyFlags & UI64LIT(0x2000002000000000) || spellInfo->SpellFamilyFlags2 & 0x00000010)
return SPELL_WARLOCK_ARMOR;
break;
@ -172,7 +172,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_STING;
// only hunter aspects have this (but not all aspects in hunter family)
if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010)
if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00003010)
return SPELL_ASPECT;
if( spellInfo->SpellFamilyFlags2 & 0x00000002 )
@ -185,10 +185,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if (IsSealSpell(spellInfo))
return SPELL_SEAL;
if (spellInfo->SpellFamilyFlags & 0x0000000011010002LL)
if (spellInfo->SpellFamilyFlags & UI64LIT(0x0000000011010002))
return SPELL_BLESSING;
if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200))
if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200))
return SPELL_JUDGEMENT;
for (int i = 0; i < 3; ++i)
@ -1191,7 +1191,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
return false;
// Improved Hamstring -> Hamstring (multi-family check)
if( (spellInfo_2->SpellFamilyFlags & 2) && spellInfo_1->Id == 23694 )
if( (spellInfo_2->SpellFamilyFlags & UI64LIT(0x2)) && spellInfo_1->Id == 23694 )
return false;
break;
@ -1223,7 +1223,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
return false;
// Improved Wing Clip -> Wing Clip (multi-family check)
if( (spellInfo_2->SpellFamilyFlags & 0x40) && spellInfo_1->Id == 19229 )
if( (spellInfo_2->SpellFamilyFlags & UI64LIT(0x40)) && spellInfo_1->Id == 19229 )
return false;
break;
}
@ -1248,13 +1248,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_MAGE )
{
// Blizzard & Chilled (and some other stacked with blizzard spells
if( (spellInfo_1->SpellFamilyFlags & 0x80) && (spellInfo_2->SpellFamilyFlags & 0x100000) ||
(spellInfo_2->SpellFamilyFlags & 0x80) && (spellInfo_1->SpellFamilyFlags & 0x100000) )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x100000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x100000)) )
return false;
// Blink & Improved Blink
if( (spellInfo_1->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_2->SpellVisual[0] == 72 && spellInfo_2->SpellIconID == 1499) ||
(spellInfo_2->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_1->SpellVisual[0] == 72 && spellInfo_1->SpellIconID == 1499) )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_2->SpellVisual[0] == 72 && spellInfo_2->SpellIconID == 1499) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_1->SpellVisual[0] == 72 && spellInfo_1->SpellIconID == 1499) )
return false;
}
// Detect Invisibility and Mana Shield (multi-family check)
@ -1298,8 +1298,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_WARRIOR )
{
// Rend and Deep Wound
if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x1000000000LL) ||
(spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x1000000000LL) )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x1000000000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x1000000000)) )
return false;
// Battle Shout and Rampage
@ -1309,7 +1309,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
}
// Hamstring -> Improved Hamstring (multi-family check)
if( (spellInfo_1->SpellFamilyFlags & 2) && spellInfo_2->Id == 23694 )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x2)) && spellInfo_2->Id == 23694 )
return false;
// Defensive Stance and Scroll of Protection (multi-family check)
@ -1325,13 +1325,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_PRIEST )
{
//Devouring Plague and Shadow Vulnerability
if( (spellInfo_1->SpellFamilyFlags & 0x2000000) && (spellInfo_2->SpellFamilyFlags & 0x800000000LL) ||
(spellInfo_2->SpellFamilyFlags & 0x2000000) && (spellInfo_1->SpellFamilyFlags & 0x800000000LL) )
if ((spellInfo_1->SpellFamilyFlags & UI64LIT(0x2000000)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x800000000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x2000000)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x800000000)))
return false;
//StarShards and Shadow Word: Pain
if( (spellInfo_1->SpellFamilyFlags & 0x200000) && (spellInfo_2->SpellFamilyFlags & 0x8000) ||
(spellInfo_2->SpellFamilyFlags & 0x200000) && (spellInfo_1->SpellFamilyFlags & 0x8000) )
if ((spellInfo_1->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x8000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x8000)))
return false;
// Dispersion
if ((spellInfo_1->Id == 47585 && spellInfo_2->Id == 60069) ||
@ -1343,8 +1343,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_DRUID )
{
//Omen of Clarity and Blood Frenzy
if( (spellInfo_1->SpellFamilyFlags == 0x0 && spellInfo_1->SpellIconID == 108) && (spellInfo_2->SpellFamilyFlags & 0x20000000000000LL) ||
(spellInfo_2->SpellFamilyFlags == 0x0 && spellInfo_2->SpellIconID == 108) && (spellInfo_1->SpellFamilyFlags & 0x20000000000000LL) )
if( (spellInfo_1->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_1->SpellIconID == 108) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x20000000000000)) ||
(spellInfo_2->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_2->SpellIconID == 108) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20000000000000)) )
return false;
// Tree of Life (Shapeshift) and 34123 Tree of Life (Passive)
@ -1398,13 +1398,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_HUNTER )
{
// Rapid Fire & Quick Shots
if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x20000000000LL) ||
(spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x20000000000LL) )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x20000000000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20000000000)) )
return false;
// Serpent Sting & (Immolation/Explosive Trap Effect)
if( (spellInfo_1->SpellFamilyFlags & 0x4) && (spellInfo_2->SpellFamilyFlags & 0x00000004000LL) ||
(spellInfo_2->SpellFamilyFlags & 0x4) && (spellInfo_1->SpellFamilyFlags & 0x00000004000LL) )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x4)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x00000004000)) ||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x4)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x00000004000)) )
return false;
// Bestial Wrath
@ -1413,7 +1413,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
}
// Wing Clip -> Improved Wing Clip (multi-family check)
if( (spellInfo_1->SpellFamilyFlags & 0x40) && spellInfo_2->Id == 19229 )
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x40)) && spellInfo_2->Id == 19229 )
return false;
// Concussive Shot and Imp. Concussive Shot (multi-family check)
@ -2712,34 +2712,34 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
case SPELLFAMILY_ROGUE:
{
// Kidney Shot
if (spellproto->SpellFamilyFlags & 0x00000200000LL)
if (spellproto->SpellFamilyFlags & UI64LIT(0x00000200000))
return DIMINISHING_KIDNEYSHOT;
// Blind
else if (spellproto->SpellFamilyFlags & 0x00001000000LL)
else if (spellproto->SpellFamilyFlags & UI64LIT(0x00001000000))
return DIMINISHING_BLIND_CYCLONE;
break;
}
case SPELLFAMILY_WARLOCK:
{
// Fear
if (spellproto->SpellFamilyFlags & 0x40840000000LL)
if (spellproto->SpellFamilyFlags & UI64LIT(0x40840000000))
return DIMINISHING_WARLOCK_FEAR;
// Curses/etc
else if (spellproto->SpellFamilyFlags & 0x00080000000LL)
else if (spellproto->SpellFamilyFlags & UI64LIT(0x00080000000))
return DIMINISHING_LIMITONLY;
break;
}
case SPELLFAMILY_DRUID:
{
// Cyclone
if (spellproto->SpellFamilyFlags & 0x02000000000LL)
if (spellproto->SpellFamilyFlags & UI64LIT(0x02000000000))
return DIMINISHING_BLIND_CYCLONE;
break;
}
case SPELLFAMILY_WARRIOR:
{
// Hamstring - limit duration to 10s in PvP
if (spellproto->SpellFamilyFlags & 0x00000000002LL)
if (spellproto->SpellFamilyFlags & UI64LIT(0x00000000002))
return DIMINISHING_LIMITONLY;
break;
}

View file

@ -67,15 +67,15 @@ enum SpellFamilyNames
};
//Some SpellFamilyFlags
#define SPELLFAMILYFLAG_ROGUE_VANISH 0x000000800LL
#define SPELLFAMILYFLAG_ROGUE_STEALTH 0x000400000LL
#define SPELLFAMILYFLAG_ROGUE_BACKSTAB 0x000800004LL
#define SPELLFAMILYFLAG_ROGUE_SAP 0x000000080LL
#define SPELLFAMILYFLAG_ROGUE_FEINT 0x008000000LL
#define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT 0x000200000LL
#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE 0x9003E0000LL
#define SPELLFAMILYFLAG_ROGUE_VANISH UI64LIT(0x000000800)
#define SPELLFAMILYFLAG_ROGUE_STEALTH UI64LIT(0x000400000)
#define SPELLFAMILYFLAG_ROGUE_BACKSTAB UI64LIT(0x000800004)
#define SPELLFAMILYFLAG_ROGUE_SAP UI64LIT(0x000000080)
#define SPELLFAMILYFLAG_ROGUE_FEINT UI64LIT(0x008000000)
#define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT UI64LIT(0x000200000)
#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE UI64LIT(0x9003E0000)
#define SPELLFAMILYFLAG_PALADIN_SEALS 0x26000C000A000000LL
#define SPELLFAMILYFLAG_PALADIN_SEALS UI64LIT(0x26000C000A000000)
// Spell clasification
enum SpellSpecific
{
@ -130,7 +130,7 @@ inline bool IsSealSpell(SpellEntry const *spellInfo)
inline bool IsElementalShield(SpellEntry const *spellInfo)
{
// family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
return (spellInfo->SpellFamilyFlags & 0x42000000400LL) || spellInfo->Id == 23552;
return (spellInfo->SpellFamilyFlags & UI64LIT(0x42000000400)) || spellInfo->Id == 23552;
}
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)

View file

@ -3737,7 +3737,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
{
// Custom dispel case
// Unstable Affliction
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags & 0x010000000000LL))
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x010000000000)))
{
int32 damage = aur->GetModifier()->m_amount*9;
uint64 caster_guid = aur->GetCasterGUID();
@ -4547,7 +4547,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
if(SpellEntry const* iterSpellProto = (*iter)->GetSpellProto())
{
if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & 0x10000000))
if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & UI64LIT(0x10000000)))
{
found=true;
break;
@ -4943,7 +4943,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Incanter's Regalia set (add trigger chance to Mana Shield)
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
{
if(GetTypeId() != TYPEID_PLAYER)
return false;
@ -4995,7 +4995,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARRIOR:
{
// Retaliation
if(dummySpell->SpellFamilyFlags==0x0000000800000000LL)
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0000000800000000))
{
// check attack comes not from behind
if (!HasInArc(M_PI, pVictim))
@ -5039,7 +5039,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARLOCK:
{
// Seed of Corruption
if (dummySpell->SpellFamilyFlags & 0x0000001000000000LL)
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
{
Modifier* mod = triggeredByAura->GetModifier();
// if damage is more than need or target die from damage deal finish spell
@ -5061,7 +5061,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return true;
}
// Seed of Corruption (Mobs cast) - no die req
if (dummySpell->SpellFamilyFlags == 0x00LL && dummySpell->SpellIconID == 1932)
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->SpellIconID == 1932)
{
Modifier* mod = triggeredByAura->GetModifier();
// if damage is more than need deal finish spell
@ -5142,7 +5142,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_PRIEST:
{
// Vampiric Touch
if( dummySpell->SpellFamilyFlags & 0x0000040000000000LL )
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
{
if(!pVictim || !pVictim->isAlive())
return false;
@ -5184,10 +5184,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case 40438:
{
// Shadow Word: Pain
if( procSpell->SpellFamilyFlags & 0x0000000000008000LL )
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
triggered_spell_id = 40441;
// Renew
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
triggered_spell_id = 40440;
else
return false;
@ -5269,19 +5269,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance;
// Starfire
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL )
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
{
triggered_spell_id = 40445;
chance = 25.0f;
}
// Rejuvenation
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
{
triggered_spell_id = 40446;
chance = 25.0f;
}
// Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL )
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000044000000000))
{
triggered_spell_id = 40452;
chance = 40.0f;
@ -5312,7 +5312,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (effIndex!=0)
return true;
// Wrath crit
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
{
if (!roll_chance_i(60))
return false;
@ -5321,7 +5321,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Starfire crit
if (procSpell->SpellFamilyFlags & 0x0000000000000004LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
{
triggered_spell_id = 48517;
target = this;
@ -5363,7 +5363,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
SpellEntry const *spellProto = (*itr)->GetSpellProto();
if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
spellProto->SpellFamilyFlags & 0x0000000000040000LL)
(spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000)))
{
(*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto));
(*itr)->RefreshAura();
@ -5398,7 +5398,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_HUNTER:
{
// Aspect of the Viper
if ( dummySpell->SpellFamilyFlags & 0x4000000000000LL )
if (dummySpell->SpellFamilyFlags & UI64LIT(0x4000000000000))
{
uint32 maxmana = GetMaxPower(POWER_MANA);
basepoints0 = maxmana* GetAttackTime(RANGED_ATTACK)/1000.0f/100.0f;
@ -5444,7 +5444,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if ( dummySpell->SpellIconID == 3560 )
{
// This effect only from Rapid Killing (mana regen)
if (!(procSpell->SpellFamilyFlags & 0x0100000000000000LL))
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
return false;
triggered_spell_id = 56654;
target = this;
@ -5455,7 +5455,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_PALADIN:
{
// Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
if (dummySpell->SpellFamilyFlags&0x000000008000000LL && effIndex==0)
if ((dummySpell->SpellFamilyFlags & UI64LIT(0x000000008000000)) && effIndex==0)
{
triggered_spell_id = 25742;
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
@ -5465,7 +5465,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Sacred Shield
if (dummySpell->SpellFamilyFlags&0x0008000000000000LL)
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0008000000000000))
{
triggered_spell_id = 58597;
target = this;
@ -5607,13 +5607,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance;
// Flash of light/Holy light
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x00000000C0000000))
{
triggered_spell_id = 40471;
chance = 15.0f;
}
// Judgement
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL )
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000800000))
{
triggered_spell_id = 40472;
chance = 50.0f;
@ -5773,17 +5773,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false;
float chance;
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
{
triggered_spell_id = 40465; // Lightning Bolt
chance = 15.0f;
}
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL)
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080))
{
triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.0f;
}
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL)
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
{
triggered_spell_id = 40466; // Stormstrike
chance = 50.0f;
@ -5829,7 +5829,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Earth Shield
if(dummySpell->SpellFamilyFlags & 0x0000040000000000LL)
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
{
basepoints0 = triggerAmount;
target = this;
@ -5840,14 +5840,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (dummySpell->SpellIconID == 2287)
{
// Lesser Healing Wave need aditional 60% roll
if (procSpell->SpellFamilyFlags & 0x0000000000000080LL && !roll_chance_i(60))
if ((procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)) && !roll_chance_i(60))
return false;
// lookup water shield
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
{
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000002000000000LL)
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000002000000000)))
{
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
CastSpell(this, spell, true, castItem, triggeredByAura);
@ -5908,12 +5908,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
mod->value = -100;
mod->type = SPELLMOD_PCT;
mod->spellId = dummySpell->Id;
mod->mask = 0x0000000000000003LL;
mod->mask2= 0LL;
mod->mask = UI64LIT(0x0000000000000003);
mod->mask2= UI64LIT(0x0);
((Player*)this)->AddSpellMod(mod, true);
// Remove cooldown (Chain Lightning - have Category Recovery time)
if (procSpell->SpellFamilyFlags & 0x0000000000000002LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000002))
((Player*)this)->RemoveSpellCooldown(spellId);
CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
@ -5933,7 +5933,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
{
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL)
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
{
uint32 spell = 0;
switch ((*itr)->GetId())
@ -6000,7 +6000,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Vendetta
if (dummySpell->SpellFamilyFlags & 0x0000000000010000LL)
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000010000))
{
basepoints0 = triggerAmount * GetMaxHealth() / 100;
triggered_spell_id = 50181;
@ -6263,10 +6263,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
uint32 tick = 1; // Default tick = 1
// Hellfire have 15 tick
if (procSpell->SpellFamilyFlags&0x0000000000000040LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000040))
tick = 15;
// Rain of Fire have 4 tick
else if (procSpell->SpellFamilyFlags&0x0000000000000020LL)
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000020))
tick = 4;
else
return false;
@ -6285,7 +6285,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
trigger_spell_id = 18093;
}
// Drain Soul
else if (auraSpellInfo->SpellFamilyFlags & 0x0000000000004000LL)
else if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000))
{
Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
@ -6414,7 +6414,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
// procspell is triggered spell but we need mana cost of original casted spell
uint32 originalSpellId = procSpell->Id;
// Holy Shock heal
if(procSpell->SpellFamilyFlags & 0x0001000000000000LL)
if (procSpell->SpellFamilyFlags & UI64LIT(0x0001000000000000))
{
switch(procSpell->Id)
{
@ -6482,7 +6482,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case SPELLFAMILY_SHAMAN:
{
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
if(auraSpellInfo->SpellFamilyFlags & 0x0000000000000400)
if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000400))
{
switch(auraSpellInfo->Id)
{
@ -6661,7 +6661,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case 53232:
{
// This effect only from Rapid Fire (ability cast)
if (!(procSpell->SpellFamilyFlags & 0x0000000000000020LL))
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000020)))
return false;
break;
}
@ -6719,7 +6719,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
if(!procSpell)
return false;
// For trigger from Blizzard need exist Improved Blizzard
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags & 0x0000000000000080LL)
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)))
{
bool found = false;
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
@ -7689,7 +7689,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
{
SpellEntry const* m_spell = itr->second->GetSpellProto();
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & 0x0004071B8044C402LL))
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & UI64LIT(0x0004071B8044C402)))
continue;
modPercent += stepPercent * itr->second->GetStackAmount();
if (modPercent >= maxPercent)
@ -7709,7 +7709,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
break;
case 5481: // Starfire Bonus
{
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x0000000000200002LL))
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x0000000000200002)))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -7736,7 +7736,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
else // Tundra Stalker
{
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT, 0x0400000000000000LL))
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT, UI64LIT(0x0400000000000000)))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -7744,14 +7744,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
case 7293: // Rage of Rivendare
{
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0x0200000000000000LL))
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, UI64LIT(0x0200000000000000)))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
// Twisted Faith
case 7377:
{
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x0000000000008000LL, 0, GetGUID()))
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000000000008000), 0, GetGUID()))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -7762,7 +7762,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
case 7601:
case 7602:
{
if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, 0x0000000000000400LL))
if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, UI64LIT(0x0000000000000400)))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -8038,7 +8038,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
{
case SPELLFAMILY_PALADIN:
// Sacred Shield
if (spellProto->SpellFamilyFlags & 0x0000000040000000LL)
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))
{
Aura *aura = pVictim->GetDummyAura(58597);
if (aura && aura->GetCasterGUID() == GetGUID())
@ -8048,9 +8048,9 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break;
case SPELLFAMILY_SHAMAN:
// Lava Burst
if (spellProto->SpellFamilyFlags & 0x0000100000000000LL)
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000100000000000))
{
if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x0000000010000000LL, 0, GetGUID()))
if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, UI64LIT(0x0000000010000000), 0, GetGUID()))
{
// Consume shock aura if not have Glyph of Flame Shock
if (!GetAura(55447, 0))
@ -8202,7 +8202,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
break;
case 7798: // Glyph of Regrowth
{
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x0000000000000040LL))
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, UI64LIT(0x0000000000000040)))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -8217,7 +8217,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
continue;
SpellEntry const* m_spell = itr->second->GetSpellProto();
if (m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
!(m_spell->SpellFamilyFlags & 0x0000001000000050LL))
!(m_spell->SpellFamilyFlags & UI64LIT(0x0000001000000050)))
continue;
modPercent += stepPercent * itr->second->GetStackAmount();
}
@ -8226,7 +8226,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
}
case 7871: // Glyph of Lesser Healing Wave
{
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x0000040000000000LL, 0, GetGUID()))
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, UI64LIT(0x0000040000000000), 0, GetGUID()))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break;
}
@ -8322,7 +8322,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Taken mods
// Healing Wave cast
if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags & 0x0000000000000040LL)
if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000040)))
{
// Search for Healing Way on Victim
Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
@ -8620,7 +8620,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
if(spellProto==NULL)
break;
// Should increase Shred (initial Damage of Lacerate and Rake handled in Spell::EffectSchoolDMG)
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags==0x00008000LL))
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags == UI64LIT(0x00008000)))
TakenTotalMod *= (100.0f+(*i)->GetModifier()->m_amount)/100.0f;
break;
}

View file

@ -1372,7 +1372,7 @@ void World::SetInitialWorldSettings()
sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d",
local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec);
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " I64FMTD ", '%s', 0)",
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " UI64FMTD ", '%s', 0)",
realmID, uint64(m_startTime), isoDate);
m_timers[WUPDATE_OBJECTS].SetInterval(0);
@ -1542,7 +1542,7 @@ void World::Update(uint32 diff)
uint32 maxClientsNum = GetMaxActiveSessionCount();
m_timers[WUPDATE_UPTIME].Reset();
loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " I64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime));
loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " UI64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime));
}
/// <li> Handle all other objects

View file

@ -118,8 +118,8 @@ void WorldSession::SendPacket(WorldPacket const* packet)
{
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
sLog.outDetail("Send all time packets count: " I64FMTD " bytes: " I64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u",sendPacketCount,sendPacketBytes,float(sendPacketCount)/fullTime,float(sendPacketBytes)/fullTime,uint32(fullTime));
sLog.outDetail("Send last min packets count: " I64FMTD " bytes: " I64FMTD " avr.count/sec: %f avr.bytes/sec: %f",sendLastPacketCount,sendLastPacketBytes,float(sendLastPacketCount)/minTime,float(sendLastPacketBytes)/minTime);
sLog.outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u",sendPacketCount,sendPacketBytes,float(sendPacketCount)/fullTime,float(sendPacketBytes)/fullTime,uint32(fullTime));
sLog.outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f",sendLastPacketCount,sendLastPacketBytes,float(sendLastPacketCount)/minTime,float(sendLastPacketBytes)/minTime);
lastTime = cur_time;
sendLastPacketCount = 1;

View file

@ -98,6 +98,7 @@
#include "LockedQueue.h"
#include "Threading.h"
#include <ace/Basic_Types.h>
#include <ace/Guard_T.h>
#include <ace/RW_Thread_Mutex.h>
#include <ace/Thread_Mutex.h>
@ -125,8 +126,6 @@
#include <float.h>
#define I64FMT "%016I64X"
#define I64FMTD "%I64u"
#define SI64FMTD "%I64d"
#define snprintf _snprintf
#define atoll __atoi64
#define vsnprintf _vsnprintf
@ -138,10 +137,15 @@
#define stricmp strcasecmp
#define strnicmp strncasecmp
#define I64FMT "%016llX"
#define I64FMTD "%llu"
#define SI64FMTD "%lld"
#endif
#define UI64FMTD ACE_UINT64_FORMAT_SPECIFIER
#define UI64LIT(N) ACE_UINT64_LITERAL(N)
#define SI64FMTD ACE_INT64_FORMAT_SPECIFIER
#define SI64LIT(N) ACE_INT64_LITERAL(N)
inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
#define atol(a) strtoul( a, NULL, 10)

View file

@ -57,7 +57,7 @@ class Field
if(mValue)
{
uint64 value;
sscanf(mValue,I64FMTD,&value);
sscanf(mValue,UI64FMTD,&value);
return value;
}
else

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7917"
#define REVISION_NR "7918"
#endif // __REVISION_NR_H__