Tab to Spaces and remove of trailing spaces

--HG--
branch : trunk
This commit is contained in:
Spp
2010-04-11 20:20:38 +02:00
parent c592fc7580
commit 65c3e979e2
38 changed files with 295 additions and 295 deletions
+30 -30
View File
@@ -312,7 +312,7 @@ void ArenaTeam::Disband(WorldSession *session)
// event
if (session)
{
// probably only 1 string required...
// probably only 1 string required...
BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), "");
}
@@ -487,36 +487,36 @@ void ArenaTeam::BroadcastPacket(WorldPacket *packet)
}
}
void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCount, std::string str1, std::string str2, std::string str3)
{
WorldPacket data(SMSG_ARENA_TEAM_EVENT, 1+1+1);
data << uint8(event);
data << uint8(strCount);
switch (strCount)
{
case 0:
break;
case 1:
data << str1;
break;
case 2:
data << str1 << str2;
break;
case 3:
data << str1 << str2 << str3;
break;
default:
sLog.outError("Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
return;
void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCount, std::string str1, std::string str2, std::string str3)
{
WorldPacket data(SMSG_ARENA_TEAM_EVENT, 1+1+1);
data << uint8(event);
data << uint8(strCount);
switch (strCount)
{
case 0:
break;
case 1:
data << str1;
break;
case 2:
data << str1 << str2;
break;
case 3:
data << str1 << str2 << str3;
break;
default:
sLog.outError("Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
return;
}
if (guid)
data << uint64(guid);
BroadcastPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_EVENT");
}
if (guid)
data << uint64(guid);
BroadcastPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_EVENT");
}
uint8 ArenaTeam::GetSlotByType(uint32 type)
{
@@ -697,7 +697,7 @@ void ArenaTeam::MemberWon(Player * plr, uint32 againstRating)
itr->wins_season += 1;
itr->wins_week += 1;
// update unit fields
plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->games_week);
plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->games_week);
plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_SEASON, itr->games_season);
return;
}
+5 -5
View File
@@ -44,11 +44,11 @@ enum ArenaTeamCommandErrors
ERR_ARENA_TEAM_PLAYER_NOT_IN_TEAM_SS = 0x0A,
ERR_ARENA_TEAM_PLAYER_NOT_FOUND_S = 0x0B,
ERR_ARENA_TEAM_NOT_ALLIED = 0x0C,
ERR_ARENA_TEAM_IGNORING_YOU_S = 0x13,
ERR_ARENA_TEAM_TARGET_TOO_LOW_S = 0x15,
ERR_ARENA_TEAM_TARGET_TOO_HIGH_S = 0x16,
ERR_ARENA_TEAM_TOO_MANY_MEMBERS_S = 0x17,
ERR_ARENA_TEAM_NOT_FOUND = 0x1B,
ERR_ARENA_TEAM_IGNORING_YOU_S = 0x13,
ERR_ARENA_TEAM_TARGET_TOO_LOW_S = 0x15,
ERR_ARENA_TEAM_TARGET_TOO_HIGH_S = 0x16,
ERR_ARENA_TEAM_TOO_MANY_MEMBERS_S = 0x17,
ERR_ARENA_TEAM_NOT_FOUND = 0x1B,
ERR_ARENA_TEAMS_LOCKED = 0x1E
};
+2 -2
View File
@@ -68,8 +68,8 @@ void WorldSession::SendAuctionHello(uint64 guid, Creature* unit)
return;
WorldPacket data(MSG_AUCTION_HELLO, 12);
data << uint64(guid);
data << uint32(ahEntry->houseId);
data << uint64(guid);
data << uint32(ahEntry->houseId);
data << uint8(1); // 3.3.3: 1 - AH enabled, 0 - AH disabled
SendPacket(&data);
}
+21 -21
View File
@@ -152,15 +152,15 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
if (joinAsGroup /* && _player->GetGroup()*/)
{
GroupQueueInfo * ginfo;
GroupQueueInfo * ginfo;
uint32 avgTime;
if(err > 0)
{
sLog.outDebug("Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
@@ -168,15 +168,15 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (!member) continue; // this should never happen
WorldPacket data;
if(err <= 0)
{
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
continue;
if(err <= 0)
{
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
continue;
}
// add to queue
// add to queue
uint32 queueSlot = member->AddBattleGroundQueueId(bgQueueTypeId);
// send status packet (in queue)
@@ -664,7 +664,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (!grp)
return;
if (grp->GetLeaderGUID() != _player->GetGUID())
return;
return;
err = grp->CanJoinBattleGroundQueue(bg, bgQueueTypeId, arenatype, arenatype, (bool)isRated, arenaslot);
}
@@ -704,11 +704,11 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
if (asGroup)
{
uint32 avgTime;
if(err > 0)
{
sLog.outDebug("Battleground: arena join as group start");
uint32 avgTime;
if(err > 0)
{
sLog.outDebug("Battleground: arena join as group start");
if (isRated)
{
sLog.outDebug("Battleground: arena team id %u, leader %s queued with rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),arenaRating,arenatype);
@@ -717,8 +717,8 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
else
bg->SetRated(false);
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, ateamId);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, ateamId);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
@@ -728,7 +728,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
continue;
WorldPacket data;
if (err <= 0)
{
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
@@ -737,7 +737,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
}
// add to queue
uint32 queueSlot = member->AddBattleGroundQueueId(bgQueueTypeId);
uint32 queueSlot = member->AddBattleGroundQueueId(bgQueueTypeId);
// send status packet (in queue)
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
+14 -14
View File
@@ -1844,25 +1844,25 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint6
*data << uint8(fromWhere); // from where you joined
*data << uint32(bgTypeId); // battleground id
*data << uint8(0); // unk
*data << uint8(0); // unk
*data << uint8(0); // unk
// Rewards
*data << uint8(0); // 3.3.3 hasWin
*data << uint32(0); // 3.3.3 winHonor
*data << uint32(0); // 3.3.3 winArena
*data << uint8(0); // 3.3.3 hasWin
*data << uint32(0); // 3.3.3 winHonor
*data << uint32(0); // 3.3.3 winArena
*data << uint32(0); // 3.3.3 lossHonor
uint8 isRandom = 0;
*data << uint8(isRandom); // 3.3.3 isRandom
if (isRandom)
{
// Rewards (random)
*data << uint8(0); // 3.3.3 hasWin_Random
*data << uint32(0); // 3.3.3 winHonor_Random
uint8 isRandom = 0;
*data << uint8(isRandom); // 3.3.3 isRandom
if (isRandom)
{
// Rewards (random)
*data << uint8(0); // 3.3.3 hasWin_Random
*data << uint32(0); // 3.3.3 winHonor_Random
*data << uint32(0); // 3.3.3 winArena_Random
*data << uint32(0); // 3.3.3 lossHonor_Random
}
if (bgTypeId == BATTLEGROUND_AA) // arena
{
*data << uint32(0); // unk (count?)
+1 -1
View File
@@ -549,7 +549,7 @@ WorldSafeLocsEntry const* BattleGroundSA::GetClosestGraveYard(Player* player)
dist = sqrt((ret->x - x)*(ret->x - x) + (ret->y - y)*(ret->y - y)+(ret->z - z)*(ret->z - z));
if (dist < nearest)
{
closest = ret;
closest = ret;
nearest = dist;
}
}
+13 -13
View File
@@ -734,23 +734,23 @@ void WorldSession::SendPlayerNotFoundNotice(std::string name)
data << name;
SendPacket(&data);
}
void WorldSession::SendPlayerAmbiguousNotice(std::string name)
void WorldSession::SendPlayerAmbiguousNotice(std::string name)
{
WorldPacket data(SMSG_CHAT_PLAYER_AMBIGUOUS, name.size()+1);
data << name;
SendPacket(&data);
}
SendPacket(&data);
}
void WorldSession::SendWrongFactionNotice()
{
WorldPacket data(SMSG_CHAT_WRONG_FACTION, 0);
SendPacket(&data);
}
void WorldSession::SendChatRestrictedNotice(ChatRestrictionType restriction)
{
void WorldSession::SendWrongFactionNotice()
{
WorldPacket data(SMSG_CHAT_WRONG_FACTION, 0);
SendPacket(&data);
}
void WorldSession::SendChatRestrictedNotice(ChatRestrictionType restriction)
{
WorldPacket data(SMSG_CHAT_RESTRICTED, 1);
data << uint8(restriction);
SendPacket(&data);
SendPacket(&data);
}
+5 -5
View File
@@ -209,11 +209,11 @@ enum AchievementCriteriaTypes
// 0..115 => 116 criteria types total
ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115,
ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS = 119,
// 120
// 121
// 122
// 123
// 0..123 => 124 criteria types total
// 120
// 121
// 122
// 123
// 0..123 => 124 criteria types total
ACHIEVEMENT_CRITERIA_TYPE_TOTAL = 124,
};
+4 -4
View File
@@ -403,7 +403,7 @@ void LoadDBCStores(const std::string& dataPath)
{
SpellDifficultyEntry const *spellDiff = sSpellDifficultyStore.LookupEntry(i);
if (!spellDiff)
continue;
continue;
for(int x = 0; x < MAX_DIFFICULTY; ++x)
{
if(spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x]))
@@ -556,10 +556,10 @@ void LoadDBCStores(const std::string& dataPath)
// Check loaded DBC files proper version
if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.3a
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.3a
!sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.3a
!sItemStore.LookupEntry(54860) || // last gem property added in 3.3.3a
!sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.3a
!sItemStore.LookupEntry(54860) || // last gem property added in 3.3.3a
!sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.3a
!sMapStore.LookupEntry(724) || // last map added in 3.3.3a
!sMapStore.LookupEntry(724) || // last map added in 3.3.3a
!sSpellStore.LookupEntry(76567) ) // last client known item added in 3.3.3a
{
sLog.outError("\nYou have _outdated_ DBC files. Please extract correct versions from current using client.");
+6 -6
View File
@@ -596,12 +596,12 @@ struct BattlemasterListEntry
uint32 id; // 0
int32 mapid[8]; // 1-8 mapid
uint32 type; // 9 (3 - BG, 4 - arena)
//uint32 canJoinAsGroup; // 10 (0 or 1)
char* name[16]; // 11-26
//uint32 nameFlags // 27 string flag, unused
uint32 maxGroupSize; // 28 maxGroupSize, used for checking if queue as group
//uint32 HolidayWorldStateId; // 29 new 3.1
//uint32 MinLevel; // 30
//uint32 canJoinAsGroup; // 10 (0 or 1)
char* name[16]; // 11-26
//uint32 nameFlags // 27 string flag, unused
uint32 maxGroupSize; // 28 maxGroupSize, used for checking if queue as group
//uint32 HolidayWorldStateId; // 29 new 3.1
//uint32 MinLevel; // 30
//uint32 SomeLevel; // 31, may be max level
};
+9 -9
View File
@@ -167,15 +167,15 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID)
data << uint32(questID);
data << uint32(qItem.m_qIcon);
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
std::string Title = pQuest->GetTitle();
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
if (QuestLocale const *ql = objmgr.GetQuestLocale(questID))
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
Title = ql->Title[loc_idx];
Title = ql->Title[loc_idx];
data << Title; // max 0x200
}
@@ -192,8 +192,8 @@ void PlayerMenu::CloseGossip()
void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, char const * locName)
{
WorldPacket data(SMSG_GOSSIP_POI, (4+4+4+4+4+10)); // guess size
data << uint32(Flags);
data << float(X);
data << uint32(Flags);
data << float(X);
data << float(Y);
data << uint32(Icon);
data << uint32(Data);
@@ -411,8 +411,8 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
data << uint32(questID);
data << uint32(qmi.m_qIcon);
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
data << title;
}
pSession->SendPacket(&data);
@@ -707,8 +707,8 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << Title;
data << OfferRewardText;
data << uint8(EnableNext ? 1 : 0); // Auto Finish
data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags
data << uint8(EnableNext ? 1 : 0); // Auto Finish
data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags
data << uint32(pQuest->GetSuggestedPlayers()); // SuggestedGroupNum
uint32 EmoteCount = 0;
+8 -8
View File
@@ -1485,19 +1485,19 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
}
}
GroupJoinBattlegroundResult Group::CanJoinBattleGroundQueue(BattleGround const* bgOrTemplate, BattleGroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot)
GroupJoinBattlegroundResult Group::CanJoinBattleGroundQueue(BattleGround const* bgOrTemplate, BattleGroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot)
{
BattlemasterListEntry const* bgEntry = sBattlemasterListStore.LookupEntry(bgOrTemplate->GetTypeID());
if (!bgEntry)
return ERR_GROUP_JOIN_BATTLEGROUND_FAIL; // shouldn't happen
if (!bgEntry)
return ERR_GROUP_JOIN_BATTLEGROUND_FAIL; // shouldn't happen
// check for min / max count
uint32 memberscount = GetMembersCount();
// only check for MinPlayerCount since MinPlayerCount == MaxPlayerCount for arenas...
if (bgOrTemplate->isArena() && memberscount != MinPlayerCount)
return ERR_ARENA_TEAM_PARTY_SIZE;
// only check for MinPlayerCount since MinPlayerCount == MaxPlayerCount for arenas...
if (bgOrTemplate->isArena() && memberscount != MinPlayerCount)
return ERR_ARENA_TEAM_PARTY_SIZE;
if (memberscount > bgEntry->maxGroupSize) // no MinPlayerCount for battlegrounds
return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side
+7 -7
View File
@@ -52,7 +52,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string&
data << (uint32)operation;
data << member;
data << (uint32)res;
data << uint32(0); // LFD cooldown related (used with ERR_PARTY_LFG_BOOT_COOLDOWN_S and ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S)
data << uint32(0); // LFD cooldown related (used with ERR_PARTY_LFG_BOOT_COOLDOWN_S and ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S)
SendPacket(&data);
}
@@ -167,12 +167,12 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
// ok, we do it
WorldPacket data(SMSG_GROUP_INVITE, 10); // guess size
data << uint8(1); // invited/already in group flag
data << GetPlayer()->GetName(); // max len 48
data << uint32(0); // unk
data << uint8(0); // count
//for(int i = 0; i < count; ++i)
// data << uint32(0);
data << uint8(1); // invited/already in group flag
data << GetPlayer()->GetName(); // max len 48
data << uint32(0); // unk
data << uint8(0); // count
//for(int i = 0; i < count; ++i)
// data << uint32(0);
data << uint32(0); // unk
player->GetSession()->SendPacket(&data);
+4 -4
View File
@@ -854,11 +854,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
WorldPacket data(SMSG_BUY_BANK_SLOT_RESULT, 4);
WorldPacket data(SMSG_BUY_BANK_SLOT_RESULT, 4);
if (!slotEntry)
{
data << uint32(ERR_BANKSLOT_FAILED_TOO_MANY);
data << uint32(ERR_BANKSLOT_FAILED_TOO_MANY);
SendPacket(&data);
return;
}
@@ -867,7 +867,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
if (_player->GetMoney() < price)
{
data << uint32(ERR_BANKSLOT_INSUFFICIENT_FUNDS);
data << uint32(ERR_BANKSLOT_INSUFFICIENT_FUNDS);
SendPacket(&data);
return;
}
@@ -876,7 +876,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
_player->ModifyMoney(-int32(price));
data << uint32(ERR_BANKSLOT_OK);
SendPacket(&data);
SendPacket(&data);
_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT);
}
+21 -21
View File
@@ -596,7 +596,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
data << uint32((*itr)->checked); // flags
data << float(((*itr)->expire_time-time(NULL))/DAY); // Time
data << uint32((*itr)->mailTemplateId); // mail template (MailTemplate.dbc)
data << (*itr)->subject; // Subject string - once 00, when mail type = 3, max 256
data << (*itr)->subject; // Subject string - once 00, when mail type = 3, max 256
data << (*itr)->body; // message? max 8000
data << uint8(item_count); // client limit is 0x10
@@ -646,22 +646,22 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
///this function is called when client needs mail message body, or when player clicks on item which has ITEM_FIELD_ITEM_TEXT_ID > 0
void WorldSession::HandleItemTextQuery(WorldPacket & recv_data)
{
uint64 itemGuid;
uint64 itemGuid;
recv_data >> itemGuid;
sLog.outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size
if (Item *item = _player->GetItemByGuid(itemGuid))
{
data << uint8(0); // has text
data << uint64(itemGuid); // item guid
data << objmgr.GetItemText(item->GetGUIDLow()); // max 8000
}
else
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size
if (Item *item = _player->GetItemByGuid(itemGuid))
{
data << uint8(1); // no text
data << uint8(0); // has text
data << uint64(itemGuid); // item guid
data << objmgr.GetItemText(item->GetGUIDLow()); // max 8000
}
else
{
data << uint8(1); // no text
}
SendPacket(&data);
}
@@ -687,11 +687,11 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
return;
}
Item *bodyItem = new Item; // This is not bag and then can be used new Item.
Item *bodyItem = new Item; // This is not bag and then can be used new Item.
if (!bodyItem->Create(objmgr.GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
{
{
delete bodyItem;
return;
return;
}
// in mail template case we need create new item text
@@ -706,10 +706,10 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
objmgr.CreateItemText(bodyItem->GetGUIDLow(), mailTemplateEntry->content[GetSessionDbcLocale()]);
}
else
else
objmgr.CreateItemText(bodyItem->GetGUIDLow(), m->body);
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_REFUNDABLE_2 | ITEM_FLAGS_UNK1);
sLog.outDetail("HandleMailCreateTextItem mailid=%u",mailId);
@@ -960,11 +960,11 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
CharacterDatabase.BeginTransaction();
CharacterDatabase.escape_string(safe_subject);
std::string safe_body = GetBody();
CharacterDatabase.BeginTransaction();
CharacterDatabase.escape_string(safe_body);
std::string safe_body = GetBody();
CharacterDatabase.BeginTransaction();
CharacterDatabase.escape_string(safe_body);
CharacterDatabase.PExecute("INSERT INTO mail (id,messageType,stationery,mailTemplateId,sender,receiver,subject,body,has_items,expire_time,deliver_time,money,cod,checked) "
CharacterDatabase.PExecute("INSERT INTO mail (id,messageType,stationery,mailTemplateId,sender,receiver,subject,body,has_items,expire_time,deliver_time,money,cod,checked) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '%s', '%s', '%u', '" UI64FMTD "','" UI64FMTD "', '%u', '%u', '%d')",
mailId, sender.GetMailMessageType(), sender.GetStationery(), GetMailTemplateId(), sender.GetSenderId(), receiver.GetPlayerGUIDLow(), safe_subject.c_str(), safe_body.c_str(),(m_items.empty() ? 0 : 1), (uint64)expire_time, (uint64)deliver_time, m_money, m_COD, checked);
+13 -13
View File
@@ -217,7 +217,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
WorldPacket data(SMSG_WHO, 50); // guess size
data << uint32(clientcount); // clientcount place holder, listed count
data << uint32(clientcount); // clientcount place holder, listed count
data << uint32(clientcount); // clientcount place holder, online count
ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
@@ -328,8 +328,8 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
break;
}
uint32 count = m.size();
data.put( 0, clientcount ); // insert right count, listed count
uint32 count = m.size();
data.put( 0, clientcount ); // insert right count, listed count
data.put( 4, count > 50 ? count : clientcount ); // insert right count, online count
SendPacket(&data);
@@ -756,8 +756,8 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
recv_data >> guid;
recv_data >> status;
if (GetPlayer()->isAlive())
return;
if (GetPlayer()->isAlive())
return;
if (status == 0)
{
@@ -1445,19 +1445,19 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_TIME_SYNC_RESP");
uint32 counter, clientTicks;
uint32 counter, clientTicks;
recv_data >> counter >> clientTicks;
if (counter != _player->m_timeSyncCounter - 1)
if (counter != _player->m_timeSyncCounter - 1)
sLog.outDebug("Wrong time sync counter from player %s (cheater?)", _player->GetName());
sLog.outDebug("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
// diff should be small
sLog.outDebug("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
// diff should be small
sLog.outDebug("Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
_player->m_timeSyncClient = clientTicks;
}
+1 -1
View File
@@ -629,7 +629,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
if (Vehicle *vehicle = vehUnit->GetVehicleKit())
if (vehicle->HasEmptySeat(seatId))
GetPlayer()->EnterVehicle(vehicle, seatId);
}
}
break;
default:
break;
+3 -3
View File
@@ -6059,9 +6059,9 @@ uint32 ObjectMgr::GenerateMailID()
void ObjectMgr::CreateItemText(uint32 guid, std::string text)
{
// insert new item text to container
mItemTexts[ guid ] = text;
// insert new item text to container
mItemTexts[ guid ] = text;
// save new item text
CharacterDatabase.escape_string(text);
+1 -1
View File
@@ -719,7 +719,7 @@ class ObjectMgr
uint32 GenerateMailID();
uint32 GeneratePetNumber();
void CreateItemText(uint32 guid, std::string text);
void CreateItemText(uint32 guid, std::string text);
void AddItemText(uint32 guid, std::string text) { mItemTexts[guid] = text; }
std::string GetItemText(uint32 id)
{
+16 -16
View File
@@ -1322,27 +1322,27 @@ enum Opcodes
UMSG_UNKNOWN_1283 = 0x503,
UMSG_UNKNOWN_1284 = 0x504,
UMSG_UNKNOWN_1285 = 0x505,
SMSG_UNKNOWN_1286 = 0x506, // ERR_CORPSE_IS_NOT_IN_INSTANCE = 0x1A8,
UMSG_UNKNOWN_1287 = 0x507, // not found
CMSG_UNKNOWN_1288 = 0x508, // lua: SetAllowLowLevelRaid
CMSG_UNKNOWN_1289 = 0x509, // lua: SetAllowLowLevelRaid
SMSG_CAMERA_SHAKE = 0x50A, // uint32 SpellEffectCameraShakes.dbc index, uint32
SMSG_UNKNOWN_1291 = 0x50B, // some item update packet?
UMSG_UNKNOWN_1292 = 0x50C, // not found
UMSG_UNKNOWN_1293 = 0x50D, // not found - disconnect
CMSG_UNKNOWN_1294 = 0x50E, // something with networking
SMSG_UNKNOWN_1286 = 0x506, // ERR_CORPSE_IS_NOT_IN_INSTANCE = 0x1A8,
UMSG_UNKNOWN_1287 = 0x507, // not found
CMSG_UNKNOWN_1288 = 0x508, // lua: SetAllowLowLevelRaid
CMSG_UNKNOWN_1289 = 0x509, // lua: SetAllowLowLevelRaid
SMSG_CAMERA_SHAKE = 0x50A, // uint32 SpellEffectCameraShakes.dbc index, uint32
SMSG_UNKNOWN_1291 = 0x50B, // some item update packet?
UMSG_UNKNOWN_1292 = 0x50C, // not found
UMSG_UNKNOWN_1293 = 0x50D, // not found - disconnect
CMSG_UNKNOWN_1294 = 0x50E, // something with networking
UMSG_UNKNOWN_1295 = 0x50F, // not found - disconnect
CMSG_UNKNOWN_1296 = 0x510, // something with networking
UMSG_UNKNOWN_1297 = 0x511, // not found - crash
CMSG_UNKNOWN_1298 = 0x512, // something with networking
UMSG_UNKNOWN_1299 = 0x513, // not found
SMSG_UNKNOWN_1300 = 0x514, // SMSG
UMSG_UNKNOWN_1297 = 0x511, // not found - crash
CMSG_UNKNOWN_1298 = 0x512, // something with networking
UMSG_UNKNOWN_1299 = 0x513, // not found
SMSG_UNKNOWN_1300 = 0x514, // SMSG
SMSG_UNKNOWN_1301 = 0x515, // event 0x204 (opens dungeon finder, probably for outdoor bosses)
SMSG_UNKNOWN_1302 = 0x516, // something with player movement (move event 58?)
SMSG_UNKNOWN_1302 = 0x516, // something with player movement (move event 58?)
CMSG_UNKNOWN_1303 = 0x517, // something with player movement (move event 58?)
SMSG_UNKNOWN_1304 = 0x518, // something with player movement (move event 58?), speed packet
SMSG_UNKNOWN_1304 = 0x518, // something with player movement (move event 58?), speed packet
UMSG_UNKNOWN_1305 = 0x519, // not found
UMSG_UNKNOWN_1306 = 0x51A, // not found
UMSG_UNKNOWN_1306 = 0x51A, // not found
NUM_MSG_TYPES = 0x51B
};
+5 -5
View File
@@ -268,9 +268,9 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
sLog.outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low);
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12));
data << uint64(petitionguid); // petition guid
data << uint64(_player->GetGUID()); // owner guid
data << uint32(petitionguid_low); // guild guid (in mangos always same as GUID_LOPART(petitionguid)
data << uint64(petitionguid); // petition guid
data << uint64(_player->GetGUID()); // owner guid
data << uint32(petitionguid_low); // guild guid (in mangos always same as GUID_LOPART(petitionguid)
data << uint8(signs); // sign's count
for (uint8 i = 1; i <= signs; ++i)
@@ -668,8 +668,8 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+signs+signs*12));
data << uint64(petitionguid); // petition guid
data << uint64(_player->GetGUID()); // owner guid
data << uint32(GUID_LOPART(petitionguid)); // guild guid (in mangos always same as GUID_LOPART(petition guid)
data << uint64(_player->GetGUID()); // owner guid
data << uint32(GUID_LOPART(petitionguid)); // guild guid (in mangos always same as GUID_LOPART(petition guid)
data << uint8(signs); // sign's count
for (uint8 i = 1; i <= signs; ++i)
+34 -34
View File
@@ -1608,17 +1608,17 @@ bool Player::BuildEnumData(QueryResult_AutoPtr result, WorldPacket * p_data)
*p_data << uint8(proto->InventoryType);
*p_data << uint32(enchant ? enchant->aura_id : 0);
}
*p_data << uint32(0); // bag 1 display id
*p_data << uint32(0); // bag 1 display id
*p_data << uint8(0); // bag 1 inventory type
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 2 display id
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 2 display id
*p_data << uint8(0); // bag 2 inventory type
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 3 display id
*p_data << uint8(0); // bag 3 inventory type
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 4 display id
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 3 display id
*p_data << uint8(0); // bag 3 inventory type
*p_data << uint32(0); // enchant?
*p_data << uint32(0); // bag 4 display id
*p_data << uint8(0); // bag 4 inventory type
*p_data << uint32(0); // enchant?
@@ -5817,15 +5817,15 @@ bool Player::HasSkill(uint32 skill) const
return (itr != mSkillStatus.end() && itr->second.uState != SKILL_DELETED);
}
uint16 Player::GetSkillStep(uint16 skill) const
{
if (!skill)
return 0;
uint16 Player::GetSkillStep(uint16 skill) const
{
if (!skill)
return 0;
SkillStatusMap::const_iterator itr = mSkillStatus.find(skill);
if (itr == mSkillStatus.end() || itr->second.uState == SKILL_DELETED)
return 0;
return PAIR32_HIPART(GetUInt32Value(PLAYER_SKILL_INDEX(itr->second.pos)));
}
@@ -6358,7 +6358,7 @@ void Player::RewardReputation(Quest const *pQuest)
}
else
{
uint32 row = ((pQuest->RewRepValueId[i] < 0) ? 1 : 0) + 1;
uint32 row = ((pQuest->RewRepValueId[i] < 0) ? 1 : 0) + 1;
uint32 field = abs(pQuest->RewRepValueId[i]);
if (const QuestFactionRewEntry *pRow = sQuestFactionRewardStore.LookupEntry(row))
@@ -14288,10 +14288,10 @@ bool Player::SatisfyQuestLog(bool msg)
if (FindQuestSlot(0) < MAX_QUEST_LOG_SIZE)
return true;
if (msg)
if (msg)
{
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
GetSession()->SendPacket(&data);
GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_QUESTLOG_FULL");
}
return false;
@@ -15441,9 +15441,9 @@ void Player::_LoadArenaTeamInfo(QueryResult_AutoPtr result)
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_ID, arenateamid);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_TYPE, aTeam->GetType());
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_MEMBER, (aTeam->GetCaptain() == GetGUID()) ? 0 : 1);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_GAMES_WEEK, played_week);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_GAMES_WEEK, played_week);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_GAMES_SEASON, played_season);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_WINS_SEASON, wons_season);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_WINS_SEASON, wons_season);
SetArenaTeamInfoField(arenaSlot, ARENA_TEAM_PERSONAL_RATING, personal_rating);
}while (result->NextRow());
@@ -15537,16 +15537,16 @@ float Player::GetFloatValueFromArray(Tokens const& data, uint16 index)
void Player::_LoadIntoDataField(const char* data, uint32 startOffset, uint32 count)
{
if (!data)
return;
if (!data)
return;
Tokens tokens = StrSplit(data, " ");
if (tokens.size() != count)
return;
Tokens::iterator iter;
uint32 index;
uint32 index;
for (iter = tokens.begin(), index = 0; index < count; ++iter, ++index)
{
m_uint32Values[startOffset + index] = atol((*iter).c_str());
@@ -15631,7 +15631,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
SetUInt64Value(PLAYER_FIELD_KNOWN_CURRENCIES, fields[47].GetUInt64());
SetUInt32Value(PLAYER_AMMO_ID, fields[63].GetUInt32());
InitDisplayIds();
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
@@ -16017,7 +16017,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
float bubble1 = 0.125f;
float bubble = fields[23].GetUInt32() > 0
? bubble1*sWorld.getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
: bubble0*sWorld.getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
: bubble0*sWorld.getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
SetRestBonus(GetRestBonus()+ time_diff*((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP)/72000)*bubble);
}
@@ -16638,11 +16638,11 @@ void Player::_LoadMail()
m->sender = fields[2].GetUInt32();
m->receiver = fields[3].GetUInt32();
m->subject = fields[4].GetCppString();
m->body = fields[5].GetCppString();
m->body = fields[5].GetCppString();
bool has_items = fields[6].GetBool();
m->expire_time = (time_t)fields[7].GetUInt64();
m->expire_time = (time_t)fields[7].GetUInt64();
m->deliver_time = (time_t)fields[8].GetUInt64();
m->money = fields[9].GetUInt32();
m->money = fields[9].GetUInt32();
m->COD = fields[10].GetUInt32();
m->checked = fields[11].GetUInt32();
m->stationery = fields[12].GetUInt8();
@@ -17409,16 +17409,16 @@ void Player::SaveToDB()
ss << ", ";
ss << uint32(m_specsCount);
ss << ", ";
ss << uint32(m_activeSpec) << ", '";
ss << uint32(m_activeSpec) << ", '";
for (uint32 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
{
{
ss << GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + i) << " ";
}
ss << "', '";
for (uint32 i = 0; i < EQUIPMENT_SLOT_END * 2; ++i )
{
ss << GetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENTRYID + i) << " ";
ss << GetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENTRYID + i) << " ";
}
ss << "',";
@@ -23367,7 +23367,7 @@ void Player::ResetTimeSync()
{
m_timeSyncCounter = 0;
m_timeSyncTimer = 0;
m_timeSyncClient = 0;
m_timeSyncClient = 0;
m_timeSyncServer = getMSTime();
}
@@ -23377,8 +23377,8 @@ void Player::SendTimeSync()
data << uint32(m_timeSyncCounter++);
GetSession()->SendPacket(&data);
// Schedule next sync in 10 sec
m_timeSyncTimer = 10000;
// Schedule next sync in 10 sec
m_timeSyncTimer = 10000;
m_timeSyncServer = getMSTime();
}
+12 -12
View File
@@ -57,7 +57,7 @@ class OutdoorPvP;
typedef std::deque<Mail*> PlayerMails;
#define PLAYER_MAX_SKILLS 127
#define PLAYER_MAX_DAILY_QUESTS 25
#define PLAYER_MAX_DAILY_QUESTS 25
#define PLAYER_EXPLORED_ZONES_SIZE 128
// Note: SPELLMOD_* values is aura types in fact
@@ -79,13 +79,13 @@ enum PlayerUnderwaterState
UNDERWATER_EXIST_TIMERS = 0x10
};
enum BuyBankSlotResult
{
ERR_BANKSLOT_FAILED_TOO_MANY = 0,
ERR_BANKSLOT_INSUFFICIENT_FUNDS = 1,
ERR_BANKSLOT_NOTBANKER = 2,
ERR_BANKSLOT_OK = 3
};
enum BuyBankSlotResult
{
ERR_BANKSLOT_FAILED_TOO_MANY = 0,
ERR_BANKSLOT_INSUFFICIENT_FUNDS = 1,
ERR_BANKSLOT_NOTBANKER = 2,
ERR_BANKSLOT_OK = 3
};
enum PlayerSpellState
{
@@ -500,7 +500,7 @@ enum PlayerFlags
#define PLAYER_TITLE_HAND_OF_ADAL UI64LIT(0x0000008000000000) // 39
#define PLAYER_TITLE_VENGEFUL_GLADIATOR UI64LIT(0x0000010000000000) // 40
#define KNOWN_TITLES_SIZE 3
#define KNOWN_TITLES_SIZE 3
#define MAX_TITLE_INDEX (KNOWN_TITLES_SIZE*64) // 3 uint64 fields
// used in PLAYER_FIELD_BYTES values
@@ -1723,7 +1723,7 @@ class Player : public Unit, public GridObject<Player>
SetArenaTeamInfoField(slot, ARENA_TEAM_ID, ArenaTeamId);
SetArenaTeamInfoField(slot, ARENA_TEAM_TYPE, type);
}
void SetArenaTeamInfoField(uint8 slot, ArenaTeamInfoType type, uint32 value)
void SetArenaTeamInfoField(uint8 slot, ArenaTeamInfoType type, uint32 value)
{
SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * ARENA_TEAM_END) + type, value);
}
@@ -2628,8 +2628,8 @@ class Player : public Unit, public GridObject<Player>
uint32 m_ChampioningFaction;
uint32 m_timeSyncCounter;
uint32 m_timeSyncTimer;
uint32 m_timeSyncClient;
uint32 m_timeSyncTimer;
uint32 m_timeSyncClient;
uint32 m_timeSyncServer;
};
+1 -1
View File
@@ -240,7 +240,7 @@ class Quest
bool IsAutoComplete() const { return QuestMethod ? false : true; }
uint32 GetFlags() const { return QuestFlags; }
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
// multiple values
+4 -4
View File
@@ -2661,14 +2661,14 @@ enum ResponseCodes
CHAR_LOGIN_LOCKED_BY_BILLING = 0x55,
CHAR_LOGIN_LOCKED_BY_MOBILE_AH = 0x56,
CHAR_NAME_SUCCESS = 0x57,
CHAR_NAME_SUCCESS = 0x57,
CHAR_NAME_FAILURE = 0x58,
CHAR_NAME_NO_NAME = 0x59,
CHAR_NAME_TOO_SHORT = 0x5A,
CHAR_NAME_TOO_LONG = 0x5B,
CHAR_NAME_INVALID_CHARACTER = 0x5C,
CHAR_NAME_MIXED_LANGUAGES = 0x5D,
CHAR_NAME_PROFANE = 0x5E,
CHAR_NAME_INVALID_CHARACTER = 0x5C,
CHAR_NAME_MIXED_LANGUAGES = 0x5D,
CHAR_NAME_PROFANE = 0x5E,
CHAR_NAME_RESERVED = 0x5F,
CHAR_NAME_INVALID_APOSTROPHE = 0x60,
CHAR_NAME_MULTIPLE_APOSTROPHES = 0x61,
+2 -2
View File
@@ -228,8 +228,8 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectNULL, //160 SPELL_EFFECT_160 unused
&Spell::EffectSpecCount, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert)
&Spell::EffectActivateSpec, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec
&Spell::EffectNULL, //163
&Spell::EffectNULL, //164 cancel's some aura...
&Spell::EffectNULL, //163
&Spell::EffectNULL, //164 cancel's some aura...
};
void Spell::EffectNULL(uint32 /*i*/)
+5 -5
View File
@@ -290,8 +290,8 @@ inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
{
return (spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
// different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
(spellInfo->Effect[0] == SPELL_EFFECT_CREATE_ITEM_2 &&
// different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
(spellInfo->Effect[0] == SPELL_EFFECT_CREATE_ITEM_2 &&
(spellInfo->TotemCategory[0] != 0 || spellInfo->EffectItemType[0]==0)));
}
@@ -792,8 +792,8 @@ typedef std::pair<SpellsRequiringSpellMap::const_iterator,SpellsRequiringSpellMa
// Spell learning properties (accessed using SpellMgr functions)
struct SpellLearnSkillNode
{
uint16 skill;
uint16 step;
uint16 skill;
uint16 step;
uint16 value; // 0 - max skill value for player level
uint16 maxvalue; // 0 - max skill value for player level
};
@@ -1056,7 +1056,7 @@ class SpellMgr
if (!newSpell)
{
sLog.outDebug("GetSpellForDifficultyFromSpell: spell %u not found in spell, this should never happen.", newSpell->Id);//alerady checked at startup
return spell;
return spell;
}
sLog.outDebug("GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id);
return newSpell;
+6 -6
View File
@@ -1702,7 +1702,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
bool existExpired = false;
TriggeredSpellInfoVct triggeredSpells;
// Incanter's Absorption, for converting to spell power
// Incanter's Absorption, for converting to spell power
int32 incanterAbsorption = 0;
// absorb without mana cost
@@ -1955,7 +1955,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
RemainingDamage -= currentAbsorb;
// Fire Ward or Frost Ward or Ice Barrier (or Mana Shield)
// for Incanter's Absorption converting to spell power
// for Incanter's Absorption converting to spell power
if (spellProto->SpellFamilyName == SPELLFAMILY_MAGE && spellProto->SpellFamilyFlags[2] & 0x000008)
incanterAbsorption += currentAbsorb;
@@ -2025,7 +2025,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
}
// Mana Shield (or Fire Ward or Frost Ward or Ice Barrier)
// for Incanter's Absorption converting to spell power
// for Incanter's Absorption converting to spell power
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_MAGE && (*i)->GetSpellProto()->SpellFamilyFlags[2] & 0x000008)
incanterAbsorption += currentAbsorb;
@@ -12257,7 +12257,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
switch(randomPoints)
{
case 0: // not used
case 0: // not used
case 1: basePoints += 1; break; // range 1..1
default:
// range can have positive (1..rand) and negative (rand..1) values, so order its for irand
@@ -12265,9 +12265,9 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
? irand(1, randomPoints)
: irand(randomPoints, 1);
basePoints += randvalue;
basePoints += randvalue;
break;
}
}
int32 value = basePoints;
+2 -2
View File
@@ -91,7 +91,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit *, bool>
int32 m_aura;
// pUnit: the reference unit
// dist: if 0: ignored, if > 0: maximum distance to the reference unit, if < 0: minimum distance to the reference unit
// dist: if 0: ignored, if > 0: maximum distance to the reference unit, if < 0: minimum distance to the reference unit
// playerOnly: self explaining
// aura: if 0: ignored, if > 0: the target shall have the aura, if < 0, the target shall NOT have the aura
DefaultTargetSelector(const Unit *pUnit, float dist, bool playerOnly, int32 aura) : me(pUnit), m_dist(dist), m_playerOnly(playerOnly), m_aura(aura) {}
@@ -205,7 +205,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
}
void UnitAI::DoCast(uint32 spellId)
{
{
Unit *target = NULL;
//sLog.outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
switch(AISpellInfo[spellId].target)
+11 -11
View File
@@ -343,19 +343,19 @@ enum Rates
MAX_RATES
};
/// Can be used in SMSG_AUTH_RESPONSE packet
enum BillingPlanFlags
{
/// Can be used in SMSG_AUTH_RESPONSE packet
enum BillingPlanFlags
{
SESSION_NONE = 0x00,
SESSION_UNUSED = 0x01,
SESSION_RECURRING_BILL = 0x02,
SESSION_FREE_TRIAL = 0x04,
SESSION_IGR = 0x08,
SESSION_IGR = 0x08,
SESSION_USAGE = 0x10,
SESSION_TIME_MIXTURE = 0x20,
SESSION_RESTRICTED = 0x40,
SESSION_ENABLE_CAIS = 0x80,
};
SESSION_RESTRICTED = 0x40,
SESSION_ENABLE_CAIS = 0x80,
};
/// Type of server, this is values from second column of Cfg_Configs.dbc
enum RealmType
@@ -402,12 +402,12 @@ enum RealmZone
REALM_ZONE_QA_SERVER = 28, // any language
REALM_ZONE_CN9 = 29, // basic-Latin at create, any at login
REALM_ZONE_TEST_SERVER_2 = 30, // any language
REALM_ZONE_CN10 = 31, // basic-Latin at create, any at login
REALM_ZONE_CTC = 32,
REALM_ZONE_CN10 = 31, // basic-Latin at create, any at login
REALM_ZONE_CTC = 32,
REALM_ZONE_CNC = 33,
REALM_ZONE_CN1_4 = 34, // basic-Latin at create, any at login
REALM_ZONE_CN2_6_9 = 35, // basic-Latin at create, any at login
REALM_ZONE_CN3_7 = 36, // basic-Latin at create, any at login
REALM_ZONE_CN2_6_9 = 35, // basic-Latin at create, any at login
REALM_ZONE_CN3_7 = 36, // basic-Latin at create, any at login
REALM_ZONE_CN5_8 = 37 // basic-Latin at create, any at login
};