mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-07 21:03:35 +00:00
Merge pull request #802 from noudess/master
New min/max personal faction per faction. Use of actual client mods for race/class/deity
This commit is contained in:
16 files changed
+601
-25
No files matched your search
@@ -1,6 +1,96 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
|
||||
== 3/1/2019 ==
|
||||
Noudess: Major faction conversion to use client data.
|
||||
|
||||
Pull request #802 New min/max personal faction per faction. Use of actual
|
||||
client mods for race/class/deity.
|
||||
|
||||
This PR involves major changes to your database and your quests.
|
||||
|
||||
The clients recently exposed raw data included
|
||||
|
||||
- the min/max personal faction for each faction
|
||||
- the actual faction id the client uses for each faction
|
||||
- the actual mods that come into play when a PC cons an opponent that
|
||||
determine your overall con to that faction.
|
||||
|
||||
|
||||
The approach I took resulted in minimal change to the code base. I did
|
||||
alter the code to enforce the new validated min/max from the client. This
|
||||
min/max applies to personally earned faction. So if a faction has a min
|
||||
of 0 and a max of 2000, that means your personally earned value can never
|
||||
go below 0 or over 2000. The actual con, will, however often do so because
|
||||
of class/race/deity modifications. I also changed the con ranges, per
|
||||
Mackal's data that was proven to be accurate:
|
||||
|
||||
Ally = 1100+
|
||||
Warmly = 750 to 1099
|
||||
Kindly = 500 to 749
|
||||
Amiable = 100 to 499
|
||||
Indifferent = 0 to 99
|
||||
Apprehensive = -1 to -100
|
||||
Dubious = -101 to -500
|
||||
Threateningly = -501 to -750
|
||||
Ready to Attack = -751
|
||||
|
||||
The above means that dubious is a much smaller range now. For that reason
|
||||
the scripts modify any custom faction base values to put them in the same
|
||||
range, hopefully as the creators of the custom factions intended.
|
||||
|
||||
Also to be noted as characters that have a faction between -501 and -700
|
||||
wont be dubious anymore, they will be threateningly. This is expected with
|
||||
the new ranges, but might take players by suprise as the old ranges we used
|
||||
were more liberal but were incorrect.
|
||||
|
||||
The database is changed extensively, but really only content. We're
|
||||
translating faction_list to use the clients ids. As such every place a
|
||||
faction_is is used, namely (see below) are being converted.
|
||||
|
||||
- faction_list
|
||||
- faction_list_mod
|
||||
- npc_faction (primary_faction field only)
|
||||
- npc_faction_entries (faction_id field only)
|
||||
- faction_values
|
||||
|
||||
Quests will also automatically be adjusted. This MUST be done after the
|
||||
PR sql and before starting the server. This is automated by
|
||||
eqemu_server.pl (or starting world)
|
||||
|
||||
Be assured, custom factions that you may have created, or obsolete or
|
||||
duplicate factions in our original faction_list, that you may have used,
|
||||
will be preserved. Anything that does not map directly is being moved to
|
||||
the 5000 range in faction_list and any references are corrected to point
|
||||
there.
|
||||
|
||||
A great example of this is Ebon Mask and Hall of the Ebon Mask. Many peqdb
|
||||
style servers have both of these. Some have used one, some the other. We
|
||||
map Ebon Mask to the clients Ebon mask and the Hall of the Ebon Mask gets
|
||||
moved to the 5000 range, and all its references are preserved. However,
|
||||
if you would like to make proper use of client mobs to Ebon mask, or other
|
||||
factions that have duplicitous entries, I recommend you manually move to
|
||||
using the correct one. In that way all of the new raw data mapped in from
|
||||
the client into faction_list_mod will get used instead of what your db had
|
||||
before these values were known.
|
||||
|
||||
In my experience converting 4 different server's data, there are only
|
||||
about 20 factions moved into the 5000 range.
|
||||
|
||||
This PR has only 1 new, permanent table faction_base_data, which is taken
|
||||
right from the client. The base field is left in case you want to mod your
|
||||
server, but we are very sure that the client doesn't use a base. It uses
|
||||
global mods to race or class for this as you'll see in the
|
||||
new faction_list_mod.
|
||||
|
||||
The PR makes many backup tables, and two mapping tables that are used during
|
||||
the conversion process to fix quests. This table was hand created by
|
||||
analysis. This table serves no purpose after conversion except an audit
|
||||
trail if we see any issues.
|
||||
|
||||
I will release a new PR that will clean up all these backups and temporary
|
||||
tables in about a month.
|
||||
|
||||
== 2/7/2019 ==
|
||||
Uleat: Put merc and bot classes on the same stance standard (mercs)
|
||||
- Both classes will now use the same stance standard
|
||||
|
||||
+8
-8
@@ -59,31 +59,31 @@ FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
|
||||
if (fm) {
|
||||
character_value += fm->base + fm->class_mod + fm->race_mod + fm->deity_mod;
|
||||
}
|
||||
if (character_value >= 1101) {
|
||||
if (character_value >= 1100) {
|
||||
return FACTION_ALLY;
|
||||
}
|
||||
if (character_value >= 701 && character_value <= 1100) {
|
||||
if (character_value >= 750 && character_value <= 1099) {
|
||||
return FACTION_WARMLY;
|
||||
}
|
||||
if (character_value >= 401 && character_value <= 700) {
|
||||
if (character_value >= 500 && character_value <= 749) {
|
||||
return FACTION_KINDLY;
|
||||
}
|
||||
if (character_value >= 101 && character_value <= 400) {
|
||||
if (character_value >= 100 && character_value <= 499) {
|
||||
return FACTION_AMIABLE;
|
||||
}
|
||||
if (character_value >= 0 && character_value <= 100) {
|
||||
if (character_value >= 0 && character_value <= 99) {
|
||||
return FACTION_INDIFFERENT;
|
||||
}
|
||||
if (character_value >= -100 && character_value <= -1) {
|
||||
return FACTION_APPREHENSIVE;
|
||||
}
|
||||
if (character_value >= -700 && character_value <= -101) {
|
||||
if (character_value >= -500 && character_value <= -101) {
|
||||
return FACTION_DUBIOUS;
|
||||
}
|
||||
if (character_value >= -999 && character_value <= -701) {
|
||||
if (character_value >= -750 && character_value <= -501) {
|
||||
return FACTION_THREATENLY;
|
||||
}
|
||||
if (character_value <= -1000) {
|
||||
if (character_value <= -751) {
|
||||
return FACTION_SCOWLS;
|
||||
}
|
||||
return FACTION_INDIFFERENT;
|
||||
|
||||
Regular → Executable
+4
@@ -50,6 +50,8 @@ struct NPCFactionList {
|
||||
struct FactionMods
|
||||
{
|
||||
int32 base;
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int32 class_mod;
|
||||
int32 race_mod;
|
||||
int32 deity_mod;
|
||||
@@ -59,6 +61,8 @@ struct Faction {
|
||||
int32 id;
|
||||
std::map<std::string, int16> mods;
|
||||
int16 base;
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments.
|
||||
char name[50];
|
||||
};
|
||||
|
||||
|
||||
+3
-1
@@ -30,7 +30,9 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9136
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9138
|
||||
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9022
|
||||
#else
|
||||
|
||||
@@ -787,6 +787,7 @@ sub show_menu_prompt {
|
||||
elsif ($input eq "conversions") {
|
||||
print "\n>>> Conversions Menu\n\n";
|
||||
print " [quest_heading_convert] Converts old heading format in quest scripts to new (live format)\n";
|
||||
print " [quest_faction_convert] Converts to new faction values imported from client\n";
|
||||
print " \n> main - go back to main menu\n";
|
||||
print "Enter a command #> ";
|
||||
$last_menu = trim($input);
|
||||
@@ -905,6 +906,10 @@ sub show_menu_prompt {
|
||||
quest_heading_convert();
|
||||
$dc = 1;
|
||||
}
|
||||
elsif ($input eq "quest_faction_convert") {
|
||||
quest_faction_convert();
|
||||
$dc = 1;
|
||||
}
|
||||
elsif ($input eq "source_peq_db") {
|
||||
fetch_peq_db_full();
|
||||
$dc = 1;
|
||||
@@ -2209,6 +2214,10 @@ sub run_database_check {
|
||||
if ($bots_db_management == 1 && $val == 9000) {
|
||||
modify_db_for_bots();
|
||||
}
|
||||
|
||||
if ($val == 9138) {
|
||||
fix_quest_factions();
|
||||
}
|
||||
}
|
||||
$db_run_stage = 2;
|
||||
}
|
||||
@@ -2493,3 +2502,127 @@ sub quest_heading_convert {
|
||||
|
||||
print "Total matches: " . $total_matches . "\n";
|
||||
}
|
||||
|
||||
|
||||
sub quest_faction_convert {
|
||||
|
||||
if(trim(get_mysql_result("SELECT value FROM variables WHERE varname = 'new_faction_conversion'")) eq "true") {
|
||||
print "Conversion script has already ran... doing this again would skew proper faction values in function calls...\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
%matches = (
|
||||
0 => [ "GetCharacterFactionLevel", 0],
|
||||
1 => [ "GetModCharacterFactionLevel", 0],
|
||||
2 => [ "SetFactionLevel2", 1],
|
||||
3 => [ "GetFactionLevel", 5 ],
|
||||
4 => [ "CheckNPCFactionAlly", 0 ],
|
||||
5 => [ ":Faction", 0 ],
|
||||
);
|
||||
|
||||
$total_matches = 0;
|
||||
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
|
||||
my @files;
|
||||
my $start_dir = "quests/.";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
|
||||
#::: Skip non script files
|
||||
if ($file !~ /lua|pl/i) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($file =~ /lua|pl/i) {
|
||||
$print_buffer = "";
|
||||
$changes_made = 0;
|
||||
|
||||
#::: Open and read line by line
|
||||
open(FILE, $file);
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
$line = $_;
|
||||
|
||||
#::: Loop through matches
|
||||
foreach my $key (sort (keys %matches)) {
|
||||
$argument_position = $matches{$key}[1];
|
||||
$match = $matches{$key}[0];
|
||||
|
||||
if ($line =~ /$match\(/i || $line =~ /$match \(/i) {
|
||||
$line_temp = $line;
|
||||
$line_temp =~ s/^.*$match\(//gi;
|
||||
$line_temp =~ s/^.*$match \(//gi;
|
||||
$line_temp =~ s/"//g;
|
||||
$line_temp =~ s/\);.*//;
|
||||
|
||||
@line_data = split(",", $line_temp);
|
||||
|
||||
$faction_value = $line_data[$argument_position];
|
||||
$faction_value_clean = trim($faction_value);
|
||||
|
||||
if (looks_like_number($faction_value_clean)) {
|
||||
$new_faction = get_mysql_result("select clientid from client_server_faction_map where serverid = $faction_value_clean");
|
||||
chomp $new_faction;
|
||||
if ($new_faction == 0) {
|
||||
$new_faction = get_mysql_result("select new_faction from custom_faction_mappings where old_faction = $faction_value_clean");
|
||||
chomp $new_faction;
|
||||
}
|
||||
if ($new_faction > 0) {
|
||||
print "BEFORE: " . $line . "\n";
|
||||
$line =~ s/$faction_value_clean/$new_faction/g;
|
||||
print "AFTER: " . $line . "\n";
|
||||
$changes_made = 1;
|
||||
}
|
||||
else {
|
||||
print "Unknown Faction: '$match' FACTION VALUE: '" . $faction_value_clean . "'\n";
|
||||
}
|
||||
}
|
||||
|
||||
$total_matches++;
|
||||
}
|
||||
}
|
||||
|
||||
$print_buffer .= $line . "\n";
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
#::: Write changes
|
||||
if ($changes_made == 1) {
|
||||
open(NEW_FILE, '>', $file);
|
||||
print NEW_FILE $print_buffer;
|
||||
close NEW_FILE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#::: Mark conversion as ran
|
||||
print get_mysql_result("INSERT INTO `variables` (varname, value, information, ts) VALUES ('new_faction_conversion', 'true', 'Script ran against quests folder to convert new faction values', NOW())");
|
||||
|
||||
print "Total matches: " . $total_matches . "\n";
|
||||
}
|
||||
|
||||
sub fix_quest_factions {
|
||||
# Backup the quests
|
||||
mkdir('backups');
|
||||
my @files;
|
||||
my $start_dir = "quests/";
|
||||
find(
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
$destination_file = $file;
|
||||
my $date = strftime "%m-%d-%Y", localtime;
|
||||
$destination_file =~ s/quests/quests-$date/;
|
||||
print "Backing up :: " . $destination_file . "\n";
|
||||
# unlink($destination_file);
|
||||
copy_file($file, 'backups/' . $destination_file);
|
||||
}
|
||||
|
||||
# Fix the factions
|
||||
quest_faction_convert();
|
||||
}
|
||||
@@ -390,6 +390,8 @@
|
||||
9134|2019_01_04_update_global_base_scaling.sql|SELECT * FROM db_version WHERE version >= 9134|empty|
|
||||
9135|2019_01_10_multi_version_spawns.sql|SHOW COLUMNS FROM `spawn2` LIKE 'version'|contains|unsigned|
|
||||
9136|2019_02_04_profanity_command.sql|SHOW TABLES LIKE 'profanity_list'|empty|
|
||||
9137|2018_12_12_client_faction_tables.sql|SHOW TABLES LIKE 'faction_base_data'|empty|
|
||||
9138|2018_12_12_convert_to_client_functions.sql|SELECT `id` FROM `faction_list` WHERE `id` > 4999|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Fix any items with faction adjustments */
|
||||
|
||||
SET SQL_MODE='ALLOW_INVALID_DATES'; /* Some dbs have bad dates which prevents the index creation */
|
||||
|
||||
CREATE INDEX itemfac1 ON items (factionmod1);
|
||||
CREATE INDEX itemfac2 ON items (factionmod2);
|
||||
CREATE INDEX itemfac3 ON items (factionmod3);
|
||||
CREATE INDEX itemfac4 ON items (factionmod4);
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN custom_faction_mappings m ON i.factionmod1 = m.old_faction
|
||||
SET i.factionmod1 = m.new_faction
|
||||
WHERE i.factionmod1 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN custom_faction_mappings m ON i.factionmod2 = m.old_faction
|
||||
SET i.factionmod2 = m.new_faction
|
||||
WHERE i.factionmod2 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN custom_faction_mappings m ON i.factionmod3 = m.old_faction
|
||||
SET i.factionmod3 = m.new_faction
|
||||
WHERE i.factionmod3 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN custom_faction_mappings m ON i.factionmod4 = m.old_faction
|
||||
SET i.factionmod4 = m.new_faction
|
||||
WHERE i.factionmod4 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN client_server_faction_map m ON i.factionmod1 = m.serverid
|
||||
SET i.factionmod1 = m.clientid
|
||||
WHERE i.factionmod1 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN client_server_faction_map m ON i.factionmod2 = m.serverid
|
||||
SET i.factionmod2 = m.clientid
|
||||
WHERE i.factionmod2 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN client_server_faction_map m ON i.factionmod3 = m.serverid
|
||||
SET i.factionmod3 = m.clientid
|
||||
WHERE i.factionmod3 > 0;
|
||||
|
||||
UPDATE items i
|
||||
INNER JOIN client_server_faction_map m ON i.factionmod4 = m.serverid
|
||||
SET i.factionmod4 = m.clientid
|
||||
WHERE i.factionmod4 > 0;
|
||||
|
||||
DROP INDEX itemfac1 ON items;
|
||||
DROP INDEX itemfac2 ON items;
|
||||
DROP INDEX itemfac3 ON items;
|
||||
DROP INDEX itemfac4 ON items;
|
||||
@@ -0,0 +1,82 @@
|
||||
--
|
||||
-- Table structure for table `client_faction_associations`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_faction_associations`;
|
||||
|
||||
CREATE TABLE `client_faction_associations` (
|
||||
`faction_id` int(11) NOT NULL,
|
||||
`other_faction_id` int(11) NOT NULL,
|
||||
`mod` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`faction_id`,`other_faction_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `client_faction_associations`
|
||||
--
|
||||
|
||||
LOCK TABLES `client_faction_associations` WRITE;
|
||||
INSERT INTO `client_faction_associations` VALUES (65,51,-600),(65,52,-600),(65,53,-600),(65,54,-600),(65,55,-600),(65,56,-700),(65,57,-600),(65,58,-600),(65,59,-750),(65,60,-750),(65,61,-600),(65,62,-600),(65,178,-1000),(65,180,-600),(65,661,-600),(65,1106,-600),(106,51,-50),(106,52,-50),(106,56,-500),(106,57,-50),(106,59,-750),(106,60,-750),(106,62,-50),(106,178,-750),(106,180,-50),(106,661,-50),(106,1106,-50),(121,9,-200),(121,56,-200),(121,59,-625),(121,60,-625),(121,178,-725),(217,51,-500),(217,52,-500),(217,53,-500),(217,54,-500),(217,55,-500),(217,56,-500),(217,57,-500),(217,58,-500),(217,59,-500),(217,60,-500),(217,61,-500),(217,62,-500),(217,180,-500),(217,203,-500),(217,661,-500),(217,1106,-500),(218,51,-1000),(218,52,-1000),(218,53,-1000),(218,54,-1000),(218,55,-1000),(218,56,-1000),(218,57,-1000),(218,58,-1000),(218,59,-1000),(218,60,-1000),(218,61,-1000),(218,62,-1000),(218,178,-1000),(218,180,-1000),(218,201,-1000),(218,202,-1000),(218,204,-1000),(218,205,-1000),(218,206,-1000),(218,207,-1000),(218,208,-1000),(218,209,-1000),(218,210,-1000),(218,211,-1000),(218,212,-1000),(218,213,-1000),(218,214,-1000),(218,215,-1000),(218,216,-1000),(218,661,-1000),(218,1106,-1000),(219,56,-200),(219,59,-375),(219,60,-375),(219,178,-375),(220,5,-200),(220,11,-200),(220,12,50),(220,13,50),(220,14,50),(220,51,50),(220,52,-50),(220,54,-50),(220,56,-300),(220,57,50),(220,58,-150),(220,59,-750),(220,60,-750),(220,61,-50),(220,178,-1000),(220,180,-50),(220,201,-200),(220,202,-50),(220,203,-300),(220,205,-50),(220,206,-200),(220,211,-300),(220,213,25),(220,216,-300),(220,661,50),(220,1106,50),(221,3,-750),(221,4,-300),(221,5,50),(221,6,-200),(221,9,-25),(221,11,50),(221,51,50),(221,52,-300),(221,53,-25),(221,54,-300),(221,55,-300),(221,56,-50),(221,57,50),(221,58,-300),(221,59,-300),(221,60,-250),(221,61,-300),(221,62,-25),(221,178,-300),(221,180,-300),(221,201,100),(221,202,-750),(221,203,-15),(221,204,-750),(221,205,-750),(221,206,-15),(221,207,-750),(221,208,-750),(221,209,-750),(221,210,-750),(221,211,-750),(221,212,-750),(221,213,-750),(221,214,-750),(221,215,-750),(221,216,-750),(221,661,50),(221,1106,50),(222,51,-750),(222,52,-750),(222,53,-750),(222,54,-750),(222,55,-750),(222,56,-400),(222,57,-750),(222,58,-750),(222,59,50),(222,60,-200),(222,61,-750),(222,62,-750),(222,178,-750),(222,180,-750),(222,201,50),(222,203,50),(222,206,50),(222,661,-750),(222,1106,-750),(223,3,-100),(223,4,-100),(223,5,-50),(223,6,-100),(223,7,-100),(223,8,-25),(223,9,50),(223,10,-100),(223,11,-50),(223,12,-100),(223,13,-100),(223,14,-100),(223,15,-100),(223,51,50),(223,52,-25),(223,53,-75),(223,54,-50),(223,55,-300),(223,56,-50),(223,57,50),(223,58,-150),(223,59,-750),(223,60,-500),(223,61,-50),(223,62,-75),(223,178,-750),(223,180,-25),(223,202,-100),(223,203,-300),(223,204,-100),(223,205,50),(223,206,-200),(223,208,-100),(223,209,-100),(223,210,-100),(223,211,-100),(223,213,-100),(223,214,-200),(223,215,-100),(223,216,-200),(223,661,50),(223,1106,50),(225,51,-875),(225,52,-875),(225,53,-875),(225,54,-875),(225,55,-875),(225,56,-875),(225,57,-875),(225,58,-875),(225,59,-625),(225,60,-625),(225,61,-875),(225,62,-875),(225,178,-875),(225,180,-875),(225,661,-875),(225,1106,-875),(226,5,-200),(226,11,-200),(226,56,-50),(226,59,-100),(226,60,-100),(226,62,-10),(226,178,-200),(226,201,-200),(226,203,-200),(226,206,-200),(226,207,10),(226,215,100),(226,216,-100),(227,5,-200),(227,11,-200),(227,51,-10),(227,52,-10),(227,54,-10),(227,55,-10),(227,56,-100),(227,57,-10),(227,59,-100),(227,60,-100),(227,178,-200),(227,180,-10),(227,201,-200),(227,202,100),(227,203,-200),(227,205,10),(227,206,-200),(227,216,-200),(227,661,-10),(227,1106,-10),(228,51,-750),(228,52,-750),(228,54,-750),(228,55,-750),(228,56,-25),(228,57,-750),(228,59,-1000),(228,61,-750),(228,62,-750),(228,178,-1000),(228,180,-750),(228,661,-750),(228,1106,-750),(229,9,-200),(229,56,-200),(229,59,-375),(229,60,-375),(229,178,-375),(230,3,-100),(230,4,-100),(230,6,-100),(230,7,-100),(230,9,-10),(230,10,-100),(230,11,-50),(230,15,-100),(230,51,50),(230,52,-50),(230,53,-150),(230,54,-200),(230,55,-200),(230,56,-150),(230,58,-200),(230,59,-850),(230,60,-750),(230,61,-150),(230,62,-50),(230,178,-1000),(230,180,-50),(230,201,50),(230,202,-25),(230,203,-25),(230,204,-25),(230,205,-25),(230,207,-25),(230,208,-25),(230,209,-25),(230,210,-25),(230,211,-25),(230,212,-25),(230,213,-25),(230,214,-100),(230,215,-25),(230,661,50),(230,1106,50),(231,1,-50),(231,4,-50),(231,5,-200),(231,6,-50),(231,7,-50),(231,8,-50),(231,9,-50),(231,10,-50),(231,11,-200),(231,14,50),(231,15,-50),(231,16,-50),(231,51,-100),(231,52,-100),(231,53,50),(231,54,-100),(231,55,-50),(231,56,-300),(231,57,-100),(231,58,-150),(231,59,-750),(231,60,-750),(231,61,-100),(231,62,-100),(231,178,-750),(231,180,-100),(231,201,-200),(231,202,-100),(231,203,-300),(231,204,-50),(231,205,-100),(231,206,-200),(231,207,-50),(231,208,-50),(231,211,-300),(231,212,-50),(231,213,-50),(231,214,-50),(231,215,-50),(231,216,-300),(231,661,-1Line truncated
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_faction_names`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_faction_names`;
|
||||
CREATE TABLE `client_faction_names` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` varchar(45) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `client_faction_names`
|
||||
--
|
||||
|
||||
LOCK TABLES `client_faction_names` WRITE;
|
||||
INSERT INTO `client_faction_names` VALUES (0,'NoFaction'),(1,'Warrior'),(2,'Cleric'),(3,'Paladin'),(4,'Ranger'),(5,'ShadowKnight'),(6,'Druid'),(7,'Monk'),(8,'Bard'),(9,'Rogue'),(10,'Shaman'),(11,'Necromancer'),(12,'Wizard'),(13,'Magician'),(14,'Enchanter'),(15,'Beastlord'),(16,'Berserker'),(17,'GUILDMASTERWARRIOR'),(18,'GUILDMASTERCLERIC'),(19,'GUILDMASTERPALADIN'),(20,'GUILDMASTERRANGER'),(21,'GUILDMASTERSK'),(22,'GUILDMASTERDRUID'),(23,'GUILDMASTERMONK'),(24,'GUILDMASTERBARD'),(25,'GUILDMASTERROGUE'),(26,'GUILDMASTERSHAMAN'),(27,'GUILDMASTERNECRO'),(28,'GUILDMASTERWIZARD'),(29,'GUILDMASTERMAGICIAN'),(30,'GUILDMASTERENCHANTER'),(31,'Class31'),(32,'Merchant'),(33,'Class33'),(34,'Class34'),(35,'Class35'),(36,'Class36'),(37,'Class37'),(38,'Class38'),(39,'Class39'),(40,'Class40'),(41,'Class41'),(42,'Class42'),(43,'Class43'),(44,'Class44'),(45,'Class45'),(46,'Class46'),(47,'Class47'),(48,'Class48'),(49,'Class49'),(50,'Class50'),(51,'Human'),(52,'Barbarian'),(53,'Erudite'),(54,'Wood Elf'),(55,'High Elf'),(56,'Dark Elf'),(57,'Half Elf'),(58,'Dwarf'),(59,'Troll'),(60,'Ogre'),(61,'Halfling'),(62,'Gnome'),(63,'Aviak'),(64,'Werewolf'),(65,'Brownies of Faydwer'),(66,'Centaur'),(67,'Clay Golem'),(68,'Cyclops'),(69,'Trakanon (Race)'),(70,'Venril Sathir (Race)'),(71,'Evil Eye'),(72,'Fire Beetle'),(73,'Kerran (Race)'),(74,'Fish'),(75,'Fairy (Race)'),(76,'Froglok'),(77,'Froglok Ghoul'),(78,'Fungus Man'),(79,'Gargoyle'),(80,'Race Faction (80)'),(81,'Gelatinous Cube'),(82,'Ghost'),(83,'Ghoul'),(84,'Giant Bat'),(85,'Beta KOS Copy 9'),(86,'Giant Rat'),(87,'Giant Snake'),(88,'Giant Spider'),(89,'Gnoll'),(90,'Goblin'),(91,'Gorilla'),(92,'Wolf'),(93,'Bear'),(94,'Human Guard (Race)'),(95,'Demi Lich (Race)'),(96,'Imp'),(97,'Griffon'),(98,'Kobold'),(99,'Lava Dragon'),(100,'Lion'),(101,'Lizard Man'),(102,'Mimic'),(103,'Minotaur'),(104,'Orc'),(105,'Human Beggar'),(106,'Pixies of Faydwer'),(107,'Drachnid (Race)'),(108,'Solusek Ro (Race)'),(109,'Kunark Goblin (Race)'),(110,'Skeleton'),(111,'Shark (Race)'),(112,'Tunare (Race)'),(113,'Tiger'),(114,'Treant'),(115,'Vampire'),(116,'Rallos Zek (Race)'),(117,'High Hold Citizen'),(118,'Tentacle'),(119,'Will-O-Wisp'),(120,'Zombie'),(121,'Qeynos Citizens'),(122,'Ship'),(123,'Launch'),(124,'Piranha'),(125,'Elemental'),(126,'Puma'),(127,'Neriak Citizen'),(128,'Erudin Citizens'),(129,'Bixie'),(130,'Reanimated Hand'),(131,'Rivervale Guard'),(132,'Scarecrow'),(133,'Skunk'),(134,'Snake Elemental'),(135,'Spectre'),(136,'Sphinx'),(137,'Armadillo'),(138,'Clockworks of Ak`Anon'),(139,'Drake'),(140,'Halas Citizen'),(141,'Alligator'),(142,'Grobb Citizen'),(143,'Oggok Citizen'),(144,'Kaladim Citizens'),(145,'Cazic-Thule (Race)'),(146,'Cockatrice'),(147,'Diasy Men'),(148,'Elf Vampire'),(149,'Amygdalan'),(150,'Dervish'),(151,'Efreeti'),(152,'Froglok Tadpole'),(153,'Kedge'),(154,'Leech'),(155,'Sword Fish'),(156,'Fel Guard'),(157,'Mammoth'),(158,'Eye of Zomm'),(159,'Wasp'),(160,'Mermaid'),(161,'Harpie'),(162,'Fayguard'),(163,'Drixie'),(164,'Ghost Ship'),(165,'Clam'),(166,'Sea Horse'),(167,'Ghost Dwarf'),(168,'Erudite Ghost'),(169,'Saber-toothed Cat'),(170,'SpiritWolf'),(171,'Gorgon'),(172,'Dragon Skeleton'),(173,'Innoruuk (Race)'),(174,'Unicorn Nightmare'),(175,'Pegasus'),(176,'Djinn (Race)'),(177,'Invisible Man'),(178,'Iksar'),(179,'Scorpion'),(180,'Vah Shir'),(181,'Sarnak'),(182,'Draglok Invalid Race'),(183,'Lycanthrope'),(184,'Mosquito'),(185,'Rhino'),(186,'Xalgoz Race'),(187,'Kunark Goblin'),(188,'Yeti'),(189,'Iksar Citizen'),(190,'Forest Giant'),(191,'Boat'),(192,'Race Faction (192)'),(193,'Race Faction (193)'),(194,'Burynai'),(195,'Goo'),(196,'Spectral Sarnak'),(197,'Spectral Iksar'),(198,'Kunark Fish'),(199,'Iksar Scorpion'),(200,'Erollisi Marr (Race)'),(201,'Bertoxxulous'),(202,'Brell Serilis'),(203,'Cazic-Thule'),(204,'Erollisi Marr'),(205,'Fizzlethorp'),(206,'Innoruuk'),(207,'Karana'),(208,'Mithaniel Marr'),(209,'Prexus'),(210,'Quellious'),(211,'Rallos Zek'),(212,'Rodcet Nife'),(213,'Solusek Ro'),(214,'Tribunal'),(215,'Tunare'),(216,'Veeshan'),(217,'Allize Volew'),(218,'Allize Taeew'),(219,'Antonius Bayle'),(220,'Arcane Scientists'),(221,'Bloodsabers'),(222,'Broken Skull Clan'),(223,'Circle of Unseen Hands'),(224,'Clan Drippycan'),(225,'Clan Runnyeye'),(226,'Clerics of Tunare'),(227,'Clerics of Underfoot'),(228,'Clurg'),(229,'Coalition of Tradefolk'),(230,'Corrupt Qeynos Guards'),(231,'Craftkeepers'),(232,'Craknek Warriors'),(233,'Crimson Hands'),(234,'Crushbone Orcs'),(235,'DaBashers'),(236,'Dark Bargainers'),(237,'Dark Ones'),(238,'Dark Reflection'),(239,'The Dead'),(240,'Deepmuses'),(241,'Deeppockets'),(242,'Deepwater Knights'),(243,'Drafling'),(244,'Ebon Mask'),(245,'Eldritch Collective'),(246,'Faydarks Champions'),(247,'Horde of Xalgoz'),(248,'Inhabitants of Firiona Vie'),(249,'Nagafen'),(250,'The Kromdul'),(251,'Frogloks of Guk'),(252,'Frogloks of Kunark'),(253,'Burynai Legion'),(254,'Gate Callers'),(255,'Gem Choppers'),(256,'Bloodgills'),(257,'Goblins of Cleaving Tooth'),(258,'Goblins of Fire PeLine truncated
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_server_faction_map`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_server_faction_map`;
|
||||
CREATE TABLE `client_server_faction_map` (
|
||||
`clientid` int(11) NOT NULL,
|
||||
`serverid` int(11) NOT NULL,
|
||||
PRIMARY KEY (`clientid`,`serverid`),
|
||||
INDEX serverid (`serverid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `client_server_faction_map`
|
||||
--
|
||||
|
||||
LOCK TABLES `client_server_faction_map` WRITE;
|
||||
INSERT INTO `client_server_faction_map` VALUES (41,377),(51,506),(60,431),(63,14),(64,357),(65,26),(68,481),(71,94),(73,421),(78,111),(88,386),(90,118),(98,185),(101,200),(104,238),(112,113),(117,148),(119,462),(121,434),(125,374),(143,368),(144,162),(153,420),(156,100),(160,426),(178,371),(201,382),(205,414),(207,165),(209,255),(211,269),(216,351),(217,5),(218,4),(219,9),(220,11),(221,21),(222,22),(223,33),(225,41),(226,43),(227,44),(228,46),(229,47),(230,53),(231,56),(232,57),(233,60),(234,63),(235,66),(236,69),(237,70),(238,71),(239,322),(240,76),(241,77),(242,79),(244,90),(245,91),(246,99),(247,151),(248,418),(249,226),(250,327),(251,106),(252,108),(253,28),(254,112),(255,115),(256,20),(257,119),(258,120),(259,121),(261,128),(262,135),(263,133),(264,359),(265,143),(266,145),(267,147),(268,50),(269,182),(270,155),(271,86),(272,159),(273,164),(274,169),(275,170),(276,174),(278,177),(279,178),(280,183),(281,184),(282,186),(283,243),(284,192),(285,207),(286,208),(287,209),(288,210),(289,211),(290,215),(291,217),(292,218),(293,219),(295,326),(296,235),(297,246),(298,247),(299,248),(300,259),(302,265),(303,268),(304,273),(305,275),(306,279),(307,281),(308,292),(309,300),(310,304),(311,311),(312,314),(313,250),(315,339),(316,283),(317,346),(318,353),(319,355),(320,361),(321,309),(322,220),(323,305),(324,347),(325,212),(326,92),(327,294),(328,213),(329,31),(330,105),(331,214),(332,149),(333,176),(334,88),(336,48),(337,232),(338,216),(340,256),(341,257),(342,240),(343,267),(344,18),(345,167),(346,51),(353,378),(354,229),(355,316),(361,12),(362,258),(363,331),(364,299),(365,249),(366,166),(367,507),(368,83),(370,87),(371,117),(372,227),(373,224),(374,233),(375,75),(376,131),(378,313),(379,29),(382,175),(385,80),(386,376),(387,17),(388,97),(394,295),(397,302),(398,274),(401,306),(402,236),(403,237),(404,342),(405,67),(406,49),(407,278),(409,343),(412,187),(415,320),(416,291),(417,397),(418,364),(419,188),(420,98),(423,456),(424,465),(425,156),(426,1),(427,308),(428,223),(429,179),(430,42),(431,345),(432,241),(433,160),(434,301),(435,352),(436,362),(437,391),(438,290),(439,303),(440,30),(441,193),(442,62),(443,24),(444,317),(445,282),(446,323),(447,251),(448,189),(449,344),(450,336),(451,23),(452,325),(454,89),(455,221),(456,114),(457,150),(458,116),(459,199),(460,399),(461,395),(462,32),(463,244),(464,365),(465,337),(467,134),(469,263),(471,40),(473,172),(474,310),(475,180),(532,461),(689,297),(692,253),(693,36),(694,380),(695,45),(1001,424),(1002,401),(1003,475),(1007,435),(1009,409),(1010,398),(1013,432),(1014,487),(1016,410),(1020,425),(1021,404),(1022,101),(1023,429),(1024,446),(1025,427),(1026,449),(1027,450),(1028,451),(1029,445),(1030,422),(1031,436),(1032,441),(1033,448),(1034,428),(1035,403),(1036,438),(1039,515),(1040,417),(1042,407),(1044,444),(1046,443),(1048,440),(1049,406),(1050,411),(1051,402),(1055,415),(1056,412),(1058,437),(1059,396),(1060,400),(1101,498),(1156,500),(1159,457),(1190,497),(1193,499),(1204,494),(1223,496),(1483,284),(1484,139),(1485,96),(1486,142),(1487,298),(1488,329),(1490,130),(1491,504),(1492,505),(1499,37),(1500,122),(1501,293),(1502,168),(1503,350),(1504,206),(1505,228),(1506,55),(1507,349),(1508,338),(1509,140),(1510,152),(1511,153),(1512,154),(1513,132),(1516,392),(1519,201),(1520,358),(1521,3),(1522,260),(1524,161),(1525,54),(1527,388),(1528,335),(1530,319),(1532,423),(1533,68),(1535,25),(1536,93),(1538,307),(1541,138),(1542,141),(1543,285),(1544,289),(1545,287),(1546,286),(1547,354),(1548,334),(1549,324),(1550,321),(1551,332),(1552,348),(1555,129),(1556,205),(1557,72),(1559,191),(1561,52),(1562,85),(1563,330),(1564,74),(1565,390),(1568,78),(1569,408),(1570,239),(1571,296),(1573,389),(1574,222),(1576,181),(1577,333),(1582,242),(1583,65),(1584,483),(1587,385),(1593,107),(1594,64),(1595,230),(1597,271),(1598,6),(1599,73),(1601,252),(1602,61),(1604,39),(1607,516),(1608,517),(1609,13),(1610,125),(1611,124),(1612,127),(1613,126),(1614,196),(1615,195),(1616,198),(1617,197),(1618,315),(1619,328),(1620,340),(1621,2),(1622,10),(1623,84),(1624,288),(1627,261),(1628,58),(1629,123),(1630,27),(1634,512),(1636,157),(1654,466),(1656,16),(1659,203),(1660,501),(1661,464),(1665,109),(1701,473),(1703,225),(1707,458),(1709,264),(1713,245),(1714,360),(1716,146),(1717,202),(1718,136),(1719,35),(1720,484),(1722,95),(1725,318),(1726,469),(1728,19),(1729,103),(1732,341),(1733,393),(1734,104),(1735,158),(1736,110),(1737,204),(1738,455),(1741,452),(1742,453),(1743,454),(1744,262),(1745,277),(1749,312),(1750,38),(1755,280),(1757,508),(1759,356),(1761,231),(1762,447),(1763,194),(1765,502),(1766,254),(1767,144),(1768,270),(1769,59),(1770,363),(1771,416),(1822,373);
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `faction_base_data`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `faction_base_data`;
|
||||
CREATE TABLE `faction_base_data` (
|
||||
`client_faction_id` smallint(6) NOT NULL,
|
||||
`min` smallint(6) DEFAULT '-2000',
|
||||
`max` smallint(6) DEFAULT '2000',
|
||||
`unk_hero1` smallint(6) DEFAULT NULL,
|
||||
`unk_hero2` smallint(6) DEFAULT NULL,
|
||||
`unk_hero3` smallint(6) DEFAULT NULL,
|
||||
PRIMARY KEY (`client_faction_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `faction_base_data`
|
||||
--
|
||||
|
||||
LOCK TABLES `faction_base_data` WRITE;
|
||||
INSERT INTO `faction_base_data` VALUES (65,-2000,2000,0,0,0),(106,-2000,2000,0,0,0),(121,-2000,2000,0,0,0),(128,-2000,2000,0,0,0),(138,-2000,2000,0,0,0),(144,-2000,2000,0,0,0),(217,-2000,2000,0,0,0),(218,-2000,2000,0,0,0),(219,-2000,2000,0,0,0),(220,-2000,2000,0,0,0),(221,-2000,2000,0,0,0),(222,-2000,2000,0,0,0),(223,-2000,2000,0,0,0),(225,-2000,2000,0,0,0),(226,-2000,2000,0,0,0),(227,-2000,2000,0,0,0),(228,-2000,2000,0,0,0),(229,-2000,2000,0,0,0),(230,-2000,2000,0,0,0),(231,-2000,2000,0,0,0),(232,-2000,2000,0,0,0),(233,-2000,2000,0,0,0),(234,-2000,2000,0,0,0),(235,-2000,2000,0,0,0),(236,-2000,2000,0,0,0),(237,-2000,2000,0,0,0),(238,-2000,2000,0,0,0),(239,-2000,2000,0,0,0),(240,-2000,2000,0,0,0),(241,-2000,2000,0,0,0),(242,-2000,2000,0,0,0),(243,-2000,2000,0,0,0),(244,-2000,2000,0,0,0),(245,-2000,2000,0,0,0),(246,-2000,2000,0,0,0),(247,-2000,2000,0,0,0),(248,-2000,2000,0,0,0),(249,-2000,2000,0,0,0),(250,-2000,2000,0,0,0),(251,-2000,2000,0,0,0),(252,-2000,2000,0,0,0),(253,-2000,2000,0,0,0),(254,-2000,2000,0,0,0),(255,-2000,2000,0,0,0),(256,-2000,2000,0,0,0),(257,-2000,2000,0,0,0),(258,-2000,2000,0,0,0),(259,-2000,2000,0,0,0),(261,-2000,2000,0,0,0),(262,-2000,2000,0,0,0),(263,-2000,2000,0,0,0),(264,-2000,2000,0,0,0),(265,-2000,2000,0,0,0),(266,-2000,2000,0,0,0),(267,-2000,2000,0,0,0),(269,-2000,2000,0,0,0),(270,-2000,2000,0,0,0),(271,-2000,2000,0,0,0),(272,-2000,2000,0,0,0),(273,-2000,2000,0,0,0),(274,-2000,2000,0,0,0),(275,-2000,2000,0,0,0),(276,-2000,2000,0,0,0),(277,-2000,2000,0,0,0),(278,-2000,2000,0,0,0),(279,-2000,2000,0,0,0),(280,-2000,2000,0,0,0),(281,-2000,2000,0,0,0),(282,-2000,2000,0,0,0),(283,-2000,2000,0,0,0),(284,-2000,2000,0,0,0),(285,-2000,2000,0,0,0),(286,-2000,2000,0,0,0),(287,-2000,2000,0,0,0),(288,-2000,2000,0,0,0),(289,-2000,2000,0,0,0),(290,-2000,2000,0,0,0),(291,-2000,2000,0,0,0),(292,-2000,2000,0,0,0),(293,-2000,2000,0,0,0),(295,-2000,2000,0,0,0),(296,-2000,2000,0,0,0),(297,-2000,2000,0,0,0),(298,-2000,2000,0,0,0),(299,-2000,2000,0,0,0),(300,-2000,2000,0,0,0),(302,-2000,2000,0,0,0),(304,-2000,2000,0,0,0),(305,-2000,2000,0,0,0),(306,-2000,2000,0,0,0),(307,-2000,2000,0,0,0),(308,-2000,2000,0,0,0),(309,-2000,2000,0,0,0),(310,-2000,2000,0,0,0),(311,-2000,2000,0,0,0),(312,-2000,2000,0,0,0),(313,-2000,2000,0,0,0),(315,-2000,2000,0,0,0),(316,-2000,2000,0,0,0),(317,-2000,2000,0,0,0),(318,-2000,2000,0,0,0),(319,-2000,2000,0,0,0),(320,-2000,2000,0,0,0),(321,-2000,2000,0,0,0),(322,-2000,2000,0,0,0),(323,-2000,2000,0,0,0),(324,-2000,2000,0,0,0),(325,-2000,2000,0,0,0),(326,-2000,2000,0,0,0),(327,-2000,2000,0,0,0),(328,-2000,2000,0,0,0),(329,-2000,2000,0,0,0),(330,-2000,2000,0,0,0),(331,-2000,2000,0,0,0),(332,-2000,2000,0,0,0),(333,-2000,2000,0,0,0),(334,-2000,2000,0,0,0),(336,-2000,2000,0,0,0),(337,-2000,2000,0,0,0),(338,-2000,2000,0,0,0),(340,-2000,2000,0,0,0),(341,-2000,2000,0,0,0),(342,-2000,2000,0,0,0),(343,-2000,2000,0,0,0),(345,-2000,2000,0,0,0),(346,-2000,2000,0,0,0),(353,-2000,2000,0,0,0),(354,-2000,2000,0,0,0),(355,-2000,2000,0,0,0),(361,-2000,2000,0,0,0),(362,-2000,2000,0,0,0),(363,-2000,2000,0,0,0),(364,-2000,2000,0,0,0),(365,-2000,2000,0,0,0),(366,-2000,2000,0,0,0),(367,-2000,2000,0,0,0),(368,-2000,2000,0,0,0),(370,-2000,2000,0,0,0),(371,-2000,2000,0,0,0),(372,-2000,2000,0,0,0),(373,-2000,2000,0,0,0),(374,-2000,2000,0,0,0),(375,-2000,2000,0,0,0),(376,-2000,2000,0,0,0),(377,-2000,2000,0,0,0),(378,-2000,2000,0,0,0),(379,-2000,2000,0,0,0),(382,-2000,2000,0,0,0),(385,-2000,2000,0,0,0),(387,-2000,2000,0,0,0),(388,-2000,2000,0,0,0),(390,-2000,2000,0,0,0),(391,-2000,2000,0,0,0),(394,-2000,2000,0,0,0),(397,-2000,2000,0,0,0),(398,-2000,2000,0,0,0),(401,-2000,2000,0,0,0),(402,-2000,2000,0,0,0),(404,0,2000,0,0,0),(405,-2000,2000,0,0,0),(406,-2000,2000,0,0,0),(407,-2000,2000,0,0,0),(409,-2000,2000,0,0,0),(412,-2000,2000,0,0,0),(415,-2000,2000,0,0,0),(416,-2000,2000,0,0,0),(417,-2000,2000,0,0,0),(418,-2000,2000,0,0,0),(419,-2000,2000,0,0,0),(420,-2000,2000,0,0,0),(421,-2000,2000,0,0,0),(422,-2000,2000,0,0,0),(423,-2000,2000,0,0,0),(425,-2000,2000,0,0,0),(426,-2000,2000,0,0,0),(427,-2000,2000,0,0,0),(428,-2000,2000,0,0,0),(429,-2000,2000,0,0,0),(430,-2000,2000,0,0,0),(431,-2000,2000,0,0,0),(432,-2000,2000,0,0,0),(433,-2000,2000,0,0,0),(434,-2000,2000,0,0,0),(435,-2000,2000,0,0,0),(436,-2000,2000,0,0,0),(437,-2000,2000,0,0,0),(438,-2000,2000,0,0,0),(439,-2000,2000,0,0,0),(440,-2000,2000,0,0,0),(441,-2000,2000,0,0,0),(442,-2000,2000,0,0,0),(443,-2000,2000,0,0,0),(444,-2000,2000,0,0,0),(445,-2000,2000,0,0,0),(446,-2000,2000,0,0,0),(447,-2000,2000,0,0,0),(448,-2000,2000,0,0,0),(449,-2000,2000,0,0,0),(450,-2000,2000,0,0,0),(451,-2000,2000,0,0,0),(452,-2000,2000,0,0,0),(453,-2000,2000,0,0,0),(454,-2000,2000,0,0,0),(455,-2000,2000,0,0,0),(456,-2000,2000,0,0,0),(457,-2000,2000,0,0,0),(458,-2000,2000,0,0,0),(459,-2000,2000,0,0,0),(460,-2000,2000,0,0,0),(461,-2000,2000,0,0,0),(462,-2000,2000,0,0,0),(463,-2000,2000,0,0,0),(464,-2000,2000,0,0,0),(465,-2000,2000,0,0,0),(467,-2000,2000,0,0,0),(468,-2000,2000,0,0,Line truncated
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
This SQL update utilizes the new raw faction data from the client
|
||||
|
||||
First we create a temporary table - which we will use to map any
|
||||
custom factions in the eqemu db, that are either:
|
||||
- eqemu utility factions
|
||||
- obsoleted factions with no new mapping to the client
|
||||
|
||||
This is done so that we can keep these factions while server owners either
|
||||
stay with them, or migrate. They are moved to the 5000+ range, to not conflict
|
||||
with client faction_ids.
|
||||
*/
|
||||
|
||||
/* Create the temp table and start mappings at 5000 */
|
||||
CREATE TABLE custom_faction_mappings (old_faction int, new_faction int, primary key (old_faction)) engine=INNODB;
|
||||
|
||||
select "Moving custom factions to safe range, well above known client values" ``;
|
||||
select @startcustom:=5000;
|
||||
|
||||
/* Insert the custom/obsolete factions into the temp mapping table */
|
||||
insert into custom_faction_mappings (select id, @startcustom := @startcustom +1 from faction_list where id not in (select serverid from client_server_faction_map) and id < 5000);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS faction_list_mod_prefix AS SELECT * from faction_list_mod;
|
||||
|
||||
/* Now we update all the tables for these custom factions */
|
||||
|
||||
update faction_list_mod set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id) where faction_id < 5000 and faction_id in (select old_faction from custom_faction_mappings);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS faction_list_prefix AS SELECT * from faction_list;
|
||||
|
||||
DROP TABLE faction_list;
|
||||
|
||||
CREATE TABLE `faction_list` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` varchar(50) NOT NULL DEFAULT '',
|
||||
`base` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=486 DEFAULT CHARSET=utf8 as select id, name, base from faction_list_prefix;
|
||||
|
||||
update faction_list set id =
|
||||
(select new_faction from custom_faction_mappings where old_faction = id) where id < 5000 and id in (select old_faction from custom_faction_mappings);
|
||||
|
||||
/* At this point all faction_mods for unmapped factions will be ids 5000+ */
|
||||
/* So we can delete all the old ones still under 5000 - making room for the */
|
||||
/* new faction ids */
|
||||
|
||||
delete from faction_list_mod where faction_id < 5000;
|
||||
|
||||
delete from faction_list where id < 5000;
|
||||
|
||||
/* Make an entry for each faction */
|
||||
/* No base on client factions */
|
||||
|
||||
insert into faction_list (id, name, base) (select id, name, 0 from client_faction_names);
|
||||
|
||||
/* Now restore any base for factions for which the client has no mods (social factions) */
|
||||
|
||||
DROP TABLE IF EXISTS oldbases;
|
||||
|
||||
CREATE TABLE `oldbases` (
|
||||
`id` int(11) DEFAULT 0,
|
||||
`name` varchar(50) NOT NULL DEFAULT '',
|
||||
`base` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 as
|
||||
(select m.clientid as id, p.name, p.base from faction_list_prefix p
|
||||
join client_server_faction_map m on m.serverid = p.id where p.base <> 0
|
||||
&& m.clientid in (select id from faction_list where id not in (SELECT faction_id from client_faction_associations group by faction_id)));
|
||||
|
||||
update faction_list f
|
||||
INNER JOIN oldbases o on o.id = f.id
|
||||
set f.base = o.base;
|
||||
|
||||
/* Adjust for the big change in the dubious range */
|
||||
update faction_list set base = base + 200 where base between -900 and -501;
|
||||
|
||||
DROP TABLE IF EXISTS oldbases;
|
||||
|
||||
/* Create mods based on the client_faction_associations */
|
||||
/* No code changes required */
|
||||
|
||||
insert into faction_list_mod
|
||||
(select null, faction_id, `mod`, concat("r", other_faction_id-50)
|
||||
from client_faction_associations a
|
||||
join client_faction_names n on n.id = a.other_faction_id
|
||||
where other_faction_id between 51 and 180);
|
||||
|
||||
insert into faction_list_mod
|
||||
(select null, faction_id, `mod`, concat("c", other_faction_id)
|
||||
from client_faction_associations a
|
||||
join client_faction_names n on n.id = a.other_faction_id
|
||||
where other_faction_id between 1 and 50);
|
||||
|
||||
insert into faction_list_mod
|
||||
(select null, faction_id, `mod`, concat("d", other_faction_id)
|
||||
from client_faction_associations a
|
||||
join client_faction_names n on n.id = a.other_faction_id
|
||||
where other_faction_id between 201 and 216);
|
||||
|
||||
/* And now we need to fix all the other faction tables to point to the new factions. */
|
||||
|
||||
CREATE TABLE IF NOT EXISTS npc_faction_prefix AS SELECT * from npc_faction;
|
||||
|
||||
update npc_faction set primaryfaction = (select new_faction from custom_faction_mappings where old_faction = primaryfaction)
|
||||
where primaryfaction in (select old_faction from custom_faction_mappings);
|
||||
|
||||
update npc_faction set primaryfaction = (select clientid from client_server_faction_map where serverid = primaryfaction)
|
||||
where primaryfaction in (select serverid from client_server_faction_map);
|
||||
|
||||
update npc_faction_entries set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id)
|
||||
where faction_id in (select old_faction from custom_faction_mappings);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS npc_faction_entries_prefix AS SELECT * from npc_faction_entries;
|
||||
|
||||
/* Move existing factions out of wat - the following replace would create key */
|
||||
/* duplicates along the way, but none when complete. */
|
||||
|
||||
update npc_faction_entries set faction_id = faction_id + 20000
|
||||
where faction_id in (select serverid from client_server_faction_map);
|
||||
|
||||
update npc_faction_entries set faction_id = (select clientid from client_server_faction_map where faction_id > 20000 && serverid = (faction_id-20000))
|
||||
where faction_id > 20000 && (faction_id-20000) in (select serverid from client_server_faction_map);
|
||||
|
||||
/* Removes any duplicates from the use of factions that are obsoleted */
|
||||
/* These are entries that have no new mapping whatsoever */
|
||||
delete from npc_faction_entries where faction_id > 20000;
|
||||
|
||||
|
||||
/*
|
||||
Update the faction_values now.
|
||||
*/
|
||||
|
||||
CREATE TABLE IF NOT EXISTS faction_values_prefix AS SELECT * from faction_values;
|
||||
|
||||
delete from faction_values
|
||||
where faction_id not in (select old_faction from custom_faction_mappings) and faction_id not in (select serverid from client_server_faction_map);
|
||||
|
||||
/* Custom faction mappings dont have to worry about range collision */
|
||||
|
||||
select "Updating faction_values for custom factions" ``;
|
||||
|
||||
update faction_values set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id)
|
||||
where faction_id in (select old_faction from custom_faction_mappings);
|
||||
|
||||
/*
|
||||
There are so many of these, Im going to update in place to save time.
|
||||
To do this we must remove the unique keys, as these will be violated until
|
||||
the update is complete
|
||||
*/
|
||||
|
||||
select "Updating core faction_values to use new faction ids...." ``;
|
||||
|
||||
alter table faction_values drop primary key;
|
||||
|
||||
update faction_values v
|
||||
join client_server_faction_map m on v.faction_id = m.serverid
|
||||
set faction_id = m.clientid;
|
||||
|
||||
ALTER TABLE `faction_values` ADD PRIMARY KEY `lookup` (`char_id`,`faction_id`);
|
||||
|
||||
/*
|
||||
* The following to be deleted in a future update, once everyone is
|
||||
* happy with the conversion
|
||||
|
||||
DROP TABLE IF EXISTS custom_faction_mappings;
|
||||
DROP TABLE IF EXISTS faction_list_mod_prefix;
|
||||
DROP TABLE IF EXISTS faction_list_prefix;
|
||||
DROP TABLE IF EXISTS npc_faction_prefix;
|
||||
DROP TABLE IF EXISTS npc_faction_entries_prefix;
|
||||
DROP TABLE IF NOT EXISTS faction_values_prefix;
|
||||
|
||||
*/
|
||||
+12
-6
@@ -3470,7 +3470,7 @@ float Client::CalcPriceMod(Mob* other, bool reverse)
|
||||
float chaformula = 0;
|
||||
if (other)
|
||||
{
|
||||
int factionlvl = GetFactionLevel(CharacterID(), other->CastToNPC()->GetNPCTypeID(), GetRace(), GetClass(), GetDeity(), other->CastToNPC()->GetPrimaryFaction(), other);
|
||||
int factionlvl = GetFactionLevel(CharacterID(), other->CastToNPC()->GetNPCTypeID(), GetFactionRace(), GetClass(), GetDeity(), other->CastToNPC()->GetPrimaryFaction(), other);
|
||||
if (factionlvl >= FACTION_APPREHENSIVE) // Apprehensive or worse.
|
||||
{
|
||||
if (GetCHA() > 103)
|
||||
@@ -7705,7 +7705,7 @@ FACTION_VALUE Client::GetReverseFactionCon(Mob* iOther) {
|
||||
if (iOther->GetPrimaryFaction() == 0)
|
||||
return FACTION_INDIFFERENT;
|
||||
|
||||
return GetFactionLevel(CharacterID(), 0, GetRace(), GetClass(), GetDeity(), iOther->GetPrimaryFaction(), iOther);
|
||||
return GetFactionLevel(CharacterID(), 0, GetFactionRace(), GetClass(), GetDeity(), iOther->GetPrimaryFaction(), iOther);
|
||||
}
|
||||
|
||||
//o--------------------------------------------------------------
|
||||
@@ -7792,7 +7792,7 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui
|
||||
// Find out starting faction for this faction
|
||||
// It needs to be used to adj max and min personal
|
||||
// The range is still the same, 1200-3000(4200), but adjusted for base
|
||||
database.GetFactionData(&fm, GetClass(), GetRace(), GetDeity(),
|
||||
database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(),
|
||||
faction_id[i]);
|
||||
|
||||
if (quest)
|
||||
@@ -7842,7 +7842,7 @@ void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class
|
||||
// Find out starting faction for this faction
|
||||
// It needs to be used to adj max and min personal
|
||||
// The range is still the same, 1200-3000(4200), but adjusted for base
|
||||
database.GetFactionData(&fm, GetClass(), GetRace(), GetDeity(),
|
||||
database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(),
|
||||
faction_id);
|
||||
|
||||
// Adjust the amount you can go up or down so the resulting range
|
||||
@@ -7943,9 +7943,15 @@ return;
|
||||
int32 Client::GetModCharacterFactionLevel(int32 faction_id) {
|
||||
int32 Modded = GetCharacterFactionLevel(faction_id);
|
||||
FactionMods fm;
|
||||
if (database.GetFactionData(&fm, GetClass(), GetRace(), GetDeity(), faction_id))
|
||||
if (database.GetFactionData(&fm, GetClass(), GetFactionRace(), GetDeity(), faction_id))
|
||||
{
|
||||
Modded += fm.base + fm.class_mod + fm.race_mod + fm.deity_mod;
|
||||
|
||||
//Tack on any bonuses from Alliance type spell effects
|
||||
Modded += GetFactionBonus(faction_id);
|
||||
Modded += GetItemFactionBonus(faction_id);
|
||||
}
|
||||
|
||||
return Modded;
|
||||
}
|
||||
|
||||
@@ -7958,7 +7964,7 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
|
||||
|
||||
// If a faction is involved, get the data.
|
||||
if (primaryfaction > 0) {
|
||||
if (database.GetFactionData(&fmod, GetClass(), GetRace(), GetDeity(), primaryfaction)) {
|
||||
if (database.GetFactionData(&fmod, GetClass(), GetFactionRace(), GetDeity(), primaryfaction)) {
|
||||
tmpFactionValue = GetCharacterFactionLevel(primaryfaction);
|
||||
lowestvalue = std::min(std::min(tmpFactionValue, fmod.deity_mod),
|
||||
std::min(fmod.class_mod, fmod.race_mod));
|
||||
|
||||
@@ -4623,7 +4623,7 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
|
||||
con->playerid = GetID();
|
||||
con->targetid = conin->targetid;
|
||||
if (tmob->IsNPC())
|
||||
con->faction = GetFactionLevel(character_id, tmob->GetNPCTypeID(), race, class_, deity, (tmob->IsNPC()) ? tmob->CastToNPC()->GetPrimaryFaction() : 0, tmob); // Dec. 20, 2001; TODO: Send the players proper deity
|
||||
con->faction = GetFactionLevel(character_id, tmob->GetNPCTypeID(), GetFactionRace(), class_, deity, (tmob->IsNPC()) ? tmob->CastToNPC()->GetPrimaryFaction() : 0, tmob); // Dec. 20, 2001; TODO: Send the players proper deity
|
||||
else
|
||||
con->faction = 1;
|
||||
con->level = GetLevelCon(tmob->GetLevel());
|
||||
|
||||
+1
-1
@@ -1046,7 +1046,7 @@ void PerlembParser::ExportMobVariables(bool isPlayerQuest, bool isGlobalPlayerQu
|
||||
if (mob && npcmob && mob->IsClient()) {
|
||||
Client* client = mob->CastToClient();
|
||||
|
||||
fac = client->GetFactionLevel(client->CharacterID(), npcmob->GetID(), client->GetRace(),
|
||||
fac = client->GetFactionLevel(client->CharacterID(), npcmob->GetID(), client->GetFactionRace(),
|
||||
client->GetClass(), client->GetDeity(), npcmob->GetPrimaryFaction(), npcmob);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -1553,7 +1553,7 @@ void Mob::ShowStats(Client* client)
|
||||
}
|
||||
}
|
||||
else {
|
||||
client->Message(0, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), GetAC(), GetClass(), GetSize(), GetHaste());
|
||||
client->Message(0, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), ACSum(), GetClass(), GetSize(), GetHaste());
|
||||
client->Message(0, " HP: %i Max HP: %i",GetHP(), GetMaxHP());
|
||||
client->Message(0, " Mana: %i Max Mana: %i", GetMana(), GetMaxMana());
|
||||
client->Message(0, " Total ATK: %i Worn/Spell ATK (Cap %i): %i", GetATK(), RuleI(Character, ItemATKCap), GetATKBonus());
|
||||
@@ -2121,6 +2121,16 @@ bool Mob::IsPlayerRace(uint16 in_race) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16 Mob::GetFactionRace() {
|
||||
uint16 current_race = GetRace();
|
||||
if (IsPlayerRace(current_race) || current_race == TREE ||
|
||||
current_race == MINOR_ILL_OBJ) {
|
||||
return current_race;
|
||||
}
|
||||
else {
|
||||
return (GetBaseRace());
|
||||
}
|
||||
}
|
||||
|
||||
uint8 Mob::GetDefaultGender(uint16 in_race, uint8 in_gender) {
|
||||
if (Mob::IsPlayerRace(in_race) || in_race == 15 || in_race == 50 || in_race == 57 || in_race == 70 || in_race == 98 || in_race == 118 || in_race == 562) {
|
||||
|
||||
@@ -442,6 +442,7 @@ public:
|
||||
virtual void SetMaxHP() { current_hp = max_hp; }
|
||||
virtual inline uint16 GetBaseRace() const { return base_race; }
|
||||
virtual inline uint8 GetBaseGender() const { return base_gender; }
|
||||
virtual uint16 GetFactionRace();
|
||||
virtual inline uint16 GetDeity() const { return deity; }
|
||||
virtual EQEmu::deity::DeityTypeBit GetDeityBit() { return EQEmu::deity::ConvertDeityTypeToDeityTypeBit((EQEmu::deity::DeityType)deity); }
|
||||
inline uint16 GetRace() const { return race; }
|
||||
|
||||
+1
-1
@@ -2899,7 +2899,7 @@ uint8 QuestManager::FactionValue()
|
||||
FACTION_VALUE oldfac;
|
||||
uint8 newfac = 0;
|
||||
if(initiator && owner->IsNPC()) {
|
||||
oldfac = initiator->GetFactionLevel(initiator->GetID(), owner->GetID(), initiator->GetRace(), initiator->GetClass(), initiator->GetDeity(), owner->GetPrimaryFaction(), owner);
|
||||
oldfac = initiator->GetFactionLevel(initiator->GetID(), owner->GetID(), initiator->GetFactionRace(), initiator->GetClass(), initiator->GetDeity(), owner->GetPrimaryFaction(), owner);
|
||||
|
||||
// now, reorder the faction to have it make sense (higher values are better)
|
||||
switch (oldfac) {
|
||||
|
||||
Regular → Executable
+26
-6
@@ -3914,6 +3914,8 @@ bool ZoneDatabase::GetFactionData(FactionMods* fm, uint32 class_mod, uint32 race
|
||||
}
|
||||
|
||||
fm->base = faction_array[faction_id]->base;
|
||||
fm->min = faction_array[faction_id]->min; // The lowest your personal earned faction can go - before race/class/diety adjustments.
|
||||
fm->max = faction_array[faction_id]->max; // The highest your personal earned faction can go - before race/class/diety adjustments.
|
||||
|
||||
if(class_mod > 0) {
|
||||
char str[32];
|
||||
@@ -4060,14 +4062,32 @@ bool ZoneDatabase::LoadFactionData()
|
||||
faction_array[index] = new Faction;
|
||||
strn0cpy(faction_array[index]->name, row[1], 50);
|
||||
faction_array[index]->base = atoi(row[2]);
|
||||
faction_array[index]->min = MIN_PERSONAL_FACTION;
|
||||
faction_array[index]->max = MAX_PERSONAL_FACTION;
|
||||
|
||||
query = StringFormat("SELECT `mod`, `mod_name` FROM `faction_list_mod` WHERE faction_id = %u", index);
|
||||
auto modResults = QueryDatabase(query);
|
||||
if (!modResults.Success())
|
||||
continue;
|
||||
// Load in the mimimum and maximum faction that can be earned for this faction
|
||||
query = StringFormat("SELECT `min` , `max` FROM `faction_base_data` WHERE client_faction_id = %u", index);
|
||||
auto baseResults = QueryDatabase(query);
|
||||
if (!baseResults.Success() || baseResults.RowCount() == 0) {
|
||||
Log(Logs::General, Logs::General, "Faction %d has no base data", (int)index);
|
||||
}
|
||||
else {
|
||||
for (auto modRow = baseResults.begin(); modRow != baseResults.end(); ++modRow) {
|
||||
faction_array[index]->min = atoi(modRow[0]);
|
||||
faction_array[index]->max = atoi(modRow[1]);
|
||||
Log(Logs::General, Logs::None, "Min(%d), Max(%d) for faction (%u)",faction_array[index]->min, faction_array[index]->max, index);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow)
|
||||
faction_array[index]->mods[modRow[1]] = atoi(modRow[0]);
|
||||
// Load in modifiers to the faction based on characters race, class and diety.
|
||||
query = StringFormat("SELECT `mod`, `mod_name` FROM `faction_list_mod` WHERE faction_id = %u", index);
|
||||
auto modResults = QueryDatabase(query);
|
||||
if (!modResults.Success())
|
||||
continue;
|
||||
|
||||
for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow) {
|
||||
faction_array[index]->mods[modRow[1]] = atoi(modRow[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user