Сейчас 01.07.2024, 16:22



  • Страница 1 из 1
  • 1
[Моды в ядро]
AndrqhaДата: Понедельник, 08.08.2011, 20:40 | Сообщение # 1
Генерал-майор
Группа: Модераторы
Сообщений: 288
Награды: 2
Репутация: 1
Статус:
Так-как надоело что создают одни и тежи темы. В поисках патчей эта тема была последней каплей: http://wowjp.net/forum/106-50676-1
Модератор попросил создать отдельную тему с теми патчами которые "Наиболее часто ищут" - в общем дополните тему тем чем не заполнил я.
Выкладывайте Фан патчи которые не компилятся сразу с открытых исходников, а приходится набирать отдельно. (Люди просто напросто отказываются юзать поиск).

Внимание! Смотрим обязательно 8 пост прежде чем добавить ПАТЧ в тему.

*Победные медальки за БГ*
Описание: Выбираем за какое БГ что будет даваться/их кол-во.

В исходниках находим файл BattleGround.h
Открываем его и ищем строчки:
Code
ITEM_AV_MARK_OF_HONOR           = 20560,               
                   ITEM_WS_MARK_OF_HONOR           = 20558,               
                   ITEM_AB_MARK_OF_HONOR           = 20559,               
                   ITEM_EY_MARK_OF_HONOR           = 29024,               
                   ITEM_SA_MARK_OF_HONOR           = 42425               
};               

enum BattleGroundMarksCount               
{               
                   ITEM_WINNER_COUNT               = 3,               
                   ITEM_LOSER_COUNT                = 1               
};


*Флай маунты в Азероте*
Описание: Дает возможность летать/передвигаться на флай маунтах в азероте.
Внимание! Не тестировал.
Code
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp               
index f94b221..2b97e43 100644               
--- a/src/game/Spell.cpp               
+++ b/src/game/Spell.cpp               
@@ -4210,7 +4210,7 @@ uint8 Spell::CanCast(bool strict)               
                       if(m_caster->GetTypeId()==TYPEID_PLAYER)               
                       {               
                           u         int 32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(), m_caster->GetZoneId());               
-                    if( !((Player*)m_caster)->isGameMaster() && v_map != 530 && !(v_map == 571 && ((Player*)m_caster)->HasSpell(54197)))               
+                    if( !((Player*)m_caster)->isGameMaster() && v_map != 530 && v_map != 580 && v_map != 571)               
                     return SPELL_FAILED_NOT_HERE;               
                       }


*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;               
                 }               
                      
+void Player::ReceiveToken()               
+{               
+    if(!sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE))               
+        return;               
+               
+    uint8 MapRestriction = sWorld.getConfig(CONFIG_PVP_TOKEN_RESTRICTION);               
+               
+    if( MapRestriction == 1 && !InBattleGround() && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP) ||               
+        MapRestriction == 2 && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP) ||               
+        MapRestriction == 3 && !InBattleGround())               
+        return;               
+               
+    uint32 itemID = sWorld.getConfig(CONFIG_PVP_TOKEN_ITEMID);               
+    uint32 itemCount = sWorld.getConfig(CONFIG_PVP_TOKEN_ITEMCOUNT);               
+               
+    ItemPosCountVec dest;               
+    uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemID, itemCount);               
+    if( msg != EQUIP_ERR_OK )   // convert to possible store amount               
+    {               
+        SendEquipError( msg, NULL, NULL );               
+        return;               
+    }               
+               
+    Item* item = StoreNewItem( dest, itemID, true, Item::GenerateItemRandomPropertyId(itemID));               
+    SendNewItem(item,itemCount,true,false);               
+               
+    ChatHandler(this).PSendSysMessage(LANG_YOU_RECEIVE_TOKEN);               
+}               
+               
                 bool Player::canSeeSpellClickOn(Creature const *c) const               
                 {               
                     if(!c->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_SPELLCLICK))               
d iff  --git a/src/game/Player.h b/src/game/Player.h               
index a1ea792..158da81 100644               
--- a/src/game/Player.h               
+++ b/src/game/Player.h               
@@ -1950,7 +1950,9 @@ class MANGOS_DLL_SPEC Player : public Unit               
                         void ModifyHonorPoints( int32 value );               
                         void ModifyArenaPoints( int32 value );               
                         uint32 GetMaxPersonalArenaRatingRequirement();               
-               
+                  
+        void ReceiveToken();               
+                  
                         //End of PvP System               
                      
                         void SetDrunkValue(uint16 newDrunkValue, uint32 itemid=0);               
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp               
index 06d1533..98af84b 100644               
--- a/src/game/Unit.cpp               
+++ b/src/game/Unit.cpp               
@@ -580,6 +580,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa               
                             player->RewardPlayerAndGroupAtKill(pVictim);               
                             player->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);               
                      
+   // PvP Token               
+   int8 leveldiff = player->getLevel() - pVictim->getLevel();               
+   if(!pVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT) && leveldiff < 10)               
+   player->ReceiveToken();               
+                   
                             WorldPacket data(SMSG_PARTYKILLLOG, (8+8)); //send event PARTY_KILL               
                             data << uint64(player->GetGUID()); //player with killing blow               
                             data << uint64(pVictim->GetGUID()); //victim               
diff --git a/src/game/World.cpp b/src/game/World.cpp               
index 3361b5e..c9a4ffb 100644               
--- a/src/game/World.cpp               
+++ b/src/game/World.cpp               
@@ -954,6 +954,15 @@ void World::LoadConfigSettings(bool reload)               
                      
                     m_configs[CONFIG_THREAT_RADIUS] = sConfig.GetIntDefault("ThreatRadius", 100);               
                      
+     /* PvP Token System */               
+    m_configs[CONFIG_PVP_TOKEN_ENABLE] = sConfig.GetBoolDefault("PvPToken.Enable", true);               
+    m_configs[CONFIG_PVP_TOKEN_ITEMID] = sConfig.GetIntDefault("PvPToken.ItemID", 29434);               
+    m_configs[CONFIG_PVP_TOKEN_ITEMCOUNT] = sConfig.GetIntDefault("PvPToken.ItemCount", 1);               
+    m_configs[CONFIG_PVP_TOKEN_RESTRICTION] = sConfig.GetIntDefault("PvPToken.MapRestriction", 4);               
+               
+    if(m_configs[CONFIG_PVP_TOKEN_ITEMCOUNT] <= 0)               
+        m_configs[CONFIG_PVP_TOKEN_ENABLE] = 0;               
+               
                     // always use declined names in the russian client               
                     m_configs[CONFIG_DECLINED_NAMES_USED] =               
                         (m_configs[CONFIG_REALM_ZONE] == REALM_ZONE_RUSSIAN) ? true : sConfig.GetBoolDefault("DeclinedNames", false);               
diff --git a/src/game/World.h b/src/game/World.h               
index 977a440..f67cd72 100644               
--- a/src/game/World.h               
+++ b/src/game/World.h               
@@ -199,6 +199,10 @@ enum WorldConfigs               
                     CONFIG_LISTEN_RANGE_SAY,               
                     CONFIG_LISTEN_RANGE_TEXTEMOTE,               
                     C     O NFIG_L ISTEN_ RANGE_ YELL,               
+     C ONF IG_PVP_TOKEN_E NABLE,               
+    CONFIG_PVP_TOKEN_ITEMID,               
+    CONFIG_PVP_TOKEN_ITEMCOUNT,               
+    CONFIG_PVP_TOKEN_RESTRI C TION,               
                     CONFIG_SKILL_MILLING,               
                     CONFIG_BATTLEGROUND_CAST_DESERTER,               
                     C    O NFIG_B ATTLEG ROUND_ QUEUE_ ANNOUN CER_EN ABLE,               
- -                 
1.6.3 .3


 
AndrqhaДата: Понедельник, 08.08.2011, 20:41 | Сообщение # 2
Генерал-майор
Группа: Модераторы
Сообщений: 288
Награды: 2
Репутация: 1
Статус:
*Патч на команду .server info*
Описание: Убираем версии ядра/базы/скриптов, оставляем статистику: Аптайм/Онлайн/
Внимание! Также можно модифицировать под себя, читаем 2 пост от Rescript
Code
--- a/src/game/Level0.cpp    Sat Dec 26 05:42:54 2009               
+++ b/src/game/Level0.cpp    Sat Dec 26 05:46:24 2009               
@@ -91,16 +91,6 @@               
                    uint32 maxQueuedClientsNum = sWorld.GetMaxQueuedSessionCount();               
                    std::string str = secsToTimeString(sWorld.GetUptime());               
                    
-    char const* full;               
-    if(m_session)               
-        full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r");               
-    else               
-        full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID);               
-               
-    SendSysMessage(full);               
-    PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion());               
-    PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion());               
-    PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion());               
                    PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);               
                    PSendSysMessage(LANG_UPTIME, str.c_str());


*История арены*
Описание: После каждого рейтингового матча в базу записывается информация о том:
- кто выйграл (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)

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;




 
  • Страница 1 из 1
  • 1
Поиск:

Unread posts Есть новые сообщения    No unread posts Нету новых сообщений    No unread posts [ Locked ] Закрытый форум