+ // reset cooldowns and HP/Mana + pl->SetHealth(pl->GetMaxHealth()); + plTarget->SetHealth(plTarget->GetMaxHealth()); + + if (pl->getPowerType() == POWER_MANA) pl->SetPower(POWER_MANA, pl->GetMaxPower(POWER_MANA)); + if (plTarget->getPowerType() == POWER_MANA) plTarget->SetPower(POWER_MANA, plTarget->GetMaxPower(POWER_MANA)); + //only for cooldowns which < 15 min + if (!pl->GetMap()->IsDungeon()) { pl->RemoveArenaSpellCooldowns(); plTarget->RemoveArenaSpellCooldowns(); } +
*История арены* Описание: После каждого рейтингового матча в базу записывается информация о том: - кто выйграл (winner_team) - кто проиграл (loser_team) - новые рейтинги команд (winner_rating, loser_rating) - карта (map) - тип (type) - время игры (play_time)
Code
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index f30d223..d66bc45 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -827,6 +827,9 @@ void BattleGround::EndBattleGround(uint32 winner) // this way all arena team members will get notified, not only the ones who participated in this match winner_arena_team->NotifyStatsChanged(); loser_arena_team->NotifyStatsChanged(); + CharacterDatabase.BeginTransaction(); + CharacterDatabase.PExecute("INSERT INTO arena_team_history (winner_team, winner_rating, loser_team, loser_rating, type, map) VALUES ('%u', '%u', '%u', '%u', '%u', '%u')", winner_arena_team->GetId(), winner_arena_team->GetRating(), loser_arena_team->GetId(), loser_arena_team->GetRating(), winner_arena_team->GetType(), GetMapId()); + CharacterDatabase.CommitTransaction(); }
if (winmsg_id)
sql
Code
DROP TABLE IF EXISTS `arena_team_history`; CREATE TABLE `arena_team_history` ( `id` int(11) NOT NULL auto_increment COMMENT 'Identifier', `winner_team` int(10) unsigned NOT NULL default '0', `winner_rating` int(10) unsigned NOT NULL default '0', `loser_team` int(10) unsigned NOT NULL default '0', `loser_rating` int(10) unsigned NOT NULL default '0', `change` int(10) unsigned NOT NULL default '0', `type` int(2) unsigned NOT NULL default '0', `map` int(10) unsigned NOT NULL default '0', `play_time` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1669 DEFAULT CHARSET=utf8;
Добавлено (22.12.2010, 22:33) --------------------------------------------- *PvP Token System* Описание: За убийство в PvP Зонах будет выдаваться игроку поощрение, в виде Badge of Justice/либо то что выберете вы, кол-во предметов/и в каких PvP Зонах, Всего их 4: на аренах(включая гурубаши) на бг, на бг и на аренах и везде.
Code
diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 0bb942e..339b5a1 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1375,3 +1375,33 @@ Ra.IP = 0.0.0.0 Ra.Port = 3443 Ra.MinLevel = 3 Ra.Secure = 1 + +######################################################################################################### #### ## ## ## # + # PvP Token System +# +# PvPToken.Enable +# Enable/disable PvP Token system. +# Default: 1 (enabled) +# 0 (disabled) +# +# PvPToken.ItemID +# The item ID of the token that players will receive after killing an enemy. +# Default: 29434 (Badge of Justice) +# +# PvPToken.ItemCount +# The count amount of the ItemID +# Default: 1 +# +# PvPToken.MapRestriction +# The type of maps where players can receive the token +# Default: 4 - all maps +# 3 - battlegrounds only +# 2 - FFA areas only (both instanced and world arenas) +# 1 - battlegrounds and FFA areas only +# +##################################################################################################### #### ## ## ## ## ## + + PvPToken .Enable = 0 +PvPToken.ItemID = 29434 +PvPToken.ItemCount = 1 +PvPToken.MapRestriction = 4 diff --git a/src/game/Language.h b/src/game/Language.h index 823d6d5..938755b 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -848,7 +848,7 @@ enum MangosStrings // 10000-10999
// Use for custom patches 11000-11999 - + LANG_YOU_RECEIVE_TOKEN = 11050, // NOT RESERVED IDS 12000-1999999999 // `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID) // For other tables maybe 2000010000-2147483647 (max index) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 65c6ac0..34535df 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -21017,6 +21017,35 @@ void Player::ResummonPetTemporaryUnSummonedIfAny() m_temporaryUnsummonedPetNumber = 0; }