mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 01:37:02 +00:00
Merge branch 'master' into 308
This commit is contained in:
commit
47c0dbdc27
96 changed files with 6009 additions and 2109 deletions
17
dep/ACE_wrappers/m4/.gitignore
vendored
Normal file
17
dep/ACE_wrappers/m4/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# NOTE! Don't add files that are generated in specific
|
||||
# subdirectories here. Add them in the ".gitignore" file
|
||||
# in that subdirectory instead.
|
||||
#
|
||||
# NOTE! Please use 'git-ls-files -i --exclude-standard'
|
||||
# command after changing this file, to see if there are
|
||||
# any tracked files which get ignored after the change.
|
||||
#
|
||||
# MaNGOS generated files
|
||||
#
|
||||
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
4650
sql/mangos.sql
4650
sql/mangos.sql
File diff suppressed because it is too large
Load diff
2857
sql/updates/6936_01_mangos_spell_chain.sql
Normal file
2857
sql/updates/6936_01_mangos_spell_chain.sql
Normal file
File diff suppressed because it is too large
Load diff
4
sql/updates/6939_01_mangos_quest_template.sql
Normal file
4
sql/updates/6939_01_mangos_quest_template.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_6936_01_mangos_spell_chain required_6939_01_mangos_quest_template bit;
|
||||
|
||||
ALTER TABLE `quest_template`
|
||||
CHANGE `RewHonorableKills` `RewHonorableKills` int unsigned NOT NULL default '0';
|
||||
3
sql/updates/6940_01_mangos_spell_learn_spell.sql
Normal file
3
sql/updates/6940_01_mangos_spell_learn_spell.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_6939_01_mangos_quest_template required_6940_01_mangos_spell_learn_spell bit;
|
||||
|
||||
DELETE FROM spell_learn_spell WHERE entry = 2842;
|
||||
6
sql/updates/6941_01_mangos_spell_learn_spell.sql
Normal file
6
sql/updates/6941_01_mangos_spell_learn_spell.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_6940_01_mangos_spell_learn_spell required_6941_01_mangos_spell_learn_spell bit;
|
||||
|
||||
DELETE FROM spell_learn_spell WHERE entry = 53428;
|
||||
INSERT INTO spell_learn_spell VALUES
|
||||
(53428,53341),
|
||||
(53428,53343);
|
||||
30
sql/updates/6944_01_mangos_mangos_string.sql
Normal file
30
sql/updates/6944_01_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_6941_01_mangos_spell_learn_spell required_6944_01_mangos_mangos_string bit;
|
||||
|
||||
DELETE FROM mangos_string WHERE entry in (712,717,718,719);
|
||||
INSERT INTO mangos_string VALUES
|
||||
(712,'|cffff0000[BG Queue Announcer]:|r %s -- [%u-%u] A: %u/%u, H: %u/%u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(717,'|cffff0000[BG Queue Announcer]:|r %s -- [%u-%u] Started!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(718,'|cffff0000[Arena Queue Announcer]:|r %s -- Joined : %ux%u : %u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(719,'|cffff0000[Arena Queue Announcer]:|r %s -- Exited : %ux%u : %u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
||||
DELETE FROM mangos_string WHERE entry in (720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736);
|
||||
INSERT INTO mangos_string VALUES
|
||||
(720,'Your group is too large for this battleground. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(721,'Your group is too large for this arena. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(722,'Your group has members not in your arena team. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(723,'Your group does not have enough players to join this match.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(724,'The Gold Team wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(725,'The Green Team wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(726,'There aren\'t enough players in this battleground. It will end soon unless some more players join to balance the fight.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(727,'Your group has an offline member. Please remove him before joining.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(728,'Your group has players from the opposing faction. You can\'t join the battleground as a group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(729,'Your group has players from different battleground brakets. You can\'t join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(730,'Someone in your party is already in this battleground queue. (S)he must leave it before joining as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(731,'Someone in your party is Deserter. You can\'t join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(732,'Someone in your party is already in three battleground queues. You cannot join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(733,'You cannot teleport to a battleground or arena map.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(734,'You cannot summon players to a battleground or arena map.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(735,'You must be in GM mode to teleport to a player in a battleground.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(736,'You cannot teleport to a battleground from another battleground. Please leave the current battleground first.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
||||
DELETE FROM mangos_string WHERE entry in (1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138);
|
||||
|
|
@ -25,73 +25,6 @@ pkgdatadir = $(datadir)/mangos/sql/updates
|
|||
## Files to be installed
|
||||
# Install basic SQL files to datadir
|
||||
pkgdata_DATA = \
|
||||
06360_characters_corpse.sql \
|
||||
06360_characters_characters.sql \
|
||||
06362_characters.sql \
|
||||
06362_mangos_instance_template.sql \
|
||||
06367_mangos_spell_proc_event.sql \
|
||||
06369_mangos_spell_affect.sql \
|
||||
06370_mangos_spell_affect.sql \
|
||||
06381_mangos_command.sql \
|
||||
06387_characters_character_ticket.sql \
|
||||
06387_mangos_mangos_string.sql \
|
||||
06397_mangos_creature_template.sql \
|
||||
06398_mangos_creature_template.sql \
|
||||
06412_characters_declinedname.sql \
|
||||
06426_mangos_locales.sql \
|
||||
06426_realmd_localization.sql \
|
||||
06431_mangos_mangos_string.sql \
|
||||
06439_mangos_command.sql \
|
||||
06456_mangos_command.sql \
|
||||
06472_realmd_account.sql \
|
||||
06492_mangos_spell_chain.sql \
|
||||
06496_mangos_spell_pet_auras.sql \
|
||||
06506_mangos_spell_proc_event.sql \
|
||||
06509_mangos_command.sql \
|
||||
06509_mangos_mangos_string.sql \
|
||||
06513_mangos_command.sql \
|
||||
06515_mangos_spell_proc_event.sql \
|
||||
06521_mangos_spell_proc_event.sql \
|
||||
06523_mangos_spell_proc_event.sql \
|
||||
06528_mangos_spell_affect.sql \
|
||||
06528_mangos_spell_proc_event.sql \
|
||||
06538_mangos_spell_proc_event.sql \
|
||||
06540_mangos_spell_proc_event.sql \
|
||||
06544_mangos_spell_proc_event.sql \
|
||||
06545_mangos_command.sql \
|
||||
06557_mangos_command.sql \
|
||||
06574_mangos_spell_proc_event.sql \
|
||||
06585_mangos_command.sql \
|
||||
06588_mangos_spell_proc_event.sql \
|
||||
06596_characters_arena_team.sql \
|
||||
06598_character_spell.sql \
|
||||
06609_mangos_mangos_string.sql \
|
||||
06613_mangos_mangos_string.sql \
|
||||
06627_mangos_creature_movement.sql \
|
||||
06640_mangos_reference_loot_template.sql \
|
||||
06642_characters_declinedname.sql \
|
||||
06668_mangos_spell_proc_event.sql \
|
||||
06676_mangos_spell_proc_event.sql \
|
||||
06681_mangos_mangos_string.sql \
|
||||
06691_mangos_spell_proc_event.sql \
|
||||
06693_mangos_spell_affect.sql \
|
||||
06693_mangos_spell_proc_event.sql \
|
||||
06698_characters_character_tutorial.sql \
|
||||
06701_mangos_command.sql \
|
||||
06701_mangos_mangos_string.sql \
|
||||
06708_mangos_mangos_string.sql \
|
||||
06715_mangos_spell_affect.sql \
|
||||
06728_mangos_quest_template.sql \
|
||||
06730_mangos_mangos_string.sql \
|
||||
06740_characters_characters.sql \
|
||||
06740_mangos_command.sql \
|
||||
06740_mangos_mangos_string.sql \
|
||||
06742_mangos_command.sql \
|
||||
06742_mangos_mangos_string.sql \
|
||||
06748_mangos_mangos_string.sql \
|
||||
06750_mangos_command.sql \
|
||||
06751_realmd_account.sql \
|
||||
06760_mangos_creature_template.sql \
|
||||
2008_10_18_01_characters_characters.sql \
|
||||
2008_10_18_02_mangos_spell_proc_event.sql \
|
||||
2008_10_19_01_mangos_spell_affect.sql \
|
||||
|
|
@ -162,79 +95,16 @@ pkgdata_DATA = \
|
|||
2008_12_22_17_mangos_item_template.sql \
|
||||
2008_12_22_18_characters_characters.sql \
|
||||
2008_12_22_19_characters_item_instance.sql \
|
||||
6936_01_mangos_spell_chain.sql \
|
||||
6939_01_mangos_quest_template.sql \
|
||||
6940_01_mangos_spell_learn_spell.sql \
|
||||
6941_01_mangos_spell_learn_spell.sql \
|
||||
6944_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
# SQL update files, to upgrade database schema from older revisions
|
||||
EXTRA_DIST = \
|
||||
06360_characters_corpse.sql \
|
||||
06360_characters_characters.sql \
|
||||
06362_characters.sql \
|
||||
06362_mangos_instance_template.sql \
|
||||
06367_mangos_spell_proc_event.sql \
|
||||
06369_mangos_spell_affect.sql \
|
||||
06370_mangos_spell_affect.sql \
|
||||
06381_mangos_command.sql \
|
||||
06387_characters_character_ticket.sql \
|
||||
06387_mangos_mangos_string.sql \
|
||||
06397_mangos_creature_template.sql \
|
||||
06398_mangos_creature_template.sql \
|
||||
06412_characters_declinedname.sql \
|
||||
06426_mangos_locales.sql \
|
||||
06426_realmd_localization.sql \
|
||||
06431_mangos_mangos_string.sql \
|
||||
06439_mangos_command.sql \
|
||||
06456_mangos_command.sql \
|
||||
06472_realmd_account.sql \
|
||||
06492_mangos_spell_chain.sql \
|
||||
06496_mangos_spell_pet_auras.sql \
|
||||
06506_mangos_spell_proc_event.sql \
|
||||
06509_mangos_command.sql \
|
||||
06509_mangos_mangos_string.sql \
|
||||
06513_mangos_command.sql \
|
||||
06515_mangos_spell_proc_event.sql \
|
||||
06521_mangos_spell_proc_event.sql \
|
||||
06523_mangos_spell_proc_event.sql \
|
||||
06528_mangos_spell_affect.sql \
|
||||
06528_mangos_spell_proc_event.sql \
|
||||
06538_mangos_spell_proc_event.sql \
|
||||
06540_mangos_spell_proc_event.sql \
|
||||
06544_mangos_spell_proc_event.sql \
|
||||
06545_mangos_command.sql \
|
||||
06557_mangos_command.sql \
|
||||
06574_mangos_spell_proc_event.sql \
|
||||
06585_mangos_command.sql \
|
||||
06588_mangos_spell_proc_event.sql \
|
||||
06596_characters_arena_team.sql \
|
||||
06598_character_spell.sql \
|
||||
06609_mangos_mangos_string.sql \
|
||||
06613_mangos_mangos_string.sql \
|
||||
06627_mangos_creature_movement.sql \
|
||||
06640_mangos_reference_loot_template.sql \
|
||||
06642_characters_declinedname.sql \
|
||||
06668_mangos_spell_proc_event.sql \
|
||||
06673_mangos_areatrigger_scripts.sql \
|
||||
06676_mangos_spell_proc_event.sql \
|
||||
06681_mangos_mangos_string.sql \
|
||||
06691_mangos_spell_proc_event.sql \
|
||||
06693_mangos_spell_affect.sql \
|
||||
06693_mangos_spell_proc_event.sql \
|
||||
06698_characters_character_tutorial.sql \
|
||||
06701_mangos_command.sql \
|
||||
06701_mangos_mangos_string.sql \
|
||||
06708_mangos_mangos_string.sql \
|
||||
06715_mangos_spell_affect.sql \
|
||||
06728_mangos_quest_template.sql \
|
||||
06730_mangos_mangos_string.sql \
|
||||
06740_characters_characters.sql \
|
||||
06740_mangos_command.sql \
|
||||
06740_mangos_mangos_string.sql \
|
||||
06742_mangos_command.sql \
|
||||
06742_mangos_mangos_string.sql \
|
||||
06748_mangos_mangos_string.sql \
|
||||
06750_mangos_command.sql \
|
||||
06751_realmd_account.sql \
|
||||
06760_mangos_creature_template.sql \
|
||||
2008_10_18_01_characters_characters.sql \
|
||||
2008_10_18_02_mangos_spell_proc_event.sql \
|
||||
2008_10_19_01_mangos_spell_affect.sql \
|
||||
|
|
@ -305,4 +175,9 @@ EXTRA_DIST = \
|
|||
2008_12_22_17_mangos_item_template.sql \
|
||||
2008_12_22_18_characters_characters.sql \
|
||||
2008_12_22_19_characters_item_instance.sql \
|
||||
6936_01_mangos_spell_chain.sql \
|
||||
6939_01_mangos_quest_template.sql \
|
||||
6940_01_mangos_spell_learn_spell.sql \
|
||||
6941_01_mangos_spell_learn_spell.sql \
|
||||
6944_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -12,28 +12,28 @@ To see if you need an update, the file names have been given a fixed structure
|
|||
that should enable you to see if you need an update or not.
|
||||
|
||||
=== File name descriptin ===
|
||||
File names are divided into two parts. First part is the date+counter
|
||||
that show commit apply date that will be compatible with database after apply update.
|
||||
The second part of the name, is the table that needs and update or has been added.
|
||||
File names are divided into two parts. First part is the revision+counter
|
||||
that show commit revision that will be compatible with database after apply update.
|
||||
Counter set order in sql updates apply for same revision.
|
||||
The second part of the name of the database and the table that needs and update or has been added.
|
||||
See an example below:
|
||||
|
||||
2008_10_17_01_characters_character_spell.sql
|
||||
| | | |
|
||||
| | | |
|
||||
| | | The table character_spell
|
||||
| | | will need an update.
|
||||
| | |
|
||||
| | Name of affected DB (default recommended name)
|
||||
| | Can be: characters, mangos, realmd
|
||||
| |
|
||||
| Counter show number of sql update in updates list for provided date
|
||||
| and set proper order for sql updates for same date
|
||||
6936_01_mangos_spell_chain.sql
|
||||
| | | |
|
||||
| | | |
|
||||
| | | The table `spell_chain`
|
||||
| | | will need an update.
|
||||
| | |
|
||||
| | Name of affected DB (default recommended name)
|
||||
| | Can be: characters, mangos, realmd
|
||||
| |
|
||||
| Counter show number of sql update in updates list for provided revision
|
||||
| and set proper order for sql updates for same revision
|
||||
|
|
||||
MaNGOS commit date related to sql update. For related commit
|
||||
you can see http://github.com/mangos/mangos/commits/master
|
||||
Expected commit will be in commits list for provided date and it will have
|
||||
sql update file name (2008_10_17_01_characters_character_spell.sql in our case) in list
|
||||
changed files, After appling this update DB compatiable with found commit.
|
||||
MaNGOS commit revison related to sql update.
|
||||
It included in commit description in form [6936] as you can see at http://github.com/mangos/mangos/commits/master
|
||||
|
||||
=== For commiters ====
|
||||
Please, include sql update name in first line of commit description for simplify it search by users in commits list.
|
||||
After appling this update DB compatiable with database that include this sql update.
|
||||
SQL update include special protection against multiply and wrong order SQL updates apply.
|
||||
So attempt apply sql update to more old DB without previous SQL update in list for targeted database
|
||||
or to DB with already applied this or later SQL update will generate error and not applied.
|
||||
|
|
|
|||
|
|
@ -178,6 +178,8 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data )
|
|||
}
|
||||
sLog.outDebug("Battleground: group end");
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel());
|
||||
if(!ginfo->IsInvitedToBGInstanceGUID)
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -194,6 +196,8 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data )
|
|||
GroupQueueInfo * ginfo = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AddGroup(_player, bgTypeId, 0, false, 0);
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AddPlayer(_player, ginfo);
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel());
|
||||
if(!ginfo->IsInvitedToBGInstanceGUID)
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true);
|
||||
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
|
||||
}
|
||||
}
|
||||
|
|
@ -782,6 +786,8 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
|||
}
|
||||
sLog.outDebug("Battleground: arena join as group end");
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel(), arenatype, isRated, arenaRating);
|
||||
if(isRated)
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -241,38 +241,6 @@ void BattleGroundQueue::AddPlayer(Player *plr, GroupQueueInfo *ginfo)
|
|||
|
||||
// add the pinfo to ginfo's list
|
||||
ginfo->Players[plr->GetGUID()] = &info;
|
||||
/*
|
||||
if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) )
|
||||
{
|
||||
BattleGround* bg = sBattleGroundMgr.GetBattleGround(bgTypeId);
|
||||
char const* bgName = bg->GetName();
|
||||
|
||||
uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id);
|
||||
uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id);
|
||||
|
||||
// replace hardcoded max level by player max level for nice output
|
||||
if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
|
||||
int8 MinPlayers = bg->GetMinPlayersPerTeam();
|
||||
|
||||
uint8 qHorde = m_QueuedPlayers[queue_id].Horde;
|
||||
uint8 qAlliance = m_QueuedPlayers[queue_id].Alliance;
|
||||
|
||||
// Show queue status to player only (when joining queue)
|
||||
if(sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
|
||||
{
|
||||
ChatHandler(plr).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF,
|
||||
bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? (MinPlayers - qAlliance) : 0, qHorde, (MinPlayers > qHorde) ? (MinPlayers - qHorde) : 0);
|
||||
}
|
||||
// System message
|
||||
else
|
||||
{
|
||||
sWorld.SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD,
|
||||
bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? (MinPlayers - qAlliance) : 0, qHorde, (MinPlayers > qHorde) ? (MinPlayers - qHorde) : 0);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
|
||||
|
|
@ -358,6 +326,11 @@ void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
|
|||
// remove player queue info
|
||||
m_QueuedPlayers[queue_id].erase(itr);
|
||||
// remove group queue info if needed
|
||||
|
||||
//if we left BG queue(not porting) OR if arena team left queue for rated match
|
||||
if((decreaseInvitedCount && !group->ArenaType) || (group->ArenaType && group->IsRated && group->Players.empty()))
|
||||
AnnounceWorld(group, guid, false);
|
||||
|
||||
if(group->Players.empty())
|
||||
{
|
||||
m_QueuedGroups[queue_id].erase(group_itr);
|
||||
|
|
@ -386,6 +359,85 @@ void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
|
|||
}
|
||||
}
|
||||
|
||||
void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, uint64 playerGUID, bool isAddedToQueue)
|
||||
{
|
||||
|
||||
if(ginfo->ArenaType) //if Arena
|
||||
{
|
||||
if( sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE) && ginfo->IsRated)
|
||||
{
|
||||
BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(ginfo->BgTypeId);
|
||||
if(!bg)
|
||||
return;
|
||||
|
||||
char const* bgName = bg->GetName();
|
||||
if(isAddedToQueue)
|
||||
sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
|
||||
else
|
||||
sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
|
||||
}
|
||||
}
|
||||
else //if BG
|
||||
{
|
||||
if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) )
|
||||
{
|
||||
Player *plr = objmgr.GetPlayer(playerGUID);
|
||||
if(!plr)
|
||||
return;
|
||||
|
||||
BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(ginfo->BgTypeId);
|
||||
if(!bg)
|
||||
return;
|
||||
|
||||
uint32 queue_id = plr->GetBattleGroundQueueIdFromLevel();
|
||||
char const* bgName = bg->GetName();
|
||||
|
||||
uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id);
|
||||
uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id);
|
||||
|
||||
// replace hardcoded max level by player max level for nice output
|
||||
if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
|
||||
int8 MinPlayers = bg->GetMinPlayersPerTeam();
|
||||
|
||||
uint8 qHorde = 0;
|
||||
uint8 qAlliance = 0;
|
||||
|
||||
uint32 bgTypeId = ginfo->BgTypeId;
|
||||
QueuedPlayersMap::iterator itr;
|
||||
for(itr = m_QueuedPlayers[queue_id].begin(); itr!= m_QueuedPlayers[queue_id].end(); ++itr)
|
||||
{
|
||||
if(itr->second.GroupInfo->BgTypeId == bgTypeId)
|
||||
{
|
||||
switch(itr->second.GroupInfo->Team)
|
||||
{
|
||||
case HORDE:
|
||||
qHorde++; break;
|
||||
case ALLIANCE:
|
||||
qAlliance++; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show queue status to player only (when joining queue)
|
||||
if(sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
|
||||
{
|
||||
ChatHandler(plr).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF,
|
||||
bgName, q_min_level, q_max_level, qAlliance, MinPlayers, qHorde, MinPlayers);
|
||||
}
|
||||
// System message
|
||||
else
|
||||
{
|
||||
sWorld.SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD,
|
||||
bgName, q_min_level, q_max_level, qAlliance, MinPlayers, qHorde, MinPlayers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * bg, uint32 side)
|
||||
{
|
||||
// set side if needed
|
||||
|
|
@ -713,6 +765,15 @@ void BattleGroundQueue::Update(uint32 bgTypeId, uint32 queue_id, uint8 arenatype
|
|||
{
|
||||
// create new battleground
|
||||
bg2 = sBattleGroundMgr.CreateNewBattleGround(bgTypeId);
|
||||
if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) )
|
||||
{
|
||||
char const* bgName = bg2->GetName();
|
||||
uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id);
|
||||
uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id);
|
||||
if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
sWorld.SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level);
|
||||
}
|
||||
}
|
||||
|
||||
if(!bg2)
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class BattleGroundQueue
|
|||
void RemovePlayer(uint64 guid, bool decreaseInvitedCount);
|
||||
void DecreaseGroupLength(uint32 queueId, uint32 AsGroup);
|
||||
void BGEndedRemoveInvites(BattleGround * bg);
|
||||
void AnnounceWorld(GroupQueueInfo *ginfo, uint64 playerGUID, bool isAddedToQueue);
|
||||
|
||||
typedef std::map<uint64, PlayerQueueInfo> QueuedPlayersMap;
|
||||
QueuedPlayersMap m_QueuedPlayers[MAX_BATTLEGROUND_QUEUES];
|
||||
|
|
|
|||
|
|
@ -317,24 +317,37 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
// speedup check for heroic class disabled case
|
||||
uint32 req_level_for_heroic = sWorld.getConfig(CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING);
|
||||
if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT;
|
||||
SendPacket( &data );
|
||||
return;
|
||||
}
|
||||
|
||||
bool AllowTwoSideAccounts = !sWorld.IsPvPRealm() || sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
|
||||
uint32 skipCinematics = sWorld.getConfig(CONFIG_SKIP_CINEMATICS);
|
||||
|
||||
bool have_same_race = false;
|
||||
|
||||
// if 0 then allowed creating without any characters
|
||||
bool have_req_level_for_heroic = (req_level_for_heroic==0);
|
||||
|
||||
if(!AllowTwoSideAccounts || skipCinematics == 1 || class_ == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
QueryResult *result2 = CharacterDatabase.PQuery("SELECT race,class FROM characters WHERE account = '%u' %s",
|
||||
QueryResult *result2 = CharacterDatabase.PQuery("SELECT guid,race,class FROM characters WHERE account = '%u' %s",
|
||||
GetAccountId(), (skipCinematics == 1 || class_ == CLASS_DEATH_KNIGHT) ? "" : "LIMIT 1");
|
||||
if(result2)
|
||||
{
|
||||
uint32 team_= Player::TeamForRace(race_);
|
||||
|
||||
Field* field = result2->Fetch();
|
||||
uint8 acc_race = field[0].GetUInt32();
|
||||
uint8 acc_race = field[1].GetUInt32();
|
||||
|
||||
if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
uint8 acc_class = field[1].GetUInt32();
|
||||
uint8 acc_class = field[2].GetUInt32();
|
||||
if(acc_class == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
if(heroic_free_slots > 0)
|
||||
|
|
@ -347,6 +360,14 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!have_req_level_for_heroic)
|
||||
{
|
||||
uint32 acc_guid = field[0].GetUInt32();
|
||||
uint32 acc_level = Player::GetUInt32ValueFromDB(UNIT_FIELD_LEVEL,acc_guid);
|
||||
if(acc_level >= req_level_for_heroic)
|
||||
have_req_level_for_heroic = true;
|
||||
}
|
||||
}
|
||||
|
||||
// need to check team only for first character
|
||||
|
|
@ -374,14 +395,14 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
break;
|
||||
|
||||
field = result2->Fetch();
|
||||
acc_race = field[0].GetUInt32();
|
||||
acc_race = field[1].GetUInt32();
|
||||
|
||||
if(!have_same_race)
|
||||
have_same_race = race_ == acc_race;
|
||||
|
||||
if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
uint8 acc_class = field[1].GetUInt32();
|
||||
uint8 acc_class = field[2].GetUInt32();
|
||||
if(acc_class == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
if(heroic_free_slots > 0)
|
||||
|
|
@ -394,12 +415,27 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!have_req_level_for_heroic)
|
||||
{
|
||||
uint32 acc_guid = field[0].GetUInt32();
|
||||
uint32 acc_level = Player::GetUInt32ValueFromDB(UNIT_FIELD_LEVEL,acc_guid);
|
||||
if(acc_level >= req_level_for_heroic)
|
||||
have_req_level_for_heroic = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete result2;
|
||||
}
|
||||
}
|
||||
|
||||
if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && !have_req_level_for_heroic)
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT;
|
||||
SendPacket( &data );
|
||||
return;
|
||||
}
|
||||
|
||||
// extract other data required for player creating
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair, outfitId;
|
||||
recv_data >> gender >> skin >> face;
|
||||
|
|
|
|||
|
|
@ -642,31 +642,33 @@ enum MangosStrings
|
|||
|
||||
LANG_BG_QUEUE_ANNOUNCE_SELF = 711,
|
||||
LANG_BG_QUEUE_ANNOUNCE_WORLD = 712,
|
||||
|
||||
|
||||
LANG_YOUR_ARENA_LEVEL_REQ_ERROR = 713,
|
||||
// LANG_HIS_ARENA_LEVEL_REQ_ERROR = 714, an opcode exists for this
|
||||
// = 714, not used
|
||||
LANG_YOUR_BG_LEVEL_REQ_ERROR = 715,
|
||||
// LANG_YOUR_ARENA_TEAM_FULL = 716, an opcode exists for this
|
||||
// = 716, not used
|
||||
LANG_BG_STARTED_ANNOUNCE_WORLD = 717,
|
||||
LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN= 718,
|
||||
LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT= 719,
|
||||
|
||||
LANG_BG_GROUP_TOO_LARGE = 1122, // "Your group is too large for this battleground. Please regroup to join."
|
||||
LANG_ARENA_GROUP_TOO_LARGE = 1123, // "Your group is too large for this arena. Please regroup to join."
|
||||
LANG_ARENA_YOUR_TEAM_ONLY = 1124, // "Your group has members not in your arena team. Please regroup to join."
|
||||
LANG_ARENA_NOT_ENOUGH_PLAYERS = 1125, // "Your group does not have enough players to join this match."
|
||||
LANG_ARENA_GOLD_WINS = 1126, // "The Gold Team wins!"
|
||||
LANG_ARENA_GREEN_WINS = 1127, // "The Green Team wins!"
|
||||
LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 1128, // The battleground will end soon, because there aren't enough players. Get more ppl or win already!
|
||||
LANG_BG_GROUP_OFFLINE_MEMBER = 1129, // "Your group has an offline member. Please remove him before joining."
|
||||
LANG_BG_GROUP_MIXED_FACTION = 1130, // "Your group has players from the opposing faction. You can't join the battleground as a group."
|
||||
LANG_BG_GROUP_MIXED_LEVELS = 1131, // "Your group has players from different battleground brakets. You can't join as group."
|
||||
LANG_BG_GROUP_MEMBER_ALREADY_IN_QUEUE = 1132, // "Someone in your party is already in this battleground queue. (S)he must leave it before joining as group."
|
||||
LANG_BG_GROUP_MEMBER_DESERTER = 1133, // "Someone in your party is Deserter. You can't join as group."
|
||||
LANG_BG_GROUP_MEMBER_NO_FREE_QUEUE_SLOTS = 1134, // "Someone in your party is already in three battleground queues. You cannot join as group."
|
||||
LANG_BG_GROUP_TOO_LARGE = 720, // "Your group is too large for this battleground. Please regroup to join."
|
||||
LANG_ARENA_GROUP_TOO_LARGE = 721, // "Your group is too large for this arena. Please regroup to join."
|
||||
LANG_ARENA_YOUR_TEAM_ONLY = 722, // "Your group has members not in your arena team. Please regroup to join."
|
||||
LANG_ARENA_NOT_ENOUGH_PLAYERS = 723, // "Your group does not have enough players to join this match."
|
||||
LANG_ARENA_GOLD_WINS = 724, // "The Gold Team wins!"
|
||||
LANG_ARENA_GREEN_WINS = 725, // "The Green Team wins!"
|
||||
LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 726, // The battleground will end soon, because there aren't enough players. Get more ppl or win already!
|
||||
LANG_BG_GROUP_OFFLINE_MEMBER = 727, // "Your group has an offline member. Please remove him before joining."
|
||||
LANG_BG_GROUP_MIXED_FACTION = 728, // "Your group has players from the opposing faction. You can't join the battleground as a group."
|
||||
LANG_BG_GROUP_MIXED_LEVELS = 729, // "Your group has players from different battleground brakets. You can't join as group."
|
||||
LANG_BG_GROUP_MEMBER_ALREADY_IN_QUEUE = 730, // "Someone in your party is already in this battleground queue. (S)he must leave it before joining as group."
|
||||
LANG_BG_GROUP_MEMBER_DESERTER = 731, // "Someone in your party is Deserter. You can't join as group."
|
||||
LANG_BG_GROUP_MEMBER_NO_FREE_QUEUE_SLOTS = 732, // "Someone in your party is already in three battleground queues. You cannot join as group."
|
||||
|
||||
LANG_CANNOT_TELE_TO_BG = 1135, // "You cannot teleport to a battleground or arena map."
|
||||
LANG_CANNOT_SUMMON_TO_BG = 1136, // "You cannot summon players to a battleground or arena map."
|
||||
LANG_CANNOT_GO_TO_BG_GM = 1137, // "You must be in GM mode to teleport to a player in a battleground."
|
||||
LANG_CANNOT_GO_TO_BG_FROM_BG = 1138, // "You cannot teleport to a battleground from another battleground. Please leave the current battleground first."
|
||||
LANG_CANNOT_TELE_TO_BG = 733, // "You cannot teleport to a battleground or arena map."
|
||||
LANG_CANNOT_SUMMON_TO_BG = 734, // "You cannot summon players to a battleground or arena map."
|
||||
LANG_CANNOT_GO_TO_BG_GM = 735, // "You must be in GM mode to teleport to a player in a battleground."
|
||||
LANG_CANNOT_GO_TO_BG_FROM_BG = 736, // "You cannot teleport to a battleground from another battleground. Please leave the current battleground first."
|
||||
// Room for batleground/arena strings 737-799 not used
|
||||
|
||||
// in game strings
|
||||
// = 800, not used
|
||||
|
|
|
|||
|
|
@ -1715,6 +1715,10 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/)
|
|||
if(!spellInfo)
|
||||
continue;
|
||||
|
||||
// skip server-side/triggered spells
|
||||
if(spellInfo->spellLevel==0)
|
||||
continue;
|
||||
|
||||
// skip wrong class/race skills
|
||||
if(!m_session->GetPlayer()->IsSpellFitByClassAndRace(spellInfo->Id))
|
||||
continue;
|
||||
|
|
@ -1723,8 +1727,6 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/)
|
|||
if( spellInfo->SpellFamilyName != family)
|
||||
continue;
|
||||
|
||||
//TODO: skip triggered spells
|
||||
|
||||
// skip spells with first rank learned as talent (and all talents then also)
|
||||
uint32 first_rank = spellmgr.GetFirstSpellInChain(spellInfo->Id);
|
||||
if(GetTalentSpellCost(first_rank) > 0 )
|
||||
|
|
|
|||
|
|
@ -279,7 +279,8 @@ bool MapManager::ExistMapAndVMap(uint32 mapid, float x,float y)
|
|||
bool MapManager::IsValidMAP(uint32 mapid)
|
||||
{
|
||||
MapEntry const* mEntry = sMapStore.LookupEntry(mapid);
|
||||
return mEntry && (!mEntry->Instanceable() || objmgr.GetInstanceTemplate(mapid));
|
||||
return mEntry && (!mEntry->IsDungeon() || objmgr.GetInstanceTemplate(mapid));
|
||||
// TODO: add check for battleground template
|
||||
}
|
||||
|
||||
void MapManager::LoadGrid(int mapid, float x, float y, const WorldObject* obj, bool no_unload)
|
||||
|
|
|
|||
|
|
@ -4355,7 +4355,7 @@ uint32 Player::GetShieldBlockValue() const
|
|||
{
|
||||
BaseModGroup modGroup = SHIELD_BLOCK_VALUE;
|
||||
|
||||
float value = GetTotalBaseModValue(modGroup) + GetStat(STAT_STRENGTH)/20 - 1;
|
||||
float value = GetTotalBaseModValue(modGroup) + GetStat(STAT_STRENGTH) * 0.5f - 10;
|
||||
|
||||
value = (value < 0) ? 0 : value;
|
||||
|
||||
|
|
@ -13748,6 +13748,11 @@ void Player::_LoadArenaTeamInfo(QueryResult *result)
|
|||
uint32 personal_rating = fields[3].GetUInt32();
|
||||
|
||||
ArenaTeam* aTeam = objmgr.GetArenaTeamById(arenateamid);
|
||||
if(!aTeam)
|
||||
{
|
||||
sLog.outError("Player::_LoadArenaTeamInfo: couldn't load arenateam %u, week %u, season %u, rating %u", arenateamid, played_week, played_season, personal_rating);
|
||||
continue;
|
||||
}
|
||||
uint8 arenaSlot = aTeam->GetSlot();
|
||||
|
||||
m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6] = arenateamid; // TeamID
|
||||
|
|
@ -18592,6 +18597,9 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
|
|||
|
||||
void Player::ResurectUsingRequestData()
|
||||
{
|
||||
/// Teleport before resurrecting, otherwise the player might get attacked from creatures near his corpse
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
|
||||
ResurrectPlayer(0.0f,false);
|
||||
|
||||
if(GetMaxHealth() > m_resurrectHealth)
|
||||
|
|
@ -18609,8 +18617,6 @@ void Player::ResurectUsingRequestData()
|
|||
SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY) );
|
||||
|
||||
SpawnCorpseBones();
|
||||
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
}
|
||||
|
||||
void Player::SetClientControl(Unit* target, uint8 allowMove)
|
||||
|
|
|
|||
|
|
@ -2542,6 +2542,9 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
else
|
||||
modelid = 21244;
|
||||
break;
|
||||
case FORM_METAMORPHOSIS:
|
||||
modelid = 25277;
|
||||
break;
|
||||
case FORM_AMBIENT:
|
||||
case FORM_SHADOW:
|
||||
case FORM_STEALTH:
|
||||
|
|
@ -5305,6 +5308,10 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
spellId = 40122;
|
||||
spellId2 = 40121;
|
||||
break;
|
||||
case FORM_METAMORPHOSIS:
|
||||
spellId = 54817;
|
||||
spellId2 = 54879;
|
||||
break;
|
||||
case FORM_SPIRITOFREDEMPTION:
|
||||
spellId = 27792;
|
||||
spellId2 = 27795; // must be second, this important at aura remove to prevent to early iterator invalidation.
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ class MANGOS_DLL_SPEC Aura
|
|||
{
|
||||
// only aura in slot with charges and without stack limitation
|
||||
if (m_auraSlot < MAX_AURAS && m_procCharges >= 1 && GetSpellProto()->StackAmount==0)
|
||||
SetAuraCharges(m_procCharges - 1);
|
||||
SendAuraUpdate(false);
|
||||
}
|
||||
|
||||
bool IsPositive() { return m_positive; }
|
||||
|
|
|
|||
|
|
@ -5944,17 +5944,20 @@ void Spell::EffectSendTaxi(uint32 i)
|
|||
uint32 mountid = 0;
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 31606: //Stormcrow Amulet
|
||||
case 31606: //Stormcrow Amulet
|
||||
mountid = 17447;
|
||||
break;
|
||||
case 45071: //Quest - Sunwell Daily - Dead Scar Bombing Run
|
||||
case 45113: //Quest - Sunwell Daily - Ship Bombing Run
|
||||
case 45353: //Quest - Sunwell Daily - Ship Bombing Run Return
|
||||
case 45071: //Quest - Sunwell Daily - Dead Scar Bombing Run
|
||||
case 45113: //Quest - Sunwell Daily - Ship Bombing Run
|
||||
case 45353: //Quest - Sunwell Daily - Ship Bombing Run Return
|
||||
mountid = 22840;
|
||||
break;
|
||||
case 34905: //Stealth Flight
|
||||
case 34905: //Stealth Flight
|
||||
mountid = 6851;
|
||||
break;
|
||||
case 53335: //Stormwind Harbor Flight - Peaceful
|
||||
mountid = 6852;
|
||||
break;
|
||||
}
|
||||
|
||||
((Player*)unitTarget)->ActivateTaxiPathTo(nodes,mountid);
|
||||
|
|
|
|||
|
|
@ -1723,7 +1723,13 @@ void SpellMgr::LoadSpellLearnSpells()
|
|||
{
|
||||
SpellLearnSpellNode dbc_node;
|
||||
dbc_node.spell = entry->EffectTriggerSpell[i];
|
||||
dbc_node.autoLearned = true;
|
||||
|
||||
// ignore learning not existed spells (broken/outdated/or generic learnig spell 483
|
||||
if(!sSpellStore.LookupEntry(dbc_node.spell))
|
||||
continue;
|
||||
|
||||
// talent or passive spells or skill-step spells auto-casted, other required explicit dependent learning
|
||||
dbc_node.autoLearned = GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP);
|
||||
|
||||
SpellLearnSpellMap::const_iterator db_node_begin = GetBeginSpellLearnSpell(spell);
|
||||
SpellLearnSpellMap::const_iterator db_node_end = GetEndSpellLearnSpell(spell);
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
|
|||
if(getPetType() == HUNTER_PET) //hunter pets benefit from owner's attack power
|
||||
{
|
||||
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f;
|
||||
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.125f));
|
||||
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f));
|
||||
}
|
||||
//demons benefit from warlocks shadow or fire damage
|
||||
else if(getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)
|
||||
|
|
|
|||
|
|
@ -1478,15 +1478,18 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage)
|
|||
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura
|
||||
armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL);
|
||||
|
||||
if (armor<0.0f) armor=0.0f;
|
||||
// Apply Player CR_ARMOR_PENETRATION rating
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
armor *= 1.0f - ((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f;
|
||||
|
||||
float tmpvalue = 0.0f;
|
||||
if(getLevel() <= 59) //Level 1-59
|
||||
tmpvalue = armor / (armor + 400.0f + 85.0f * getLevel());
|
||||
else if(getLevel() < 70) //Level 60-69
|
||||
tmpvalue = armor / (armor - 22167.5f + 467.5f * getLevel());
|
||||
else //Level 70+
|
||||
tmpvalue = armor / (armor + 10557.5f);
|
||||
if (armor < 0.0f) armor=0.0f;
|
||||
|
||||
float levelModifier = getLevel();
|
||||
if ( levelModifier > 59 )
|
||||
levelModifier = levelModifier + (4.5f * (levelModifier-59));
|
||||
|
||||
float tmpvalue = 0.1f * armor / (8.5f * levelModifier + 40);
|
||||
tmpvalue = tmpvalue/(1.0f + tmpvalue);
|
||||
|
||||
if(tmpvalue < 0.0f)
|
||||
tmpvalue = 0.0f;
|
||||
|
|
|
|||
|
|
@ -633,13 +633,6 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_CHARACTERS_PER_REALM] = 10;
|
||||
}
|
||||
|
||||
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("HeroicCharactersPerRealm", 1);
|
||||
if(m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] < 0 || m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)
|
||||
{
|
||||
sLog.outError("HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.",m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
|
||||
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1;
|
||||
}
|
||||
|
||||
// must be after CONFIG_CHARACTERS_PER_REALM
|
||||
m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfig.GetIntDefault("CharactersPerAccount", 50);
|
||||
if(m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < m_configs[CONFIG_CHARACTERS_PER_REALM])
|
||||
|
|
@ -648,6 +641,15 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = m_configs[CONFIG_CHARACTERS_PER_REALM];
|
||||
}
|
||||
|
||||
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("HeroicCharactersPerRealm", 1);
|
||||
if(m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] < 0 || m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)
|
||||
{
|
||||
sLog.outError("HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.",m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
|
||||
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1;
|
||||
}
|
||||
|
||||
m_configs[CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING] = sConfig.GetIntDefault("MinLevelForHeroicCharacterCreating", 55);
|
||||
|
||||
m_configs[CONFIG_SKIP_CINEMATICS] = sConfig.GetIntDefault("SkipCinematics", 0);
|
||||
if(m_configs[CONFIG_SKIP_CINEMATICS] < 0 || m_configs[CONFIG_SKIP_CINEMATICS] > 2)
|
||||
{
|
||||
|
|
@ -757,8 +759,9 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfig.GetBoolDefault("Instance.IgnoreRaid", false);
|
||||
|
||||
m_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfig.GetBoolDefault("Battleground.CastDeserter", true);
|
||||
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", true);
|
||||
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
|
||||
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
|
||||
m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.Enable", false);
|
||||
|
||||
m_configs[CONFIG_CAST_UNSTUCK] = sConfig.GetBoolDefault("CastUnstuck", true);
|
||||
m_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfig.GetIntDefault("Instance.ResetTimeHour", 4);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ enum WorldConfigs
|
|||
CONFIG_CHARACTERS_PER_ACCOUNT,
|
||||
CONFIG_CHARACTERS_PER_REALM,
|
||||
CONFIG_HEROIC_CHARACTERS_PER_REALM,
|
||||
CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING,
|
||||
CONFIG_SKIP_CINEMATICS,
|
||||
CONFIG_MAX_PLAYER_LEVEL,
|
||||
CONFIG_START_PLAYER_LEVEL,
|
||||
|
|
@ -182,6 +183,7 @@ enum WorldConfigs
|
|||
CONFIG_ARENA_RATING_DISCARD_TIMER,
|
||||
CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS,
|
||||
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
|
||||
CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE,
|
||||
CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER,
|
||||
CONFIG_SKILL_MILLING,
|
||||
CONFIG_VALUE_COUNT
|
||||
|
|
|
|||
|
|
@ -413,6 +413,13 @@ LogColors = ""
|
|||
# Default: 1
|
||||
# The number must be between 0 (not allowed) and 10
|
||||
#
|
||||
# MinLevelForHeroicCharacterCreating
|
||||
# Limit creating heroic characters only for account with another character of specific level (ignored for GM accounts)
|
||||
# 0 - not require any existed chaarcter
|
||||
# 1 - require at least any character existed
|
||||
# Default: 55 - default requirement
|
||||
#
|
||||
#
|
||||
# SkipCinematics
|
||||
# Disable in-game script movie at first character's login(allows to prevent buggy intro in case of custom start location coordinates)
|
||||
# Default: 0 - show intro for each new characrer
|
||||
|
|
@ -468,8 +475,8 @@ LogColors = ""
|
|||
#
|
||||
# AlwaysMaxSkillForLevel
|
||||
# Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc.
|
||||
# Default: 0 (true)
|
||||
# 1 (false)
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
#
|
||||
# ActivateWeather
|
||||
# Activate weather system
|
||||
|
|
@ -483,14 +490,18 @@ LogColors = ""
|
|||
#
|
||||
# Battleground.QueueAnnouncer.Enable
|
||||
# Enable queue announcer posting to chat
|
||||
# Default: 1 (true)
|
||||
# 0 (false)
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
#
|
||||
# Battleground.QueueAnnouncer.PlayerOnly
|
||||
# Enable queue announcer posting to chat
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
#
|
||||
# Arena.QueueAnnouncer.Enable: Enable queue announcer posting to chat
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
#
|
||||
# CastUnstuck
|
||||
# Allow cast or not Unstuck spell at .start or client Help option use
|
||||
# Default: 1 (true)
|
||||
|
|
@ -580,6 +591,7 @@ CharactersCreatingDisabled = 0
|
|||
CharactersPerAccount = 50
|
||||
CharactersPerRealm = 10
|
||||
HeroicCharactersPerRealm = 1
|
||||
MinLevelForHeroicCharacterCreating = 55
|
||||
SkipCinematics = 0
|
||||
MaxPlayerLevel = 80
|
||||
StartPlayerLevel = 1
|
||||
|
|
@ -595,8 +607,9 @@ AllFlightPaths = 0
|
|||
AlwaysMaxSkillForLevel = 0
|
||||
ActivateWeather = 1
|
||||
Battleground.CastDeserter = 1
|
||||
Battleground.QueueAnnouncer.Enable = 1
|
||||
Battleground.QueueAnnouncer.Enable = 0
|
||||
Battleground.QueueAnnouncer.PlayerOnly = 0
|
||||
Arena.QueueAnnouncer.Enable = 0
|
||||
CastUnstuck = 1
|
||||
Instance.IgnoreLevel = 0
|
||||
Instance.IgnoreRaid = 0
|
||||
|
|
|
|||
|
|
@ -285,20 +285,20 @@ bool consoleToUtf8(const std::string& conStr,std::string& utf8str);
|
|||
bool Utf8FitTo(const std::string& str, std::wstring search);
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#define UTF8PRINTF(OUT,FRM,RESERR) \
|
||||
{ \
|
||||
char temp_buf[32*1024]; \
|
||||
va_list ap; \
|
||||
va_start(ap, FRM); \
|
||||
size_t temp_len = vsnprintf(temp_buf,6000,FRM,ap); \
|
||||
va_end(ap); \
|
||||
\
|
||||
wchar_t wtemp_buf[6000]; \
|
||||
size_t wtemp_len = 6000-1; \
|
||||
#define UTF8PRINTF(OUT,FRM,RESERR) \
|
||||
{ \
|
||||
char temp_buf[32*1024]; \
|
||||
va_list ap; \
|
||||
va_start(ap, FRM); \
|
||||
size_t temp_len = vsnprintf(temp_buf,32*1024,FRM,ap); \
|
||||
va_end(ap); \
|
||||
\
|
||||
wchar_t wtemp_buf[32*1024]; \
|
||||
size_t wtemp_len = 32*1024-1; \
|
||||
if(!Utf8toWStr(temp_buf,temp_len,wtemp_buf,wtemp_len)) \
|
||||
return RESERR; \
|
||||
return RESERR; \
|
||||
CharToOemBuffW(&wtemp_buf[0],&temp_buf[0],wtemp_len+1);\
|
||||
fprintf(OUT,temp_buf); \
|
||||
fprintf(OUT,temp_buf); \
|
||||
}
|
||||
#else
|
||||
#define UTF8PRINTF(OUT,FRM,RESERR) \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6928"
|
||||
#define REVISION_NR "6947"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue