[svn] Fix some typos.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-10 17:19:35 -06:00
parent 99044f7005
commit 73d1b07a91
13 changed files with 563 additions and 552 deletions
+9 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Channel.h"
@@ -115,6 +115,13 @@ void Channel::Join(uint64 p, const char *pass)
SendToOne(&data, p);
JoinNotify(p);
// if no owner first logged will become
if(!IsConstant() && !m_ownerGUID)
{
SetOwner(p, (players.size() > 1 ? true : false));
players[p].SetModerator(true);
}
}
void Channel::Leave(uint64 p, bool send)
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CHANNEL_H
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ObjectMgr.h" // for normalizePlayerName
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TRINITYCORE_CHANNELMGR_H
#define TRINITYCORE_CHANNELMGR_H
+417 -416
View File
File diff suppressed because it is too large Load Diff
+41 -41
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TRINITYCORE_CHAT_H
@@ -71,13 +71,13 @@ class ChatHandler
int ParseCommands(const char* text);
virtual char const* GetName() const;
virtual char const* GetName() const;
protected:
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
bool hasStringAbbr(const char* name, const char* part);
virtual bool isAvailable(ChatCommand const& cmd) const;
virtual bool isAvailable(ChatCommand const& cmd) const;
virtual bool needReportToTarget(Player* chr) const;
void SendGlobalSysMessage(const char *str);
@@ -88,13 +88,13 @@ class ChatHandler
ChatCommand* getCommandTable();
bool HandleAccountCommand(const char* args);
bool HandleAccountCreateCommand(const char* args);
bool HandleAccountDeleteCommand(const char* args);
bool HandleAccountOnlineListCommand(const char* args);
bool HandleAccountSetAddonCommand(const char* args);
bool HandleAccountSetGmLevelCommand(const char* args);
bool HandleAccountSetPasswordCommand(const char* args);
bool HandleAccountCommand(const char* args);
bool HandleAccountCreateCommand(const char* args);
bool HandleAccountDeleteCommand(const char* args);
bool HandleAccountOnlineListCommand(const char* args);
bool HandleAccountSetAddonCommand(const char* args);
bool HandleAccountSetGmLevelCommand(const char* args);
bool HandleAccountSetPasswordCommand(const char* args);
bool HandleHelpCommand(const char* args);
bool HandleCommandsCommand(const char* args);
@@ -102,7 +102,7 @@ class ChatHandler
bool HandleDismountCommand(const char* args);
bool HandleSaveCommand(const char* args);
bool HandleGMListIngameCommand(const char* args);
bool HandleGMListFullCommand(const char* args);
bool HandleGMListFullCommand(const char* args);
bool HandleNamegoCommand(const char* args);
bool HandleGonameCommand(const char* args);
@@ -266,12 +266,12 @@ class ChatHandler
bool HandleInstanceStatsCommand(const char* args);
bool HandleInstanceSaveDataCommand(const char * args);
bool HandleServerCorpsesCommand(const char* args);
bool HandleServerExitCommand(const char* args);
bool HandleServerInfoCommand(const char* args);
bool HandleServerMotdCommand(const char* args);
bool HandleServerSetMotdCommand(const char* args);
bool HandleServerSetLogLevelCommand(const char* args);
bool HandleServerCorpsesCommand(const char* args);
bool HandleServerExitCommand(const char* args);
bool HandleServerInfoCommand(const char* args);
bool HandleServerMotdCommand(const char* args);
bool HandleServerSetMotdCommand(const char* args);
bool HandleServerSetLogLevelCommand(const char* args);
bool HandleAddHonorCommand(const char* args);
bool HandleHonorAddKillCommand(const char* args);
@@ -312,19 +312,19 @@ class ChatHandler
bool HandleUnFreezeCommand(const char *args);
bool HandleListFreezeCommand(const char* args);
bool HandleCharacterDeleteCommand(const char* args);
bool HandleCharacterDeleteCommand(const char* args);
bool HandleBanAccountCommand(const char* args);
bool HandleBanCharacterCommand(const char* args);
bool HandleBanIPCommand(const char* args);
bool HandleUnBanAccountCommand(const char* args);
bool HandleUnBanCharacterCommand(const char* args);
bool HandleUnBanIPCommand(const char* args);
bool HandleBanInfoAccountCommand(const char* args);
bool HandleBanInfoCharacterCommand(const char* args);
bool HandleBanInfoIPCommand(const char* args);
bool HandleBanListAccountCommand(const char* args);
bool HandleBanListCharacterCommand(const char* args);
bool HandleBanListIPCommand(const char* args);
bool HandleBanCharacterCommand(const char* args);
bool HandleBanIPCommand(const char* args);
bool HandleUnBanAccountCommand(const char* args);
bool HandleUnBanCharacterCommand(const char* args);
bool HandleUnBanIPCommand(const char* args);
bool HandleBanInfoAccountCommand(const char* args);
bool HandleBanInfoCharacterCommand(const char* args);
bool HandleBanInfoIPCommand(const char* args);
bool HandleBanListAccountCommand(const char* args);
bool HandleBanListCharacterCommand(const char* args);
bool HandleBanListIPCommand(const char* args);
bool HandleIdleRestartCommand(const char* args);
bool HandleIdleShutDownCommand(const char* args);
bool HandleShutDownCommand(const char* args);
@@ -466,14 +466,14 @@ class ChatHandler
// Utility methods for commands
void ShowTicket(uint64 guid, char const* text, char const* time);
bool LookupPlayerSearchCommand(QueryResult* result, int32 limit);
bool HandleBanListHelper(QueryResult* result);
bool HandleBanHelper(BanMode mode,char const* args);
bool HandleBanInfoHelper(uint32 accountid, char const* accountname);
bool HandleUnBanHelper(BanMode mode,char const* args);
bool HandleBanListHelper(QueryResult* result);
bool HandleBanHelper(BanMode mode,char const* args);
bool HandleBanInfoHelper(uint32 accountid, char const* accountname);
bool HandleUnBanHelper(BanMode mode,char const* args);
void SetSentErrorMessage(bool val){ sentErrorMessage = val;};
private:
WorldSession * m_session; // != NULL for chat command call and NULL for CLI command
WorldSession * m_session; // != NULL for chat command call and NULL for CLI command
// common global flag
static bool load_command_table;
@@ -482,9 +482,9 @@ class ChatHandler
class CliHandler : public ChatHandler
{
public:
typedef void Print(char const*);
explicit CliHandler(Print* zprint) : m_print(zprint) {}
public:
typedef void Print(char const*);
explicit CliHandler(Print* zprint) : m_print(zprint) {}
// overwrite functions
const char *GetTrinityString(int32 entry) const;
@@ -493,8 +493,8 @@ class CliHandler : public ChatHandler
char const* GetName() const;
bool needReportToTarget(Player* chr) const;
private:
Print* m_print;
private:
Print* m_print;
};
char const *fmtstring( char const *format, ... );
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
+4 -3
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "QuestDef.h"
@@ -468,8 +468,8 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
}
// rewarded honor points. Multiply with 10 to satisfy client
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(pQuest->GetRewSpellCast()); // casted spell
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
@@ -678,6 +678,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
}
data << uint32(pQuest->GetRewOrReqMoney());
// rewarded honor points. Multiply with 10 to satisfy client
data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
data << uint32(0x08); // unused by client?
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TRINITYCORE_GOSSIP_H
+5 -5
View File
@@ -2097,7 +2097,7 @@ bool ChatHandler::HandleListItemCommand(const char* args)
}
result=CharacterDatabase.PQuery(
// 0 1 2 3 4 5
// 0 1 2 3 4 5
"SELECT ci.item, cibag.slot AS bag, ci.slot, ci.guid, characters.account,characters.name "
"FROM character_inventory AS ci LEFT JOIN character_inventory AS cibag ON (cibag.item=ci.bag),characters "
"WHERE ci.item_template='%u' AND ci.guid = characters.guid LIMIT %u ",
@@ -2151,7 +2151,7 @@ bool ChatHandler::HandleListItemCommand(const char* args)
if(count > 0)
{
result=CharacterDatabase.PQuery(
// 0 1 2 3 4 5 6
// 0 1 2 3 4 5 6
"SELECT mail_items.item_guid, mail.sender, mail.receiver, char_s.account, char_s.name, char_r.account, char_r.name "
"FROM mail,mail_items,characters as char_s,characters as char_r "
"WHERE mail_items.item_template='%u' AND char_s.guid = mail.sender AND char_r.guid = mail.receiver AND mail.id=mail_items.mail_id LIMIT %u",
@@ -2201,7 +2201,7 @@ bool ChatHandler::HandleListItemCommand(const char* args)
if(count > 0)
{
result=CharacterDatabase.PQuery(
// 0 1 2 3
// 0 1 2 3
"SELECT auctionhouse.itemguid, auctionhouse.itemowner, characters.account, characters.name "
"FROM auctionhouse,characters WHERE auctionhouse.item_template='%u' AND characters.guid = auctionhouse.itemowner LIMIT %u",
item_id,uint32(count));
@@ -2328,7 +2328,7 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
}
else
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM gameobject WHERE id = '%u' LIMIT %u",
go_id,uint32(count));
go_id,uint32(count));
if (result)
{
@@ -2483,7 +2483,7 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
}
else
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '%u' LIMIT %u",
cr_id,uint32(count));
cr_id,uint32(count));
if (result)
{
+24 -24
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
@@ -146,7 +146,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
wstrToLower(wplayer_name);
wstrToLower(wguild_name);
// client send in case not set max level value 100 but Trinity support 255 max level,
// client send in case not set max level value 100 but mangos support 255 max level,
// update it to show GMs with characters after 100 level
if(level_max >= 100)
level_max = 255;
@@ -469,7 +469,7 @@ void WorldSession::HandleAddFriendOpcode( WorldPacket & recv_data )
std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN);
std::string friendNote;
recv_data >> friendName;
// recheck
@@ -492,16 +492,16 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
{
if(!result)
return;
uint64 friendGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
uint32 team = Player::TeamForRace((*result)[1].GetUInt8());
delete result;
WorldSession * session = sWorld.FindSession(accountId);
if(!session)
return;
FriendsResult friendResult = FRIEND_NOT_FOUND;
if(friendGuid)
{
@@ -518,12 +518,12 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
friendResult = FRIEND_ADDED_ONLINE;
else
friendResult = FRIEND_ADDED_OFFLINE;
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
{
friendResult = FRIEND_LIST_FULL;
sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
}
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
{
friendResult = FRIEND_LIST_FULL;
sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
}
session->GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
}
@@ -576,29 +576,29 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 acc
{
if(!result)
return;
uint64 IgnoreGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
delete result;
WorldSession * session = sWorld.FindSession(accountId);
if(!session)
return;
FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND;
if(IgnoreGuid)
{
if(IgnoreGuid==session->GetPlayer()->GetGUID()) //not add yourself
ignoreResult = FRIEND_IGNORE_SELF;
else if( session->GetPlayer()->GetSocial()->HasIgnore(GUID_LOPART(IgnoreGuid)) )
ignoreResult = FRIEND_IGNORE_ALREADY;
else if( session->GetPlayer()->GetSocial()->HasIgnore(GUID_LOPART(IgnoreGuid)) )
ignoreResult = FRIEND_IGNORE_ALREADY;
else
{
ignoreResult = FRIEND_IGNORE_ADDED;
// ignore list full
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true))
ignoreResult = FRIEND_IGNORE_FULL;
// ignore list full
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true))
ignoreResult = FRIEND_IGNORE_FULL;
}
}
@@ -793,7 +793,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
(fabs(rotateDy) > atEntry->box_y/2 + delta) ||
(fabs(dz) > atEntry->box_z/2 + delta) )
{
sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %u 1/2 box Z: %u rotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u",
sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u",
pl->GetName(), pl->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotateDx, rotateDy, dz, Trigger_ID);
return;
}
+51 -49
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
@@ -270,7 +270,7 @@ Player::Player (WorldSession *session): Unit()
if(GetSession()->GetSecurity() >= SEC_GAMEMASTER)
SetAcceptTicket(true);
// players always accept
// players always accept
if(GetSession()->GetSecurity() == SEC_PLAYER)
SetAcceptWhispers(true);
@@ -367,7 +367,7 @@ Player::Player (WorldSession *session): Unit()
m_temporaryUnsummonedPetNumber = 0;
//cache for UNIT_CREATED_BY_SPELL to allow
//returning reagests for temporarily removed pets
//returning reagents for temporarily removed pets
//when dying/logging out
m_oldpetspell = 0;
@@ -433,6 +433,7 @@ Player::~Player ()
{
CleanupsBeforeDelete();
// it must be unloaded already in PlayerLogout and accessed only for loggined player
//m_social = NULL;
// Note: buy back item already deleted from DB when player was saved
@@ -487,6 +488,8 @@ void Player::CleanupsBeforeDelete()
bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId )
{
//FIXME: outfitId not used in player creating
Object::_Create(guidlow, 0, HIGHGUID_PLAYER);
m_name = name;
@@ -664,7 +667,7 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
SetHealth(GetMaxHealth());
if (getPowerType()==POWER_MANA)
{
UpdateMaxPower(POWER_MANA); // Update max Mana (for add bonus from intelect)
UpdateMaxPower(POWER_MANA); // Update max Mana (for add bonus from intellect)
SetPower(POWER_MANA,GetMaxPower(POWER_MANA));
}
@@ -830,7 +833,7 @@ void Player::HandleDrowning()
return;
}
uint32 UnderWaterTime = 1*MINUTE*1000; // default leangthL 1 min
uint32 UnderWaterTime = 1*MINUTE*1000; // default length 1 min
AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
@@ -1509,7 +1512,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// client without expansion support
if(GetSession()->Expansion() < mEntry->Expansion())
{
sLog.outDebug("Player %s using client without required expansion tried teleport to non accessable map %u", GetName(), mapid);
sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
if(GetTransport())
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
@@ -1544,7 +1547,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// The player was ported to another map and looses the duel immediatly.
// We have to perform this check before the teleport, otherwise the
// ObjectAccessor won't find the flag.
if (duel && this->GetMapId()!=mapid)
if (duel && GetMapId()!=mapid)
{
GameObject* obj = ObjectAccessor::GetGameObject(*this, GetUInt64Value(PLAYER_DUEL_ARBITER));
if (obj)
@@ -1554,7 +1557,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// reset movement flags at teleport, because player will continue move with these flags after teleport
SetUnitMovementFlags(0);
if ((this->GetMapId() == mapid) && (!m_transport))
if ((GetMapId() == mapid) && (!m_transport))
{
// prepare zone change detect
uint32 old_zone = GetZoneId();
@@ -3265,7 +3268,7 @@ void Player::InitVisibleBits()
{
updateVisualBits.SetCount(PLAYER_END);
// TODO: really implement OWNER_ONLY and GROUP_ONLY. Flags can be found in UpdateFields.h
// TODO: really implement OWNER_ONLY and GROUP_ONLY. Flags can be found in UpdateFields.h
updateVisualBits.SetBit(OBJECT_FIELD_GUID);
updateVisualBits.SetBit(OBJECT_FIELD_TYPE);
@@ -3278,7 +3281,7 @@ void Player::InitVisibleBits()
updateVisualBits.SetBit(UNIT_FIELD_SUMMON+1);
updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY);
updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY+1);
updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY+1);
updateVisualBits.SetBit(UNIT_FIELD_TARGET);
updateVisualBits.SetBit(UNIT_FIELD_TARGET+1);
@@ -3314,8 +3317,8 @@ void Player::InitVisibleBits()
updateVisualBits.SetBit(UNIT_FIELD_COMBATREACH);
updateVisualBits.SetBit(UNIT_FIELD_DISPLAYID);
updateVisualBits.SetBit(UNIT_FIELD_NATIVEDISPLAYID);
updateVisualBits.SetBit(UNIT_FIELD_BYTES_1);
updateVisualBits.SetBit(UNIT_FIELD_MOUNTDISPLAYID);
updateVisualBits.SetBit(UNIT_FIELD_BYTES_1);
updateVisualBits.SetBit(UNIT_FIELD_PETNUMBER);
updateVisualBits.SetBit(UNIT_FIELD_PET_NAME_TIMESTAMP);
updateVisualBits.SetBit(UNIT_DYNAMIC_FLAGS);
@@ -3323,11 +3326,11 @@ void Player::InitVisibleBits()
updateVisualBits.SetBit(UNIT_MOD_CAST_SPEED);
updateVisualBits.SetBit(UNIT_FIELD_BYTES_2);
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER);
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER+1);
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER);
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER+1);
updateVisualBits.SetBit(PLAYER_FLAGS);
updateVisualBits.SetBit(PLAYER_GUILDID);
updateVisualBits.SetBit(PLAYER_GUILDRANK);
updateVisualBits.SetBit(PLAYER_GUILDID);
updateVisualBits.SetBit(PLAYER_GUILDRANK);
updateVisualBits.SetBit(PLAYER_BYTES);
updateVisualBits.SetBit(PLAYER_BYTES_2);
updateVisualBits.SetBit(PLAYER_BYTES_3);
@@ -3723,6 +3726,7 @@ void Player::BuildPlayerRepop()
void Player::SendDelayResponse(const uint32 ml_seconds)
{
//FIXME: is this delay time arg really need? 50msec by default in code
WorldPacket data( SMSG_QUERY_TIME_RESPONSE, 4+4 );
data << (uint32)time(NULL);
data << (uint32)0;
@@ -3762,7 +3766,7 @@ void Player::ResurrectPlayer(float restore_percent, bool updateToWorld, bool app
SetPower(POWER_ENERGY, uint32(GetMaxPower(POWER_ENERGY)*restore_percent));
}
// update visbility
// update visibility
ObjectAccessor::UpdateVisibilityForPlayer(this);
// some items limited to specific map
@@ -4229,7 +4233,7 @@ void Player::UpdateLocalChannels(uint32 newZone )
// leave old channel
(*i)->Leave(GetGUID(),false); // not send leave channel, it already replaced at client
std::string name = (*i)->GetName(); // stroe name, (*i)erase in LeftChannel
std::string name = (*i)->GetName(); // store name, (*i)erase in LeftChannel
LeftChannel(*i); // remove from player's channel list
cMgr->LeftChannel(name); // delete if empty
}
@@ -4264,7 +4268,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
{
if(modGroup >= BASEMOD_END || modType >= MOD_END)
{
sLog.outError("ERROR in HandleBaseModValue(): nonexisted BaseModGroup of wrong BaseModType!");
sLog.outError("ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
return;
}
@@ -4301,7 +4305,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{
if(modGroup >= BASEMOD_END || modType > MOD_END)
{
sLog.outError("ERROR: trial to access nonexisted BaseModGroup or wrong BaseModType!");
sLog.outError("ERROR: trial to access non existed BaseModGroup or wrong BaseModType!");
return 0.0f;
}
@@ -4973,7 +4977,7 @@ void Player::SetSkill(uint32 id, uint16 currVal, uint16 maxVal)
{
if (_spell_idx->second->skillId == id)
{
// this may remove more than one spell (dependants)
// this may remove more than one spell (dependents)
removeSpell(itr->first);
next = m_spells.begin();
break;
@@ -5249,7 +5253,6 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
// code block for underwater state update
UpdateUnderwaterState(m, x, y, z);
CheckExploreSystem();
// group update
@@ -6313,7 +6316,7 @@ void Player::UpdateZone(uint32 newZone)
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
SetRestType(REST_TYPE_NO);
// Set player to FFA PVP when not in rested enviroment.
// Set player to FFA PVP when not in rested environment.
if(sWorld.IsFFAPvPRealm())
SetFlag(PLAYER_FLAGS,PLAYER_FLAGS_FFA_PVP);
}
@@ -6932,7 +6935,7 @@ void Player::CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attTy
}
if (roll_chance_f(chance))
this->CastSpell(Target, spellInfo->Id, true, item);
CastSpell(Target, spellInfo->Id, true, item);
}
// item combat enchantments
@@ -7795,7 +7798,7 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId)
data << uint32(0xaa8) << uint32(0x1); // 22 2728 Mage Tower uncontrolled (1 - yes, 0 - no)
data << uint32(0xaa7) << uint32(0x0); // 23 2727 Fel Reaver - Horde control
data << uint32(0xaa6) << uint32(0x0); // 24 2726 Fel Reaver - Alliance control
data << uint32(0xaa5) << uint32(0x1); // 25 2725 Fel Reaver uncontroled (1 - yes, 0 - no)
data << uint32(0xaa5) << uint32(0x1); // 25 2725 Fel Reaver uncontrolled (1 - yes, 0 - no)
data << uint32(0xaa4) << uint32(0x0); // 26 2724 Boold Elf - Horde control
data << uint32(0xaa3) << uint32(0x0); // 27 2723 Boold Elf - Alliance control
data << uint32(0xaa2) << uint32(0x1); // 28 2722 Boold Elf uncontrolled (1 - yes, 0 - no)
@@ -8021,7 +8024,6 @@ void Player::SendTalentWipeConfirm(uint64 guid)
data << uint64(guid);
uint32 cost = sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
data << cost;
data << cost;
GetSession()->SendPacket( &data );
}
@@ -8621,6 +8623,7 @@ bool Player::IsValidPos( uint8 bag, uint8 slot )
return false;
}
bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
{
uint32 tempcount = 0;
@@ -9030,7 +9033,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
}
}
// not specific slot or have spece for partly store only in specific slot
// not specific slot or have space for partly store only in specific slot
// in specific bag
if( bag != NULL_BAG )
@@ -9685,7 +9688,7 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
if(eslot != EQUIPMENT_SLOT_MAINHAND)
return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED;
// offhand item must can be stored in inventitory for offhand item and it also must be unequipped
// offhand item must can be stored in inventory for offhand item and it also must be unequipped
Item *offItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND );
ItemPosCountVec off_dest;
if( offItem && (!not_loading ||
@@ -9796,7 +9799,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
return EQUIP_ERR_OK;
}
// not specific slot or have spece for partly store only in specific slot
// not specific slot or have space for partly store only in specific slot
// in specific bag
if( bag != NULL_BAG )
@@ -9858,7 +9861,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
}
}
// not specific bag or have spece for partly store only in specific bag
// not specific bag or have space for partly store only in specific bag
// search stack for merge to
if( pProto->Stackable > 1 )
@@ -10490,7 +10493,7 @@ void Player::MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool
pLastItem->SetOwnerGUID(GetGUID());
// if this original item then it need create record in inventory
// in case trade we laready have item in other player inventory
// in case trade we already have item in other player inventory
pLastItem->SetState(in_characterInventoryDB ? ITEM_CHANGED : ITEM_NEW, this);
}
}
@@ -10734,7 +10737,7 @@ void Player::DestroyZoneLimitedItem( bool update, uint32 new_zone )
void Player::DestroyConjuredItems( bool update )
{
// used when entering arena
// distroys all conjured items
// destroys all conjured items
sLog.outDebug( "STORAGE: DestroyConjuredItems" );
// in inventory
@@ -11282,7 +11285,7 @@ void Player::TradeCancel(bool sendback)
{
if(pTrader)
{
// send yellow "Trade cancelled" message to both traders
// send yellow "Trade canceled" message to both traders
WorldSession* ws;
ws = GetSession();
if(sendback)
@@ -11369,7 +11372,6 @@ void Player::RemoveEnchantmentDurations(Item *item)
}
}
void Player::RemoveAllEnchantments(EnchantmentSlot slot)
{
// remove enchantments from equipped items first to clean up the m_enchantDuration list
@@ -11498,7 +11500,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
if(apply)
{
int32 basepoints = int32(enchant_amount);
// Random Property Exist - try found basepoints for spell (basepoints depencs from item suffix factor)
// Random Property Exist - try found basepoints for spell (basepoints depends from item suffix factor)
if (item->GetItemRandomPropertyId() !=0 && !enchant_amount)
{
ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
@@ -12195,7 +12197,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
uint32 quest_id = pQuest->GetQuestId();
// if not exist then created with set uState==NEW and rewarded=false
QuestStatusData& questStatusData = mQuestStatus[quest_id];
QuestStatusData& questStatusData = mQuestStatus[quest_id];
if (questStatusData.uState != QUEST_NEW)
questStatusData.uState = QUEST_CHANGED;
@@ -12567,7 +12569,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
return true;
// each-from-all exclusive group ( < 0)
// can be start if only all quests in prev quest exclusive group complited and rewarded
// can be start if only all quests in prev quest exclusive group completed and rewarded
ObjectMgr::ExclusiveQuestGroups::iterator iter = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
@@ -14263,7 +14265,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
std::map<uint64, Bag*> bagMap; // fast guid lookup for bags
//NOTE: the "order by `bag`" is important because it makes sure
//the bagMap is filled before items in the bags are loaded
//NOTE2: the "order by `slot`" is needed becaue mainhand weapons are (wrongly?)
//NOTE2: the "order by `slot`" is needed because mainhand weapons are (wrongly?)
//expected to be equipped before offhand items (TODO: fixme)
uint32 zone = GetZoneId();
@@ -14390,7 +14392,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
while(!problematicItems.empty())
{
// fill mail
MailItemsInfo mi; // item list prepering
MailItemsInfo mi; // item list preparing
for(int i = 0; !problematicItems.empty() && i < MAX_MAIL_ITEMS; ++i)
{
@@ -14938,7 +14940,7 @@ void Player::SendSavedInstances()
}
}
//Send opcode 811. true or flase means, whether you have current raid/heroic instances
//Send opcode 811. true or false means, whether you have current raid/heroic instances
data.Initialize(SMSG_UPDATE_INSTANCE_OWNERSHIP);
data << uint32(hasBeenSaved);
GetSession()->SendPacket(&data);
@@ -15926,7 +15928,6 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
}
}
void Player::RemoveMiniPet()
{
if(Pet* pet = GetMiniPet())
@@ -16441,6 +16442,7 @@ void Player::HandleStealthedUnitsDetection()
if ((*i)->isVisibleForOrDetect(this,true))
{
(*i)->SendUpdateToPlayer(this);
m_clientGUIDs.insert((*i)->GetGUID());
@@ -16619,7 +16621,7 @@ void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
// last check 2.0.10
WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+m_spells.size()*8);
data << GetGUID();
data << uint8(0x0);
data << uint8(0x0); // flags (0x1, 0x2)
time_t curTime = time(NULL);
for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
{
@@ -17015,7 +17017,7 @@ void Player::SendCooldownEvent(SpellEntry const *spellInfo)
if ( !(spellInfo->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE) )
return;
// Get spell cooldwn
// Get spell cooldown
int32 cooldown = GetSpellRecoveryTime(spellInfo);
// Apply spellmods
ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, cooldown);
@@ -17587,7 +17589,7 @@ void Player::SetGroup(Group *group, int8 subgroup)
void Player::SendInitialPacketsBeforeAddToMap()
{
WorldPacket data(SMSG_SET_REST_START, 4);
data << uint32(0); // unknown, may be rest state time or expirience
data << uint32(0); // unknown, may be rest state time or experience
GetSession()->SendPacket(&data);
// Homebind
@@ -18185,7 +18187,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
break;
}
default:
sLog.outError("HasItemFitToSpellReqirements: Not handeled spell reqirement for item class %u",spellInfo->EquippedItemClass);
sLog.outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u",spellInfo->EquippedItemClass);
break;
}
@@ -18230,7 +18232,7 @@ void Player::RemoveItemDependentAurasAndCasts( Item * pItem )
uint32 Player::GetResurrectionSpellId()
{
// search priceless resurrection possabilities
// search priceless resurrection possibilities
uint32 prio = 0;
uint32 spell_id = 0;
AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
@@ -18386,7 +18388,7 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
{
Item* item = GetWeaponForAttack(attType,true);
// unarmmed only with base attack
// unarmed only with base attack
if(attType != BASE_ATTACK && !item)
return 0;
@@ -18606,7 +18608,7 @@ void Player::UpdateUnderwaterState( Map* m, float x, float y, float z )
void Player::SetCanParry( bool value )
{
if(m_canParry==value)
return;
return;
m_canParry = value;
UpdateParryPercentage();
@@ -18615,7 +18617,7 @@ void Player::SetCanParry( bool value )
void Player::SetCanBlock( bool value )
{
if(m_canBlock==value)
return;
return;
m_canBlock = value;
UpdateBlockPercentage();
+2 -2
View File
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"