Jump to content

Recommended Posts

Posted

Here's the thread where it was submitted to the under review section: [patch] Race/Faction change

It was buried way back on page 5, which isn't very encouraging. A lot of good, promising patches in the under review section seem to be dying off.

DJNefast hasn't worked on this patch for quite a while and this topic here in Core Mods actually has more recent data.

  • 40 years later...
Posted

Hello guys

Race / Faction change will arrive for all (Mangos can support it and i'll be happy if Vladimiar validate it :) )

Writted by : Me (Ner'zhul)

Simply support, need database support for more proper and portable code to transfert items, achievements, spells for example.

Cleanup repo for you.

(I implement conversion by database since next hours)

http://github.com/nerzhul/MangosOpenDev/tree/RaceFacChange

Patch file :

http://paste2.org/p/822971

Changelog

rev 1 : Adding basic core support

rev 2 : Adding GM commands

rev 3 : Added based SQL

rev 4 : Achievements are now converted by database entries

rev 5 : item and spells are now converted by database entries

rev 6 : Reputations are now converted

rev 7 : More cleanups & Begin + Commit transaction

rev 8 : All is now handled :) End of the line, for database entries wait a moment :)

rev 9 : Oops forget to reset flypaths :)

rev 10 : Typo fix, thanks to selector

Posted

diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index e44610a..7a7dabc 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -1254,7 +1254,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
            CharacterDatabase.PExecute("INSERT INTO `character_homebind` VALUES
('%u','1', '1637', '1633.33', '-4439.11', '15.7588'",GUID_LOPART(guid));

        // Achievement conversion
-        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_changefaction_achievements"))
+        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_factionchange_achievements"))
        {
            do
            {
@@ -1268,7 +1268,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
        }

        // Item conversion
-        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_changefaction_items"))
+        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_factionchange_items"))
        {
            do
            {
@@ -1285,7 +1285,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
        }

        // Spell conversion
-        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_changefaction_spells"))
+        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_factionchange_spells"))
        {
            do
            {
@@ -1299,7 +1299,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
        }

        // Reputation conversion
-        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_changefaction_spells"))
+        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_factionchange_reputations"))
        {
            do
            {

Fixes.

Posted

http://www.wow-europe.com/en/info/faction-change/index.xml

you ned to read this(about reputation change).

convert Human to Undead:

Darnassus <-> Orgrimmar

Exodar <-> Silvermoon City

Gnomeregan Exiles <-> Thunder Bluff

Ironforge <-> Darkspear Trolls

Stormwind <-> Undercity

And human to Troll:

Darnassus <-> Undercity

Exodar <-> Silvermoon City

Gnomeregan Exiles <-> Thunder Bluff

Ironforge <-> Orgrimmar

Stormwind <--> Darkspear Trolls

Posted

No,flyght paths should be changed:

Flight Paths

The number of flight points that a character has unlocked is set to certain thresholds based on the character's level, in 10-level increments. For example, a level 70 character may have all Azeroth and Outland flight points unlocked, but none in Northrend.

Posted

diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index 7a7dabc..c763a7b 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -1249,9 +1249,9 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
        // Reset homebind
        CharacterDatabase.PExecute("DELETE FROM `character_homebind` WHERE guid = '%u'",GUID_LOPART(guid));
        if(team == BG_TEAM_ALLIANCE)
-            CharacterDatabase.PExecute("INSERT INTO `character_homebind` VALUES
('%u','0', '1519', '-8867.68', '673.373', '97.9034'",GUID_LOPART(guid));
+            CharacterDatabase.PExecute("INSERT INTO `character_homebind` VALUES
('%u','0','1519','-8867.68','673.373','97.9034')",GUID_LOPART(guid));
        else
-            CharacterDatabase.PExecute("INSERT INTO `character_homebind` VALUES
('%u','1', '1637', '1633.33', '-4439.11', '15.7588'",GUID_LOPART(guid));
+            CharacterDatabase.PExecute("INSERT INTO `character_homebind` VALUES
('%u','1','1637','1633.33','-4439.11','15.7588')",GUID_LOPART(guid));

        // Achievement conversion
        if(QueryResult *result2 = WorldDatabase.Query("SELECT alliance_id, horde_id FROM player_factionchange_achievements"))

Several Typo fixes :D

Posted

Two fixes:

-CharacterDatabase.PExecute("UPDATE `character_achievements` set achievement = '%u' where achievement = '%u' AND guid = '%u'",
+CharacterDatabase.PExecute("UPDATE `character_achievement` set achievement = '%u' where achievement = '%u' AND guid = '%u'",

-CharacterDatabase.PExecute("UPDATE `item_instance` SET `data`=CONCAT(CAST(SUBSTRING_INDEX(`data`, ' ', 3) AS CHAR), ' ', '%u', ' ',    CAST(SUBSTRING_INDEX(`data`, ' ', (3-64))AS CHAR)) WHERE CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 4), ' ', '-1') AS UNSIGNED) = '%u' AND ownerguid = '%u'",
+CharacterDatabase.PExecute("UPDATE `item_instance` SET `data`=CONCAT(CAST(SUBSTRING_INDEX(`data`, ' ', 3) AS CHAR), ' ', '%u', ' ',    CAST(SUBSTRING_INDEX(`data`, ' ', (3-64))AS CHAR)) WHERE CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 4), ' ', '-1') AS UNSIGNED) = '%u' AND owner_guid = '%u'",

Thank you

Posted

First test.

changerace works like charm. All is perfect

changefaction with updated Warlord123's data works good, but need to add quests table and remake rep. table. And ofc to add more id's.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use