Данный мод позволяет менять фракцию персонажей в определённой области.
Это очень удобно, когда необходимо отвести некую местность, где орда и альянс не смогли бы друг друга бить.
Автор (вероятно): evilstar
Пример для реализации дружеской (фракция 35) области "Гарадар" (Награнд).
Code
INSERT INTO `area_faction` (`area_id`,`faction_id`) VALUES ('3613','35','Garadar Set Faction 35');
Для того, чтобы узнать id области, необходимо ввести команду .gps.
Патч не тестировался, но по слухам работает.
Патчим ручками.
Сам патч:
Code
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f8c56e4..3f0fd06 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -20317,6 +20317,22 @@ void Player::UpdateAreaDependentAuras( uint32 newArea )
if(itr->second->autocast && itr->second->IsFitToRequirements(this,m_zoneUpdateId,newArea))
if (!HasAura(itr->second->spellId, EFFECT_INDEX_0))
CastSpell(this,itr->second->spellId,true);
+
+ uint32 newarea = GetAreaId();
+
+ QueryResult *result = WorldDatabase.PQuery("SELECT `area_id`,`faction_id` FROM `area_faction`");
+ if(result)
+ {
+ bool status = false;
+ do
+ {
+ Field *fields = result->Fetch();
+ if(newArea == fields[0].GetUInt32())
+ {
+ setFaction(fields[1].GetUInt32());
+ status = true;
+ }
+ }
+ while(result->NextRow());
+ if(!status)
+ setFactionForRace(getRace());
+ delete result;
+ }
}
uint32 Player::GetCorpseReclaimDelay(bool pvp) const
SQL к нему (заливать в mangos)
Code
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `area_faction`;
CREATE TABLE `area_faction` (
`area_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`faction_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`comment` varchar(255) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`area_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;