mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-11 16:40:32 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server
This commit is contained in:
commit
1973a065c5
24 files changed
+621
-414
No files matched your search
@@ -831,17 +831,18 @@ struct BindStruct {
|
||||
/*008*/ float y;
|
||||
/*012*/ float z;
|
||||
/*016*/ float heading;
|
||||
/*020*/
|
||||
/*020*/ uint32 instance_id;
|
||||
/*024*/
|
||||
};
|
||||
|
||||
struct SuspendedMinion_Struct
|
||||
{
|
||||
/*000*/ uint16 SpellID;
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[_MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*000*/ uint16 SpellID;
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[_MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
|
||||
@@ -2663,6 +2664,17 @@ struct Translocate_Struct {
|
||||
/*088*/ uint32 Complete;
|
||||
};
|
||||
|
||||
struct PendingTranslocate_Struct
|
||||
{
|
||||
uint32 zone_id;
|
||||
uint16 instance_id;
|
||||
float heading;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
uint32 spell_id;
|
||||
};
|
||||
|
||||
struct Sacrifice_Struct {
|
||||
/*000*/ uint32 CasterID;
|
||||
/*004*/ uint32 TargetID;
|
||||
|
||||
+26
-10
@@ -43,7 +43,8 @@ if($OS eq "Windows"){
|
||||
@mysql = split(';', $has_mysql_path);
|
||||
foreach my $v (@mysql){
|
||||
if($v=~/MySQL|MariaDB/i){
|
||||
$path = $v . "/mysql";
|
||||
$v =~s/\n//g;
|
||||
$path = trim($v) . "/mysql";
|
||||
last;
|
||||
}
|
||||
}
|
||||
@@ -106,8 +107,6 @@ if($bin_db_ver == $local_db_ver && $ARGV[0] eq "ran_from_world"){
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!$bin_db_ver){ $bin_db_ver = 9100; }
|
||||
|
||||
print "Retrieving latest database manifest...\n";
|
||||
GetRemoteFile("https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt", "db_update/db_update_manifest.txt");
|
||||
# GetRemoteFile("https://dl.dropboxusercontent.com/u/50023467/dl/db_update_manifest.txt", "db_update/db_update_manifest.txt");
|
||||
@@ -129,6 +128,7 @@ sub ShowMenuPrompt {
|
||||
1 => \&database_dump,
|
||||
2 => \&database_dump_compress,
|
||||
3 => \&Run_Database_Check,
|
||||
4 => \&AA_Fetch,
|
||||
0 => \&Exit,
|
||||
);
|
||||
|
||||
@@ -163,10 +163,10 @@ sub ShowMenuPrompt {
|
||||
|
||||
sub MenuOptions {
|
||||
if(@total_updates){
|
||||
$option[3] = "Run pending updates... (" . scalar (@total_updates) . ")";
|
||||
$option[3] = "Run pending REQUIRED updates... (" . scalar (@total_updates) . ")";
|
||||
}
|
||||
else{
|
||||
$option[3] = "Check for pending Database updates
|
||||
$option[3] = "Check for pending REQUIRED Database updates
|
||||
Stages updates for automatic upgrade...";
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ Database Management Menu (Please Select):
|
||||
2) Backup Database Compressed - (Saves to Backups folder)
|
||||
Ideal to perform before performing updates
|
||||
3) $option[3]
|
||||
4) AAs - Get Latest AA's from PEQ (This deletes AA's already in the database)
|
||||
0) Exit
|
||||
|
||||
EO_MENU
|
||||
@@ -269,6 +270,15 @@ sub trim {
|
||||
return $string;
|
||||
}
|
||||
|
||||
#::: Fetch Latest PEQ AA's
|
||||
sub AA_Fetch{
|
||||
print "Pulling down PEQ AA Tables...\n";
|
||||
GetRemoteFile("https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/peq_aa_tables.sql", "db_update/peq_aa_tables.sql");
|
||||
print "\n\nInstalling AA Tables...\n";
|
||||
print GetMySQLResultFromFile("db_update/peq_aa_tables.sql");
|
||||
print "\nDone...\n\n";
|
||||
}
|
||||
|
||||
#::: Responsible for Database Upgrade Routines
|
||||
sub Run_Database_Check{
|
||||
#::: Run 2 - Running pending updates...
|
||||
@@ -313,14 +323,14 @@ sub Run_Database_Check{
|
||||
push(@total_updates, $i);
|
||||
}
|
||||
else{
|
||||
print "DB up to date with: " . $i . " '" . $file_name . "' \n";
|
||||
print "DB up to date with: " . $i . " - '" . $file_name . "' \n";
|
||||
}
|
||||
print_match_debug();
|
||||
print_break();
|
||||
}
|
||||
if($match_type eq "missing"){
|
||||
if(GetMySQLResult($query_check)=~/$match_text/i){
|
||||
print "DB up to date with: " . $i . " '" . $file_name . "' \n";
|
||||
print "DB up to date with: " . $i . " - '" . $file_name . "' \n";
|
||||
next;
|
||||
}
|
||||
else{
|
||||
@@ -338,7 +348,7 @@ sub Run_Database_Check{
|
||||
push(@total_updates, $i);
|
||||
}
|
||||
else{
|
||||
print "DB up to date with: " . $i . " '" . $file_name . "' \n";
|
||||
print "DB up to date with: " . $i . " - '" . $file_name . "' \n";
|
||||
}
|
||||
print_match_debug();
|
||||
print_break();
|
||||
@@ -350,13 +360,19 @@ sub Run_Database_Check{
|
||||
push(@total_updates, $i);
|
||||
}
|
||||
else{
|
||||
print "DB up to date with: " . $i . " '" . $file_name . "' \n";
|
||||
print "DB up to date with: " . $i . " - '" . $file_name . "' \n";
|
||||
}
|
||||
print_match_debug();
|
||||
print_break();
|
||||
}
|
||||
}
|
||||
print "\n\n";
|
||||
print "\n";
|
||||
|
||||
if(scalar (@total_updates) == 0){
|
||||
print "No updates need to be run...\n";
|
||||
print "Setting Database to Binary Version (" . $bin_db_ver . ") if not already...\n\n";
|
||||
GetMySQLResult("UPDATE db_version SET version = $bin_db_ver");
|
||||
}
|
||||
}
|
||||
|
||||
sub FetchMissingUpdate{
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
9001|2013_02_25_Impr_HT_LT.sql|SHOW TABLES LIKE 'merc_inventory'|empty|
|
||||
9002|2013_03_1_Merc_Rules_and_Equipment.sql|SHOW TABLES LIKE 'merc_inventory'|empty|
|
||||
# 9003|2013_03_23_Escape_FadingMemories.sql
|
||||
9004|2013_04_04_NaturesBounty.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '1230' AND `slot` = '1' AND `effectid` = '313' AND `base1` = '15' AND `base2` = '0'|empty|
|
||||
# 9004|2013_04_04_NaturesBounty.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '1230' AND `slot` = '1' AND `effectid` = '313' AND `base1` = '15' AND `base2` = '0'|empty|
|
||||
9005|2013_04_08_Salvage.sql|SHOW COLUMNS FROM `tradeskill_recipe_entries` LIKE 'salvagecount'|empty|
|
||||
9006|2013_05_05_Account_Flags.sql|SHOW TABLES LIKE 'account_flags'|empty|
|
||||
9007|2013_05_05_Item_Tick.sql|SHOW TABLES LIKE 'item_tick'|empty|
|
||||
@@ -270,31 +270,31 @@
|
||||
# 9010|2013_10_12_Merc_vwMercNpcTypes.sql
|
||||
9011|2013_10_31_Recipe_disabling.sql|SHOW COLUMNS FROM `tradeskill_recipe` LIKE 'enabled'|empty|
|
||||
9012|2013_11_07_BaseData.sql|SHOW TABLES LIKE 'base_data'|empty|
|
||||
9013|2013_11_13_Instrument_Singing_Mastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '213' AND `slot` = '1' AND `effectid` = '260' AND `base1` = '2' AND `base2` = '23'|empty|
|
||||
# 9013|2013_11_13_Instrument_Singing_Mastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '213' AND `slot` = '1' AND `effectid` = '260' AND `base1` = '2' AND `base2` = '23'|empty|
|
||||
9014|2013_11_18_AssistRadius.sql|SHOW COLUMNS FROM `npc_types` LIKE 'assistradius'|empty|
|
||||
9015|2013_12_26_MerchantList_Class_Required.sql|SHOW COLUMNS FROM `merchantlist` LIKE 'classes_required'|empty|
|
||||
9016|2014_01_04_SongModCapAAs.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '571' AND `slot` = '1' AND `effectid` = '261'|empty|
|
||||
# 9016|2014_01_04_SongModCapAAs.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '571' AND `slot` = '1' AND `effectid` = '261'|empty|
|
||||
9017|2014_01_08_SpellsNewAdditions.sql|SHOW COLUMNS FROM `spells_new` LIKE 'persistdeath'|empty|
|
||||
9018|2014_01_09_PreservePetSize.sql|SHOW COLUMNS FROM `character_pet_info` LIKE 'size'|empty|
|
||||
9019|2014_01_20_MezMastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '781' AND `slot` = '1' AND `effectid` = '287'|empty|
|
||||
# 9019|2014_01_20_MezMastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '781' AND `slot` = '1' AND `effectid` = '287'|empty|
|
||||
9020|2014_01_20_Not_Extendable.sql|SHOW COLUMNS FROM `spells_new` LIKE 'not_extendable'|empty|
|
||||
9021|2014_01_20_SpellCastingReinforcement.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '86' AND `slot` = '1' AND `effectid` = '128'|empty|
|
||||
# 9021|2014_01_20_SpellCastingReinforcement.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '86' AND `slot` = '1' AND `effectid` = '128'|empty|
|
||||
9022|2014_01_20_Weather.sql|SHOW COLUMNS FROM `zone` LIKE 'rain_chance1'|empty|
|
||||
9023|2014_01_27_CritcalMendAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '230' AND `slot` = '1' AND `effectid` = '275'|empty
|
||||
9024|2014_02_02_SpellCriticalsAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '4755' AND `slot` = '1' AND `effectid` = '294'|empty
|
||||
# 9023|2014_01_27_CritcalMendAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '230' AND `slot` = '1' AND `effectid` = '275'|empty
|
||||
# 9024|2014_02_02_SpellCriticalsAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '4755' AND `slot` = '1' AND `effectid` = '294'|empty
|
||||
9025|2014_02_13_Rename_instance_lockout_tables.sql|SHOW TABLES LIKE 'instance_list'|empty|
|
||||
9026|2014_02_13_spells_new_update.sql|SHOW COLUMNS FROM `spells_new` LIKE 'ConeStartAngle'|empty|
|
||||
9027|2014_02_20_buff_update.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'caston_y'|empty|
|
||||
9028|2014_02_26_roambox_update.sql|SHOW COLUMNS FROM `spawngroup` LIKE 'mindelay'|empty|
|
||||
9029|2014_02_26_virulentvenomAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '888' AND `slot` = '1' AND `effectid` = '250'|empty|
|
||||
# 9029|2014_02_26_virulentvenomAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '888' AND `slot` = '1' AND `effectid` = '250'|empty|
|
||||
9030|2014_04_04_PhysicalResist.sql|SHOW COLUMNS FROM `npc_types` LIKE 'PhR'|empty|
|
||||
9031|2014_04_10_No_Target_With_Hotkey.sql|SHOW COLUMNS FROM `npc_types` LIKE 'no_target_hotkey'|empty|
|
||||
9032|2014_04_12_SlowMitigation.sql|SHOW COLUMNS FROM `npc_types` LIKE 'slow_mitigation'|contains|float
|
||||
9034|2014_04_25_spawn_events.sql|SHOW COLUMNS FROM `spawn_events` LIKE 'strict'|empty|
|
||||
9035|2014_04_27_AISpellEffects.sql|SHOW COLUMNS FROM `npc_types` LIKE 'npc_spells_effects_id'|empty|
|
||||
9036|2014_05_04_SlowMitigationFix.sql|SHOW COLUMNS FROM `npc_types` LIKE 'slow_mitigation'|contains|float
|
||||
9038|2014_06_25_AA_Updates.sql|SELECT * FROM `altadv_vars` WHERE `skill_id` = '1604'|empty
|
||||
9039|2014_07_04_AA_Updates.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '158' AND `slot` = '1' AND `effectid` = '238'|empty
|
||||
# 9038|2014_06_25_AA_Updates.sql|SELECT * FROM `altadv_vars` WHERE `skill_id` = '1604'|empty
|
||||
# 9039|2014_07_04_AA_Updates.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '158' AND `slot` = '1' AND `effectid` = '238'|empty
|
||||
9040|2014_07_10_npc_spells.sql|SHOW COLUMNS FROM `npc_spells` LIKE 'engaged_no_sp_recast_min'|empty|
|
||||
9041|2014_08_02_spells_new.sql|SHOW COLUMNS FROM `spells_new` LIKE 'viral_range'|empty|
|
||||
9042|2014_08_12_NPC_raid_targets.sql|SHOW COLUMNS FROM `npc_types` LIKE 'raid_target'|empty|
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
DROP TABLE IF EXISTS `aa_effects`;
|
||||
CREATE TABLE `aa_effects` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`aaid` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`slot` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`effectid` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`base1` mediumint(8) NOT NULL DEFAULT '0',
|
||||
`base2` mediumint(8) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `NewIndex` (`aaid`,`slot`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2527 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `aa_effects` VALUES (1,2,1,4,2,0),(2,3,1,4,4,0),(3,4,1,4,6,0),(4,5,1,4,8,0),(5,6,1,4,10,0),(6,7,1,7,2,0),(7,8,1,7,4,0),(8,9,1,7,6,0),(9,10,1,7,8,0),(10,11,1,7,10,0),(11,12,1,6,2,0),(12,13,1,6,4,0),(13,14,1,6,6,0),(14,15,1,6,8,0),(15,16,1,6,10,0),(16,17,1,5,2,0),(17,18,1,5,4,0),(18,19,1,5,6,0),(19,20,1,5,8,0),(20,21,1,5,10,0),(21,22,1,8,2,0),(22,23,1,8,4,0),(23,24,1,8,6,0),(24,25,1,8,8,0),(25,26,1,8,10,0),(26,27,1,9,2,0),(27,28,1,9,4,0),(28,29,1,9,6,0),(29,30,1,9,8,0),(30,31,1,9,10,0),(31,32,1,10,2,0),(32,33,1,10,4,0),(33,34,1,10,6,0),(34,35,1,10,8,0),(35,36,1,10,10,0),(36,37,1,46,2,0),(37,38,1,46,4,0),(38,39,1,46,6,0),(39,40,1,46,8,0),(40,41,1,46,10,0),(41,42,1,47,2,0),(42,43,1,47,4,0),(43,44,1,47,6,0),(44,45,1,47,8,0),(45,46,1,47,10,0),(46,47,1,50,2,0),(47,48,1,50,4,0),(48,49,1,50,6,0),(49,50,1,50,8,0),(50,51,1,50,10,0),(51,52,1,48,2,0),(52,53,1,48,4,0),(53,54,1,48,6,0),(54,55,1,48,8,0),(55,56,1,48,10,0),(56,57,1,49,2,0),(57,58,1,49,4,0),(58,59,1,49,6,0),(59,60,1,49,8,0),(60,61,1,49,10,0),(61,62,1,271,8,0),(62,63,1,271,14,0),(63,64,1,271,21,0),(64,65,1,0,1,0),(65,66,1,0,2,0),(66,67,1,0,3,0),(67,71,1,246,110,0),(68,72,1,246,125,0),(69,73,1,246,150,0),(70,89,1,15,1,0),(71,90,1,15,2,0),(72,91,1,15,3,0),(1953,104,1,127,10,10),(1954,104,2,138,1,0),(1955,104,3,140,1,0),(1956,104,4,143,3000,0),(1957,105,1,127,25,25),(1958,105,2,138,1,0),(1959,105,3,140,1,0),(1960,105,4,143,3000,0),(1961,106,1,127,50,50),(1962,106,2,138,1,0),(1963,106,3,140,1,0),(1964,106,4,143,3000,0),(910,107,1,214,200,0),(911,108,1,214,500,0),(912,109,1,214,1000,0),(88,110,1,0,1,0),(89,111,1,0,2,0),(90,112,1,0,3,0),(1908,137,1,127,10,10),(1909,137,2,137,88,0),(1910,138,1,127,25,25),(1911,138,2,137,88,0),(1912,139,1,127,50,50),(1913,139,2,137,88,0),(1893,141,1,127,2,2),(1894,141,2,137,0,0),(1895,141,3,138,0,0),(1896,141,4,141,1,0),(1897,141,5,143,3000,0),(1898,142,1,127,5,5),(1899,142,2,137,0,0),(1900,142,3,138,0,0),(1901,142,4,141,1,0),(1902,142,5,143,3000,0),(1903,143,1,127,10,10),(1904,143,2,137,0,0),(1905,143,3,138,0,0),(1906,143,4,141,1,0),(1907,143,5,143,3000,0),(1941,147,1,127,10,10),(1942,147,2,138,1,0),(1943,147,3,140,1,0),(1944,147,4,143,3000,0),(1945,148,1,127,25,25),(1946,148,2,138,1,0),(1947,148,3,140,1,0),(1948,148,4,143,3000,0),(1949,149,1,127,50,50),(1950,149,2,138,1,0),(1951,149,3,140,1,0),(1952,149,4,143,3000,0),(1914,164,1,127,10,10),(1915,164,2,137,32,0),(1916,164,3,127,10,10),(1917,164,4,137,33,0),(1923,165,1,127,25,25),(1924,165,2,137,32,0),(1925,165,3,127,25,25),(1926,165,4,137,33,0),(1932,166,1,127,50,50),(1933,166,2,137,32,0),(1934,166,3,127,50,50),(1935,166,4,137,33,0),(137,196,1,226,1,0),(138,237,1,227,1,25),(139,238,1,227,3,25),(140,239,1,227,5,25),(1077,270,1,270,10,0),(1078,271,1,270,15,0),(1079,272,1,270,25,0),(144,278,1,0,1,0),(145,278,2,15,1,0),(907,279,1,214,200,0),(147,280,1,227,1,62),(148,280,2,227,1,17),(149,281,1,227,3,62),(150,281,2,227,3,17),(151,282,1,227,5,62),(152,282,2,227,5,17),(153,292,1,4,2,0),(154,293,1,4,4,0),(155,294,1,4,6,0),(156,295,1,4,8,0),(157,296,1,4,10,0),(158,297,1,4,12,0),(159,298,1,4,14,0),(160,299,1,4,16,0),(161,300,1,4,18,0),(162,301,1,4,20,0),(163,302,1,7,2,0),(164,303,1,7,4,0),(165,304,1,7,6,0),(166,305,1,7,8,0),(167,306,1,7,10,0),(168,307,1,7,12,0),(169,308,1,7,14,0),(170,309,1,7,16,0),(171,310,1,7,18,0),(172,311,1,7,20,0),(173,312,1,6,2,0),(174,313,1,6,4,0),(175,314,1,6,6,0),(176,315,1,6,8,0),(177,316,1,6,10,0),(178,317,1,6,12,0),(179,318,1,6,14,0),(180,319,1,6,16,0),(181,320,1,6,18,0),(182,321,1,6,20,0),(183,322,1,5,2,0),(184,323,1,5,4,0),(185,324,1,5,6,0),(186,325,1,5,8,0),(187,326,1,5,10,0),(188,327,1,5,12,0),(189,328,1,5,14,0),(190,329,1,5,16,0),(191,330,1,5,18,0),(192,331,1,5,20,0),(193,332,1,8,2,0),(194,333,1,8,4,0),(195,334,1,8,6,0),(196,335,1,8,8,0),(197,336,1,8,10,0),(198,337,1,8,12,0),(199,338,1,8,14,0),(200,339,1,8,16,0),(201,340,1,8,18,0),(202,341,1,8,20,0),(203,342,1,9,2,0),(204,343,1,9,4,0),(205,344,1,9,6,0),(206,345,1,9,8,0),(207,346,1,9,10,0),(208,347,1,9,12,0),(209,348,1,9,14,0),(210,349,1,9,16,0),(211,350,1,9,18,0),(212,351,1,9,20,0),(213,352,1,10,2,0),(214,353,1,10,4,0),(215,354,1,10,6,0),(216,355,1,10,8,0),(217,356,1,10,10,0),(218,357,1,10,12,0),(219,358,1,10,14,0),(220,359,1,10,16,0),(221,360,1,10,18,0),(222,361,1,10,20,0),(223,362,1,46,2,0),(224,363,1,46,4,0),(225,364,1,46,6,0),(226,365,1,46,8,0),(227,366,1,46,10,0),(229,368,1,46,14,0),(230,369,1,46,16,0),(231,370,1,46,18,0),(232,371,1,46,20,0),(233,372,1,47,2,0),(234,373,1,47,4,0),(235,374,1,47,6,0),(236,375,1,47,8,0),(237,376,1,47,10,0),(238,377,1,47,12,0),(239,378,1,47,14,0),(240,379,1,47,16,0),(241,380,1,47,18,0),(242,381,1,47,20,0),(243,382,1,50,2,0),(244,383,1,50,4,0),(245,384,1,50,6,0),(246,385,1,50,8,0),(247,386,1,50,10,0),(248,387,1,50,12,0),(249,388,1,50,14,0),(250,389,1,50,16,0),(251,390,1,50,18,0),(252,391,1,50,20,0),(253,392,1,48,2,0),(254,393,1,48,4,0),(255,394,1,48,6,0),(256,395,1,48,8,0),(257,396,1,48,10,0),(258,397,1,48,12,0),(259,398,1,48,14,0),(260,399,1,48,16,0),(261,400,1,48,Line truncated
|
||||
|
||||
DROP TABLE IF EXISTS `aa_required_level_cost`;
|
||||
CREATE TABLE `aa_required_level_cost` (
|
||||
`skill_id` int(10) unsigned NOT NULL,
|
||||
`level` int(10) unsigned NOT NULL,
|
||||
`cost` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`description` varchar(64) DEFAULT NULL COMMENT 'For reference only',
|
||||
PRIMARY KEY (`skill_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
INSERT INTO `aa_required_level_cost` VALUES (7800,1,0,'Harm Touch'),(7801,6,0,'Harm Touch'),(7802,11,0,'Harm Touch'),(7803,16,0,'Harm Touch'),(7804,21,0,'Harm Touch'),(7805,26,0,'Harm Touch'),(7806,31,0,'Harm Touch'),(7807,36,0,'Harm Touch'),(7808,41,0,'Harm Touch'),(7809,46,0,'Harm Touch'),(7810,51,3,'Harm Touch'),(7811,56,4,'Harm Touch'),(7812,61,5,'Harm Touch'),(7813,66,6,'Harm Touch'),(7814,71,7,'Harm Touch'),(7815,76,8,'Harm Touch'),(7816,81,8,'Harm Touch'),(7817,83,9,'Harm Touch'),(7850,5,0,'Lay on Hands'),(7851,11,0,'Lay on Hands'),(7852,16,0,'Lay on Hands'),(7853,21,0,'Lay on Hands'),(7854,26,0,'Lay on Hands'),(7855,31,0,'Lay on Hands'),(7856,36,0,'Lay on Hands'),(7857,41,0,'Lay on Hands'),(7858,46,0,'Lay on Hands'),(7859,51,0,'Lay on Hands'),(7860,56,3,'Lay on Hands'),(7861,61,4,'Lay on Hands'),(7862,66,5,'Lay on Hands'),(7863,71,6,'Lay on Hands'),(7864,76,7,'Lay on Hands'),(7865,81,8,'Lay on Hands'),(7866,85,9,'Lay on Hands'),(593,61,2,'Fervent Blessing'),(594,63,4,'Fervent Blessing'),(595,65,6,'Fervent Blessing'),(292,61,1,'Advanced Innate Strength'),(293,61,1,'Advanced Innate Strength'),(294,62,1,'Advanced Innate Strength'),(295,62,1,'Advanced Innate Strength'),(296,63,1,'Advanced Innate Strength'),(297,63,1,'Advanced Innate Strength'),(298,64,1,'Advanced Innate Strength'),(299,64,1,'Advanced Innate Strength'),(300,65,1,'Advanced Innate Strength'),(301,65,1,'Advanced Innate Strength'),(302,61,1,'Advanced Innate Stamina'),(303,61,1,'Advanced Innate Stamina'),(304,62,1,'Advanced Innate Stamina'),(305,62,1,'Advanced Innate Stamina'),(306,63,1,'Advanced Innate Stamina'),(307,63,1,'Advanced Innate Stamina'),(308,64,1,'Advanced Innate Stamina'),(309,64,1,'Advanced Innate Stamina'),(310,65,1,'Advanced Innate Stamina'),(311,65,1,'Advanced Innate Stamina'),(312,61,1,'Advanced Innate Agility'),(313,61,1,'Advanced Innate Agility'),(314,62,1,'Advanced Innate Agility'),(315,62,1,'Advanced Innate Agility'),(316,63,1,'Advanced Innate Agility'),(317,63,1,'Advanced Innate Agility'),(318,64,1,'Advanced Innate Agility'),(319,64,1,'Advanced Innate Agility'),(320,65,1,'Advanced Innate Agility'),(321,65,1,'Advanced Innate Agility'),(322,61,1,'Advanced Innate Dexterity'),(323,61,1,'Advanced Innate Dexterity'),(324,62,1,'Advanced Innate Dexterity'),(325,62,1,'Advanced Innate Dexterity'),(326,63,1,'Advanced Innate Dexterity'),(327,63,1,'Advanced Innate Dexterity'),(328,64,1,'Advanced Innate Dexterity'),(329,64,1,'Advanced Innate Dexterity'),(330,65,1,'Advanced Innate Dexterity'),(331,65,1,'Advanced Innate Dexterity'),(332,61,1,'Advanced Innate Intelligence'),(333,61,1,'Advanced Innate Intelligence'),(334,62,1,'Advanced Innate Intelligence'),(335,62,1,'Advanced Innate Intelligence'),(336,63,1,'Advanced Innate Intelligence'),(337,63,1,'Advanced Innate Intelligence'),(338,64,1,'Advanced Innate Intelligence'),(339,64,1,'Advanced Innate Intelligence'),(340,65,1,'Advanced Innate Intelligence'),(341,65,1,'Advanced Innate Intelligence'),(342,61,1,'Advanced Innate Wisdom'),(343,61,1,'Advanced Innate Wisdom'),(344,62,1,'Advanced Innate Wisdom'),(345,62,1,'Advanced Innate Wisdom'),(346,63,1,'Advanced Innate Wisdom'),(347,63,1,'Advanced Innate Wisdom'),(348,64,1,'Advanced Innate Wisdom'),(349,64,1,'Advanced Innate Wisdom'),(350,65,1,'Advanced Innate Wisdom'),(351,65,1,'Advanced Innate Wisdom'),(352,61,1,'Advanced Innate Charisma'),(353,61,1,'Advanced Innate Charisma'),(354,62,1,'Advanced Innate Charisma'),(355,62,1,'Advanced Innate Charisma'),(356,63,1,'Advanced Innate Charisma'),(357,63,1,'Advanced Innate Charisma'),(358,64,1,'Advanced Innate Charisma'),(359,64,1,'Advanced Innate Charisma'),(360,65,1,'Advanced Innate Charisma'),(361,65,1,'Advanced Innate Charisma'),(362,61,1,'Warding of Solusek'),(363,61,1,'Warding of Solusek'),(364,62,1,'Warding of Solusek'),(365,62,1,'Warding of Solusek'),(366,63,1,'Warding of Solusek'),(367,63,1,'Warding of Solusek'),(368,64,1,'Warding of Solusek'),(369,64,1,'Warding of Solusek'),(370,65,1,'Warding of Solusek'),(371,65,1,'Warding of Solusek'),(372,61,1,'Blessing of E\'ci'),(373,61,1,'Blessing of E\'ci'),(374,62,1,'Blessing of E\'ci'),(375,62,1,'Blessing of E\'ci'),(376,63,1,'Blessing of E\'ci'),(377,63,1,'Blessing of E\'ci'),(378,64,1,'Blessing of E\'ci'),(379,64,1,'Blessing of E\'ci'),(380,65,1,'Blessing of E\'ci'),(381,65,1,'Blessing of E\'ci'),(382,61,1,'Marr\'s Protection'),(383,61,1,'Marr\'s Protection'),(384,62,1,'Marr\'s Protection'),(385,62,1,'Marr\'s Protection'),(386,63,1,'Marr\'s Protection'),(387,63,1,'Marr\'s Protection'),(388,64,1,'Marr\'s Protection'),(389,64,1,'Marr\'s Protection'),(390,65,1,'Marr\'s Protection'),(391,65,1,'Marr\'s Protection'),(392,61,1,'Shroud of the Faceless'),(393,61,1,'Shroud of the Faceless'),(394,62,1,'Shroud of the Faceless'),(395,62,1,'Shroud of the Faceless'),(396,63,1,'Shroud of the Faceless'),(397,63,1,'Shroud of the Faceless'),(398,64,1,'Shroud of the Faceless'),(399,64,1,'Shroud of the Faceless'),(400,65,1,'Shroud of the Faceless'),(401,65,1,'ShroLine truncated
|
||||
|
||||
DROP TABLE IF EXISTS `altadv_vars`;
|
||||
CREATE TABLE `altadv_vars` (
|
||||
`skill_id` int(11) NOT NULL DEFAULT '0',
|
||||
`name` varchar(128) DEFAULT NULL,
|
||||
`cost` int(11) DEFAULT NULL,
|
||||
`max_level` int(11) DEFAULT NULL,
|
||||
`hotkey_sid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`hotkey_sid2` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`title_sid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`desc_sid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`type` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`spellid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`prereq_skill` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`prereq_minpoints` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`spell_type` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`spell_refresh` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`classes` int(10) unsigned NOT NULL DEFAULT '65534',
|
||||
`berserker` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`class_type` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`cost_inc` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`aa_expansion` smallint(3) unsigned NOT NULL DEFAULT '3',
|
||||
`special_category` int(10) unsigned NOT NULL DEFAULT '4294967295',
|
||||
`sof_type` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`sof_cost_inc` tinyint(3) NOT NULL DEFAULT '0',
|
||||
`sof_max_level` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`sof_next_skill` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`clientver` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`account_time_required` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`sof_current_level` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`sof_next_id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`level_inc` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`skill_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `altadv_vars` VALUES (2,'Innate Strength',1,5,4294967295,4294967295,13500,13501,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,2,1,0,0,292,0),(7,'Innate Stamina',1,5,4294967295,4294967295,13502,13503,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,7,1,0,0,302,0),(12,'Innate Agility',1,5,4294967295,4294967295,13504,13505,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,12,1,0,0,312,0),(17,'Innate Dexterity',1,5,4294967295,4294967295,13506,13507,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,17,1,0,0,322,0),(22,'Innate Intelligence',1,5,4294967295,4294967295,13508,13509,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,22,1,0,0,332,0),(27,'Innate Wisdom',1,5,4294967295,4294967295,13510,13511,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,27,1,0,0,342,0),(32,'Innate Charisma',1,5,4294967295,4294967295,13512,13513,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,32,1,0,0,352,0),(37,'Innate Fire Protection',1,5,4294967295,4294967295,13514,13515,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,37,1,0,0,362,0),(42,'Innate Cold Protection',1,5,4294967295,4294967295,13516,13517,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,42,1,0,0,372,0),(47,'Innate Magic Protection',1,5,4294967295,4294967295,13518,13519,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,47,1,0,0,382,0),(52,'Innate Poison Protection',1,5,4294967295,4294967295,13520,13521,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,52,1,0,0,392,0),(57,'Innate Disease Protection',1,5,4294967295,4294967295,13522,13523,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,15,57,1,0,0,402,0),(62,'Innate Run Speed',1,3,4294967295,4294967295,13524,13525,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,5,62,1,0,0,672,0),(65,'Innate Regeneration',1,3,4294967295,4294967295,13526,13527,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,5,65,1,0,0,674,0),(68,'Innate Metabolism',1,3,4294967295,4294967295,13528,13529,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,3,68,1,0,0,0,0),(71,'Innate Lung Capacity',1,3,4294967295,4294967295,13530,13531,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,6,71,1,0,0,676,0),(74,'First Aid',1,3,4294967295,4294967295,13532,13533,1,4294967295,0,0,0,0,65534,1,51,0,3,4294967295,1,0,6,74,1,0,0,263,0),(77,'Healing Adept',2,3,4294967295,4294967295,13534,13535,2,4294967295,4294967295,0,0,0,33884,0,55,2,3,4294967295,2,0,12,77,1,0,0,434,0),(80,'Healing Gift',2,3,4294967295,4294967295,13536,13537,2,4294967295,4294967295,0,0,0,33884,0,55,2,3,4294967295,2,0,21,80,1,0,0,437,0),(83,'Spell Casting Mastery',2,3,4294967295,4294967295,13538,13539,2,4294967295,4294967295,0,0,0,31812,0,55,2,3,4294967295,2,0,3,83,1,0,0,0,0),(86,'Spell Casting Reinforcement',2,3,4294967295,4294967295,13540,13541,2,4294967295,4294967295,0,0,0,50268,0,55,2,3,4294967295,2,0,3,86,1,0,0,0,0),(89,'Mental Clarity',2,3,4294967295,4294967295,13542,13543,2,4294967295,4294967295,0,0,0,64892,0,55,2,3,4294967295,2,0,3,89,1,0,0,0,0),(92,'Spell Casting Fury',2,3,4294967295,4294967295,13544,13545,2,4294967295,0,0,0,0,64892,0,55,2,3,4294967295,2,0,3,92,1,0,0,0,0),(95,'Channeling Focus',2,3,4294967295,4294967295,13546,13547,2,4294967295,4294967295,0,0,0,64892,0,55,2,3,4294967295,2,0,3,95,1,0,0,0,0),(98,'Spell Casting Subtlety',2,3,4294967295,4294967295,13548,13549,2,0,0,0,0,0,30976,0,55,2,3,4294967295,2,0,3,98,1,0,0,0,0),(101,'Spell Casting Expertise',2,3,4294967295,4294967295,13550,13551,2,4294967295,4294967295,0,0,0,31008,0,55,2,3,4294967295,2,0,3,101,1,0,0,0,0),(104,'Spell Casting Deftness',2,3,4294967295,4294967295,13552,13553,2,4294967295,4294967295,0,0,0,14368,0,55,2,3,4294967295,2,0,3,104,1,0,0,0,0),(107,'Natural Durability',2,3,4294967295,4294967295,13554,13555,2,4294967295,4294967295,0,0,0,65534,1,55,2,3,4294967295,1,0,3,107,1,0,0,0,0),(110,'Natural Healing',2,3,4294967295,4294967295,13556,13557,2,4294967295,4294967295,0,0,0,33722,1,55,2,3,4294967295,2,0,8,110,1,0,0,1031,0),(113,'Combat Fury',2,3,4294967295,4294967295,13558,13559,2,4294967295,4294967295,0,0,0,33722,1,55,2,3,4294967295,2,0,6,113,1,0,0,443,0),(116,'Fear Resistance',2,3,4294967295,4294967295,13560,13561,2,4294967295,4294967295,0,0,0,33722,1,55,2,3,4294967295,2,0,3,116,1,0,0,0,0),(119,'Finishing Blow',2,3,4294967295,4294967295,13562,13563,2,4294967295,0,0,0,0,33722,1,55,2,3,4294967295,2,0,21,119,1,0,0,440,0),(122,'Combat Stability',2,3,4294967295,4294967295,13564,13565,2,4294967295,4294967295,0,0,0,65534,1,55,2,3,4294967295,1,0,33,122,1,0,0,454,0),(125,'Combat Agility',2,3,4294967295,4294967295,13566,13567,2,4294967295,4294967295,0,0,0,65534,1,55,2,3,4294967295,1,0,33,125,1,0,0,449,0),(128,'Mass Group Buff',9,1,13811,13812,13809,13810,3,5228,4294967295,0,1,4320,60508,0,59,0,3,4294967295,3,0,1,128,1,0,0,0,0),(129,'Divine Resurrection',5,1,13570,13571,13568,13569,3,2738,80,3,2,259200,4,0,59,0,3,4294967295,3,0,1,129,1,0,0,0,0),(130,'Innate Invis to Undead',3,1,13574,13575,13572,13573,3,235,4294967295,0,3,7,2052,0,59,0,3,4294967295,3,0,1,130,1,0,1,0,0Line truncated
|
||||
|
||||
DROP TABLE IF EXISTS `aa_actions`;
|
||||
CREATE TABLE `aa_actions` (
|
||||
`aaid` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`rank` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`reuse_time` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`spell_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`target` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`nonspell_action` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`nonspell_mana` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`nonspell_duration` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`redux_aa` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`redux_rate` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`redux_aa2` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`redux_rate2` tinyint(4) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`aaid`,`rank`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `aa_actions` VALUES (128,0,4320,5228,1,0,0,100000,782,10,0,0),(129,0,259200,2738,2,0,0,0,0,0,0,0),(130,0,7,2739,1,0,0,0,0,0,0,0),(131,0,4320,2740,2,0,0,0,0,0,0,0),(132,0,8640,2741,2,0,0,0,462,10,0,0),(133,0,4320,2776,1,0,0,0,0,0,0,0),(133,1,4320,2777,1,0,0,0,0,0,0,0),(133,2,4320,2778,1,0,0,0,0,0,0,0),(136,0,4320,2742,2,0,0,0,468,10,0,0),(140,0,4320,2771,1,0,0,0,477,10,0,0),(145,0,4320,0,2,8,0,0,0,0,0,0),(146,0,180,2749,1,0,0,0,0,0,0,0),(153,0,7200,2750,1,0,0,0,474,10,0,0),(154,0,7200,2751,2,0,0,0,0,0,0,0),(155,0,420,2758,1,0,0,0,0,0,0,0),(156,0,4320,2734,1,0,0,0,0,0,0,0),(162,0,8640,2753,1,0,0,0,471,10,0,0),(163,0,2160,2752,5,0,0,0,483,10,0,0),(167,0,900,2754,5,0,0,0,0,0,0,0),(168,0,900,2795,1,0,0,0,0,0,0,0),(168,1,900,2796,1,0,0,0,0,0,0,0),(168,2,900,2797,1,0,0,0,0,0,0,0),(171,0,900,2798,1,0,0,0,0,0,0,0),(171,1,900,2799,1,0,0,0,0,0,0,0),(171,2,900,2800,1,0,0,0,0,0,0,0),(174,0,900,2792,1,0,0,0,0,0,0,0),(174,1,900,2793,1,0,0,0,0,0,0,0),(174,2,900,2794,1,0,0,0,0,0,0,0),(177,0,900,2789,1,0,0,0,0,0,0,0),(177,1,900,2790,1,0,0,0,0,0,0,0),(177,2,900,2791,1,0,0,0,0,0,0,0),(181,0,300,8133,2,0,0,0,486,10,0,0),(181,1,300,8134,2,0,0,0,486,10,0,0),(181,2,300,8135,2,0,0,0,486,10,0,0),(183,0,8640,2755,2,0,0,0,0,0,0,0),(184,0,4320,2756,2,0,0,0,0,0,0,0),(185,0,4320,2757,1,0,0,0,0,0,0,0),(186,0,7,2772,1,0,0,0,0,0,0,0),(187,0,4320,2764,2,0,0,0,0,0,0,0),(188,0,30,2190,2,0,0,0,583,24,0,0),(193,0,4320,0,2,10,0,0,0,0,0,0),(194,0,1,2874,1,0,0,0,0,0,0,0),(197,0,7,2765,1,0,0,0,0,0,0,0),(206,0,1,2875,1,0,0,0,0,0,0,0),(207,0,4320,2774,2,0,0,0,596,17,0,0),(208,0,4320,2766,2,0,0,0,596,17,0,0),(233,0,1800,2742,1,0,0,0,495,10,0,0),(243,0,4320,5244,1,0,0,0,498,10,886,10),(254,0,4320,5232,1,0,0,0,501,10,0,0),(258,0,600,5233,1,0,0,0,492,10,0,0),(259,0,900,0,1,1,0,0,489,10,0,0),(260,0,2160,5229,1,0,0,0,0,0,0,0),(260,1,2160,5230,1,0,0,0,0,0,0,0),(260,2,2160,5231,1,0,0,0,0,0,0,0),(274,0,4320,2748,2,0,0,0,480,10,0,0),(289,0,300,3290,5,0,0,0,0,0,0,0),(290,0,720,3289,1,0,0,0,0,0,0,0),(291,0,900,3291,3,0,0,0,0,0,0,0),(459,0,180,3297,1,0,0,0,754,10,0,0),(459,1,180,3298,1,0,0,0,754,10,0,0),(459,2,180,3299,1,0,0,0,754,10,0,0),(507,0,180,3252,1,0,0,0,0,0,0,0),(507,1,180,3253,1,0,0,0,0,0,0,0),(507,2,180,3254,1,0,0,0,0,0,0,0),(510,0,240,3255,2,0,0,0,0,0,0,0),(510,1,240,3256,2,0,0,0,0,0,0,0),(510,2,240,3257,2,0,0,0,0,0,0,0),(513,0,120,3274,2,0,0,0,0,0,0,0),(513,1,120,3275,2,0,0,0,0,0,0,0),(513,2,120,3276,2,0,0,0,0,0,0,0),(516,0,480,3338,1,0,0,0,0,0,0,0),(517,0,600,3258,1,0,0,0,0,0,0,0),(517,1,600,3259,1,0,0,0,0,0,0,0),(517,2,600,3260,1,0,0,0,0,0,0,0),(520,0,540,3265,2,0,0,0,0,0,0,0),(520,1,540,3266,2,0,0,0,0,0,0,0),(520,2,540,3267,2,0,0,0,0,0,0,0),(523,0,540,3268,2,0,0,0,0,0,0,0),(523,1,540,3269,2,0,0,0,0,0,0,0),(523,2,540,3270,2,0,0,0,0,0,0,0),(526,0,1,5844,1,0,0,0,0,0,0,0),(526,1,1,3248,1,0,0,0,0,0,0,0),(526,2,1,3249,1,0,0,0,0,0,0,0),(528,0,720,3283,2,0,0,0,0,0,0,0),(528,1,720,3284,2,0,0,0,0,0,0,0),(528,2,720,3285,2,0,0,0,0,0,0,0),(531,0,900,3250,2,0,0,0,0,0,0,0),(531,1,900,3251,2,0,0,0,0,0,0,0),(533,0,420,3264,1,0,0,0,0,0,0,0),(534,0,2160,3261,1,0,0,0,849,10,0,0),(534,1,2160,3262,1,0,0,0,849,10,0,0),(534,2,2160,3263,1,0,0,0,849,10,0,0),(545,0,900,3271,1,0,0,0,0,0,0,0),(545,1,900,3272,1,0,0,0,0,0,0,0),(545,2,900,3273,1,0,0,0,0,0,0,0),(548,0,900,3277,1,0,0,0,0,0,0,0),(548,1,900,3278,1,0,0,0,0,0,0,0),(548,2,900,3279,1,0,0,0,0,0,0,0),(592,0,18,3282,2,0,0,0,0,0,0,0),(616,0,900,3286,2,0,0,0,0,0,0,0),(616,1,900,3287,2,0,0,0,0,0,0,0),(616,2,900,3288,2,0,0,0,0,0,0,0),(619,0,900,3292,2,0,0,0,0,0,0,0),(619,1,900,3293,2,0,0,0,0,0,0,0),(619,2,900,3294,2,0,0,0,0,0,0,0),(630,0,1,5243,1,16,900,0,0,0,0,0),(643,0,0,5227,1,0,0,0,0,0,0,0),(645,0,5,3614,2,0,0,0,0,0,0,0),(718,0,120,4521,1,0,0,0,0,0,0,0),(718,1,120,4522,1,0,0,0,0,0,0,0),(718,2,120,4523,1,0,0,0,0,0,0,0),(721,0,900,5110,2,0,0,0,0,0,0,0),(721,1,900,5111,2,0,0,0,0,0,0,0),(921,0,60,4833,1,0,0,0,0,0,0,0),(922,0,60,4834,1,0,0,0,0,0,0,0),(923,0,60,4835,1,0,0,0,0,0,0,0),(926,0,1800,4836,2,0,0,0,0,0,0,0),(926,1,1800,4837,2,0,0,0,0,0,0,0),(926,2,1800,4848,2,0,0,0,0,0,0,0),(926,3,1800,4839,2,0,0,0,0,0,0,0),(926,4,1800,4840,2,0,0,0,0,0,0,0),(931,0,4320,5245,1,0,0,0,0,0,0,0),(931,1,4320,5246,1,0,0,0,0,0,0,0),(931,2,4320,5247,1,0,0,0,0,0,0,0),(1000,0,4320,5824,1,0,0,0,0,0,0,0),(1119,0,900,5841,2,0,0,0,0,0,0,0),(1119,1,900,5842,2,0,0,0,0,0,0,0),(1119,2,900,5843,2,0,0,0,0,0,0,0),(1123,0,900,5854,1,0,0,0,0,0,0,0),(1123,1,900,5855,1,0,0,0,0,0,0,0),(1123,2,900,5856,1,0,0,0,0,0,0,0),(1126,0,2160,5845,5,0,0,0,483,10,0,0),(1126,1,2160,5846,5,0,0,0,483,10,0,0),(1126,2,2160,5847,5,0,0,0,483,10,0,0),(1229,0,4160,6094,1,0,0,0,0,0,0,0),(1334,0,4320,5943,2,0,0,0,0,0,0,0),(1334,1,4320,5944,2,0,0,0,0,0,0,0),(1334,2,4320,5945,2,0,0,0,0,0,0,0),(1337,0,4320,5946,1,0,0,0,0,0,0,0),(1337,1,4320,5947,1,0,0,0,0,0,0,0),(1337,2,4320,5948,1,0,0,0,0,0,0,0),(1340,0,60,5950,1,0,0,0,0,0,0,0),(1341,0,60,5951,1,0,0,0,0,0,0,0),(1342,0,60,5952,1,0,0,0,0,0,0,0),(1343,0,300,5953,3,0,0,0,0,0,0,0),(1344,0,60,5949,1,0,0,0,0,0,0,0),(828,0,3600,5240,1Line truncated
|
||||
+45
-23
@@ -222,15 +222,37 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
|
||||
|
||||
int WorldDatabase::MoveCharacterToBind(int CharID, uint8 bindnum) {
|
||||
/* if an invalid bind point is specified, use the primary bind */
|
||||
if (bindnum > 4){ bindnum = 0; }
|
||||
int is_home = 0;
|
||||
if (bindnum == 4){ is_home = 1; }
|
||||
|
||||
std::string query = StringFormat("SELECT `zone_id` FROM `character_bind` WHERE `id` = %u AND `is_home` = %u LIMIT 1", CharID, is_home);
|
||||
auto results = database.QueryDatabase(query); int i = 0;
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
return atoi(row[0]);
|
||||
if (bindnum > 4)
|
||||
{
|
||||
bindnum = 0;
|
||||
}
|
||||
|
||||
std::string query = StringFormat("SELECT zone_id, instance_id, x, y, z FROM character_bind WHERE id = %u AND is_home = %u LIMIT 1", CharID, bindnum == 4 ? 1 : 0);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success() || results.RowCount() == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int zone_id, instance_id;
|
||||
double x, y, z, heading;
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
zone_id = atoi(row[0]);
|
||||
instance_id = atoi(row[1]);
|
||||
x = atof(row[2]);
|
||||
y = atof(row[3]);
|
||||
z = atof(row[4]);
|
||||
heading = atof(row[5]);
|
||||
}
|
||||
|
||||
query = StringFormat("UPDATE character_data SET zone_id = '%d', zone_instance = '%d', x = '%f', y = '%f', z = '%f', heading = '%f' WHERE id = %u",
|
||||
zone_id, instance_id, x, y, z, heading, CharID);
|
||||
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return zone_id;
|
||||
}
|
||||
|
||||
bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc)
|
||||
@@ -239,7 +261,7 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct*
|
||||
return false;
|
||||
|
||||
in_pp->x = in_pp->y = in_pp->z = in_pp->heading = in_pp->zone_id = 0;
|
||||
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = 0;
|
||||
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = in_pp->binds[0].instance_id = 0;
|
||||
|
||||
std::string query = StringFormat("SELECT x, y, z, heading, zone_id, bind_id "
|
||||
"FROM start_zones WHERE player_choice = % i "
|
||||
@@ -267,79 +289,79 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct*
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
in_pp->zone_id =2; // qeynos2
|
||||
in_pp->zone_id = 2; // qeynos2
|
||||
in_pp->binds[0].zoneId = 2; // qeynos2
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
in_pp->zone_id =29; // halas
|
||||
in_pp->zone_id = 29; // halas
|
||||
in_pp->binds[0].zoneId = 30; // everfrost
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
in_pp->zone_id =19; // rivervale
|
||||
in_pp->zone_id = 19; // rivervale
|
||||
in_pp->binds[0].zoneId = 20; // kithicor
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
in_pp->zone_id =9; // freportw
|
||||
in_pp->zone_id = 9; // freportw
|
||||
in_pp->binds[0].zoneId = 9; // freportw
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
in_pp->zone_id =40; // neriaka
|
||||
in_pp->zone_id = 40; // neriaka
|
||||
in_pp->binds[0].zoneId = 25; // nektulos
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
in_pp->zone_id =52; // gukta
|
||||
in_pp->zone_id = 52; // gukta
|
||||
in_pp->binds[0].zoneId = 46; // innothule
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
in_pp->zone_id =49; // oggok
|
||||
in_pp->zone_id = 49; // oggok
|
||||
in_pp->binds[0].zoneId = 47; // feerrott
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
in_pp->zone_id =60; // kaladima
|
||||
in_pp->zone_id = 60; // kaladima
|
||||
in_pp->binds[0].zoneId = 68; // butcher
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
in_pp->zone_id =54; // gfaydark
|
||||
in_pp->zone_id = 54; // gfaydark
|
||||
in_pp->binds[0].zoneId = 54; // gfaydark
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
{
|
||||
in_pp->zone_id =61; // felwithea
|
||||
in_pp->zone_id = 61; // felwithea
|
||||
in_pp->binds[0].zoneId = 54; // gfaydark
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
{
|
||||
in_pp->zone_id =55; // akanon
|
||||
in_pp->zone_id = 55; // akanon
|
||||
in_pp->binds[0].zoneId = 56; // steamfont
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
{
|
||||
in_pp->zone_id =82; // cabwest
|
||||
in_pp->zone_id = 82; // cabwest
|
||||
in_pp->binds[0].zoneId = 78; // fieldofbone
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
{
|
||||
in_pp->zone_id =155; // sharvahl
|
||||
in_pp->zone_id = 155; // sharvahl
|
||||
in_pp->binds[0].zoneId = 155; // sharvahl
|
||||
break;
|
||||
}
|
||||
@@ -378,7 +400,7 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
|
||||
return false;
|
||||
|
||||
in_pp->x = in_pp->y = in_pp->z = in_pp->heading = in_pp->zone_id = 0;
|
||||
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = 0;
|
||||
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = in_pp->binds[0].instance_id = 0;
|
||||
|
||||
std::string query = StringFormat("SELECT x, y, z, heading, bind_id FROM start_zones WHERE zone_id = %i "
|
||||
"AND player_class = %i AND player_deity = %i AND player_race = %i",
|
||||
|
||||
+1
-1
@@ -1695,7 +1695,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes att
|
||||
|
||||
dead_timer.Start(5000, true);
|
||||
m_pp.zone_id = m_pp.binds[0].zoneId;
|
||||
m_pp.zoneInstance = 0;
|
||||
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
||||
database.MoveCharacterToZone(this->CharacterID(), database.GetZoneName(m_pp.zone_id));
|
||||
Save();
|
||||
GoToDeath();
|
||||
|
||||
+29
-18
@@ -398,7 +398,7 @@ Client::~Client() {
|
||||
if(IsHoveringForRespawn())
|
||||
{
|
||||
m_pp.zone_id = m_pp.binds[0].zoneId;
|
||||
m_pp.zoneInstance = 0;
|
||||
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
||||
x_pos = m_pp.binds[0].x;
|
||||
y_pos = m_pp.binds[0].y;
|
||||
z_pos = m_pp.binds[0].z;
|
||||
@@ -543,11 +543,11 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
m_pp.endurance = cur_end;
|
||||
|
||||
/* Save Character Currency */
|
||||
database.SaveCharacterCurrency(this->CharacterID(), &m_pp);
|
||||
database.SaveCharacterCurrency(CharacterID(), &m_pp);
|
||||
|
||||
/* Save Current Bind Points : Sets Instance to 0 because it is currently not implemented */
|
||||
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[0].zoneId, 0, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0, 0); /* Regular bind */
|
||||
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[4].zoneId, 0, m_pp.binds[4].x, m_pp.binds[4].y, m_pp.binds[4].z, 0, 1); /* Home Bind */
|
||||
/* Save Current Bind Points */
|
||||
database.SaveCharacterBindPoint(CharacterID(), m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0, 0); /* Regular bind */
|
||||
database.SaveCharacterBindPoint(CharacterID(), m_pp.binds[4].zoneId, m_pp.binds[4].instance_id, m_pp.binds[4].x, m_pp.binds[4].y, m_pp.binds[4].z, 0, 1); /* Home Bind */
|
||||
|
||||
/* Save Character Buffs */
|
||||
database.SaveBuffs(this);
|
||||
@@ -3848,7 +3848,8 @@ void Client::Sacrifice(Client *caster)
|
||||
|
||||
void Client::SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID) {
|
||||
|
||||
if(!Caster || PendingTranslocate) return;
|
||||
if(!Caster || PendingTranslocate)
|
||||
return;
|
||||
|
||||
const SPDat_Spell_Struct &Spell = spells[SpellID];
|
||||
|
||||
@@ -3856,26 +3857,29 @@ void Client::SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID) {
|
||||
Translocate_Struct *ts = (Translocate_Struct*)outapp->pBuffer;
|
||||
|
||||
strcpy(ts->Caster, Caster->GetName());
|
||||
ts->SpellID = SpellID;
|
||||
PendingTranslocateData.spell_id = ts->SpellID = SpellID;
|
||||
|
||||
if((SpellID == 1422) || (SpellID == 1334) || (SpellID == 3243)) {
|
||||
ts->ZoneID = m_pp.binds[0].zoneId;
|
||||
ts->x = m_pp.binds[0].x;
|
||||
ts->y = m_pp.binds[0].y;
|
||||
ts->z = m_pp.binds[0].z;
|
||||
PendingTranslocateData.zone_id = ts->ZoneID = m_pp.binds[0].zoneId;
|
||||
PendingTranslocateData.instance_id = m_pp.binds[0].instance_id;
|
||||
PendingTranslocateData.x = ts->x = m_pp.binds[0].x;
|
||||
PendingTranslocateData.y = ts->y = m_pp.binds[0].y;
|
||||
PendingTranslocateData.z = ts->z = m_pp.binds[0].z;
|
||||
PendingTranslocateData.heading = m_pp.binds[0].heading;
|
||||
}
|
||||
else {
|
||||
ts->ZoneID = database.GetZoneID(Spell.teleport_zone);
|
||||
PendingTranslocateData.instance_id = 0;
|
||||
ts->y = Spell.base[0];
|
||||
ts->x = Spell.base[1];
|
||||
ts->z = Spell.base[2];
|
||||
PendingTranslocateData.heading = 0.0;
|
||||
}
|
||||
|
||||
ts->unknown008 = 0;
|
||||
ts->Complete = 0;
|
||||
|
||||
PendingTranslocateData = *ts;
|
||||
PendingTranslocate=true;
|
||||
PendingTranslocate = true;
|
||||
TranslocateTime = time(nullptr);
|
||||
|
||||
QueuePacket(outapp);
|
||||
@@ -4473,7 +4477,8 @@ void Client::SendRespawnBinds()
|
||||
BindStruct* b = &m_pp.binds[0];
|
||||
RespawnOption opt;
|
||||
opt.name = "Bind Location";
|
||||
opt.zoneid = b->zoneId;
|
||||
opt.zone_id = b->zoneId;
|
||||
opt.instance_id = b->instance_id;
|
||||
opt.x = b->x;
|
||||
opt.y = b->y;
|
||||
opt.z = b->z;
|
||||
@@ -4483,7 +4488,8 @@ void Client::SendRespawnBinds()
|
||||
//Rez is always added at the end
|
||||
RespawnOption rez;
|
||||
rez.name = "Resurrect";
|
||||
rez.zoneid = zone->GetZoneID();
|
||||
rez.zone_id = zone->GetZoneID();
|
||||
rez.instance_id = zone->GetInstanceID();
|
||||
rez.x = GetX();
|
||||
rez.y = GetY();
|
||||
rez.z = GetZ();
|
||||
@@ -4518,7 +4524,7 @@ void Client::SendRespawnBinds()
|
||||
{
|
||||
opt = &(*itr);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, buffer, count++); //option num (from 0)
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, buffer, opt->zoneid);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, buffer, opt->zone_id);
|
||||
VARSTRUCT_ENCODE_TYPE(float, buffer, opt->x);
|
||||
VARSTRUCT_ENCODE_TYPE(float, buffer, opt->y);
|
||||
VARSTRUCT_ENCODE_TYPE(float, buffer, opt->z);
|
||||
@@ -4891,6 +4897,10 @@ void Client::SetStartZone(uint32 zoneid, float x, float y, float z)
|
||||
return;
|
||||
|
||||
m_pp.binds[4].zoneId = zoneid;
|
||||
if(zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) {
|
||||
m_pp.binds[4].instance_id = zone->GetInstanceID();
|
||||
}
|
||||
|
||||
if (x == 0 && y == 0 && z ==0)
|
||||
database.GetSafePoints(m_pp.binds[4].zoneId, 0, &m_pp.binds[4].x, &m_pp.binds[4].y, &m_pp.binds[4].z);
|
||||
else {
|
||||
@@ -7946,7 +7956,7 @@ void Client::SendItemScale(ItemInst *inst) {
|
||||
}
|
||||
}
|
||||
|
||||
void Client::AddRespawnOption(std::string option_name, uint32 zoneid, float x, float y, float z, float heading, bool initial_selection, int8 position)
|
||||
void Client::AddRespawnOption(std::string option_name, uint32 zoneid, uint16 instance_id, float x, float y, float z, float heading, bool initial_selection, int8 position)
|
||||
{
|
||||
//If respawn window is already open, any changes would create an inconsistency with the client
|
||||
if (IsHoveringForRespawn()) { return; }
|
||||
@@ -7957,7 +7967,8 @@ void Client::AddRespawnOption(std::string option_name, uint32 zoneid, float x, f
|
||||
//Create respawn option
|
||||
RespawnOption res_opt;
|
||||
res_opt.name = option_name;
|
||||
res_opt.zoneid = zoneid;
|
||||
res_opt.zone_id = zoneid;
|
||||
res_opt.instance_id = instance_id;
|
||||
res_opt.x = x;
|
||||
res_opt.y = y;
|
||||
res_opt.z = z;
|
||||
|
||||
+8
-4
@@ -177,7 +177,8 @@ struct XTarget_Struct
|
||||
struct RespawnOption
|
||||
{
|
||||
std::string name;
|
||||
uint32 zoneid;
|
||||
uint32 zone_id;
|
||||
uint16 instance_id;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
@@ -376,6 +377,7 @@ public:
|
||||
inline const float GetBindZ(uint32 index = 0) const { return m_pp.binds[index].z; }
|
||||
inline const float GetBindHeading(uint32 index = 0) const { return m_pp.binds[index].heading; }
|
||||
inline uint32 GetBindZoneID(uint32 index = 0) const { return m_pp.binds[index].zoneId; }
|
||||
inline uint32 GetBindInstanceID(uint32 index = 0) const { return m_pp.binds[index].instance_id; }
|
||||
int32 CalcMaxMana();
|
||||
int32 CalcBaseMana();
|
||||
const int32& SetMana(int32 amount);
|
||||
@@ -573,10 +575,11 @@ public:
|
||||
uint32 GetGroupEXP() { return(m_pp.group_leadership_exp); }
|
||||
uint32 GetTotalSecondsPlayed() { return(TotalSecondsPlayed); }
|
||||
virtual void SetLevel(uint8 set_level, bool command = false);
|
||||
|
||||
void GoToBind(uint8 bindnum = 0);
|
||||
void GoToSafeCoords(uint16 zone_id, uint16 instance_id);
|
||||
void Gate();
|
||||
void SetBindPoint(int to_zone = -1, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f);
|
||||
void SetBindPoint(int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f);
|
||||
void SetStartZone(uint32 zoneid, float x = 0.0f, float y =0.0f, float z = 0.0f);
|
||||
uint32 GetStartZone(void);
|
||||
void MovePC(const char* zonename, float x, float y, float z, float heading, uint8 ignorerestrictions = 0, ZoneMode zm = ZoneSolicited);
|
||||
@@ -613,6 +616,7 @@ public:
|
||||
inline uint32 GetWID() const { return WID; }
|
||||
inline void SetWID(uint32 iWID) { WID = iWID; }
|
||||
inline uint32 AccountID() const { return account_id; }
|
||||
|
||||
inline const char* AccountName()const { return account_name; }
|
||||
inline int16 Admin() const { return admin; }
|
||||
inline uint32 CharacterID() const { return character_id; }
|
||||
@@ -917,7 +921,7 @@ void SetConsumption(int32 in_hunger, int32 in_thirst);
|
||||
time_t TranslocateTime;
|
||||
bool PendingSacrifice;
|
||||
std::string SacrificeCaster;
|
||||
struct Translocate_Struct PendingTranslocateData;
|
||||
PendingTranslocate_Struct PendingTranslocateData;
|
||||
void SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID);
|
||||
|
||||
// Task System Methods
|
||||
@@ -1057,7 +1061,7 @@ void SetConsumption(int32 in_hunger, int32 in_thirst);
|
||||
void HandleRespawnFromHover(uint32 Option);
|
||||
bool IsHoveringForRespawn() { return RespawnFromHoverTimer.Enabled(); }
|
||||
std::list<RespawnOption> respawn_options;
|
||||
void AddRespawnOption(std::string option_name, uint32 zoneid, float x, float y, float z, float h = 0, bool initial_selection = false, int8 position = -1);
|
||||
void AddRespawnOption(std::string option_name, uint32 zoneid, uint16 instance_id, float x, float y, float z, float h = 0, bool initial_selection = false, int8 position = -1);
|
||||
bool RemoveRespawnOption(std::string option_name);
|
||||
bool RemoveRespawnOption(uint8 position);
|
||||
void ClearRespawnOptions() { respawn_options.clear(); }
|
||||
|
||||
+10
-10
@@ -13731,7 +13731,8 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app)
|
||||
}
|
||||
Translocate_Struct *its = (Translocate_Struct*)app->pBuffer;
|
||||
|
||||
if (!PendingTranslocate) return;
|
||||
if (!PendingTranslocate)
|
||||
return;
|
||||
|
||||
if ((RuleI(Spells, TranslocateTimeLimit) > 0) && (time(nullptr) > (TranslocateTime + RuleI(Spells, TranslocateTimeLimit)))) {
|
||||
Message(13, "You did not accept the Translocate within the required time limit.");
|
||||
@@ -13741,7 +13742,7 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app)
|
||||
|
||||
if (its->Complete == 1) {
|
||||
|
||||
int SpellID = PendingTranslocateData.SpellID;
|
||||
int SpellID = PendingTranslocateData.spell_id;
|
||||
int i = parse->EventSpell(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE, nullptr, this, SpellID, 0);
|
||||
|
||||
if (i == 0)
|
||||
@@ -13751,20 +13752,19 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app)
|
||||
// to the bind coords it has from the PlayerProfile, but with the X and Y reversed. I suspect they are
|
||||
// reversed in the pp, and since spells like Gate are handled serverside, this has not mattered before.
|
||||
if (((SpellID == 1422) || (SpellID == 1334) || (SpellID == 3243)) &&
|
||||
zone->GetZoneID() == PendingTranslocateData.ZoneID)
|
||||
(zone->GetZoneID() == PendingTranslocateData.zone_id &&
|
||||
zone->GetInstanceID() == PendingTranslocateData.instance_id))
|
||||
{
|
||||
PendingTranslocate = false;
|
||||
GoToBind();
|
||||
return;
|
||||
}
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Translocate, sizeof(Translocate_Struct));
|
||||
Translocate_Struct *ots = (Translocate_Struct*)outapp->pBuffer;
|
||||
memcpy(ots, &PendingTranslocateData, sizeof(Translocate_Struct));
|
||||
|
||||
//Was sending the packet back to initiate client zone...
|
||||
//but that could be abusable, so lets go through proper channels
|
||||
MovePC(ots->ZoneID, 0, ots->x, ots->y, ots->z, GetHeading(), 0, ZoneSolicited);
|
||||
////Was sending the packet back to initiate client zone...
|
||||
////but that could be abusable, so lets go through proper channels
|
||||
MovePC(PendingTranslocateData.zone_id, PendingTranslocateData.instance_id,
|
||||
PendingTranslocateData.x, PendingTranslocateData.y,
|
||||
PendingTranslocateData.z, PendingTranslocateData.heading, 0, ZoneSolicited);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-10
@@ -147,11 +147,11 @@ bool Client::Process() {
|
||||
if(mana_timer.Check())
|
||||
SendManaUpdatePacket();
|
||||
|
||||
if(dead && dead_timer.Check())
|
||||
{
|
||||
database.MoveCharacterToZone(GetName(),database.GetZoneName(m_pp.binds[0].zoneId));
|
||||
if(dead && dead_timer.Check()) {
|
||||
database.MoveCharacterToZone(GetName(), database.GetZoneName(m_pp.binds[0].zoneId));
|
||||
|
||||
m_pp.zone_id = m_pp.binds[0].zoneId;
|
||||
m_pp.zoneInstance = 0;
|
||||
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
||||
m_pp.x = m_pp.binds[0].x;
|
||||
m_pp.y = m_pp.binds[0].y;
|
||||
m_pp.z = m_pp.binds[0].z;
|
||||
@@ -2120,7 +2120,8 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
BindStruct* b = &m_pp.binds[0];
|
||||
default_to_bind = new RespawnOption;
|
||||
default_to_bind->name = "Bind Location";
|
||||
default_to_bind->zoneid = b->zoneId;
|
||||
default_to_bind->zone_id = b->zoneId;
|
||||
default_to_bind->instance_id = b->instance_id;
|
||||
default_to_bind->x = b->x;
|
||||
default_to_bind->y = b->y;
|
||||
default_to_bind->z = b->z;
|
||||
@@ -2129,7 +2130,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
is_rez = false;
|
||||
}
|
||||
|
||||
if (chosen->zoneid == zone->GetZoneID()) //If they should respawn in the current zone...
|
||||
if (chosen->zone_id == zone->GetZoneID() && chosen->instance_id == zone->GetInstanceID()) //If they should respawn in the current zone...
|
||||
{
|
||||
if (is_rez)
|
||||
{
|
||||
@@ -2185,6 +2186,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
ZonePlayerToBind_Struct* gmg = (ZonePlayerToBind_Struct*) outapp->pBuffer;
|
||||
|
||||
gmg->bind_zone_id = zone->GetZoneID();
|
||||
gmg->bind_instance_id = chosen->instance_id;
|
||||
gmg->x = chosen->x;
|
||||
gmg->y = chosen->y;
|
||||
gmg->z = chosen->z;
|
||||
@@ -2230,13 +2232,13 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
if(r)
|
||||
r->MemberZoned(this);
|
||||
|
||||
m_pp.zone_id = chosen->zoneid;
|
||||
m_pp.zoneInstance = 0;
|
||||
database.MoveCharacterToZone(this->CharacterID(), database.GetZoneName(chosen->zoneid));
|
||||
m_pp.zone_id = chosen->zone_id;
|
||||
m_pp.zoneInstance = chosen->instance_id;
|
||||
database.MoveCharacterToZone(CharacterID(), database.GetZoneName(chosen->zone_id));
|
||||
|
||||
Save();
|
||||
|
||||
MovePC(chosen->zoneid,chosen->x,chosen->y,chosen->z,chosen->heading,1);
|
||||
MovePC(chosen->zone_id, chosen->instance_id, chosen->x, chosen->y, chosen->z, chosen->heading, 1);
|
||||
}
|
||||
|
||||
safe_delete(default_to_bind);
|
||||
|
||||
+1
-269
@@ -150,31 +150,19 @@ int command_init(void) {
|
||||
if
|
||||
(
|
||||
command_add("resetaa","- Resets a Player's AA in their profile and refunds spent AA's to unspent, disconnects player.",200,command_resetaa) ||
|
||||
command_add("qtest","- QueryServ testing command.",255,command_qtest) ||
|
||||
command_add("bind","- Sets your targets bind spot to their current location",200,command_bind) ||
|
||||
command_add("sendop","[opcode] - LE's Private test command, leave it alone",200,command_sendop) ||
|
||||
command_add("optest","- solar's private test command",255,command_optest) ||
|
||||
command_add("setstat","- Sets the stats to a specific value.",255,command_setstat) ||
|
||||
command_add("incstat","- Increases or Decreases a client's stats permanently.",200,command_incstat) ||
|
||||
command_add("help","[search term] - List available commands and their description, specify partial command as argument to search",0,command_help) ||
|
||||
command_add("version","- Display current version of EQEmu server",0,command_version) ||
|
||||
command_add("setfaction","[faction number] - Sets targeted NPC's faction in the database",170,command_setfaction) ||
|
||||
command_add("serversidename","- Prints target's server side name",0,command_serversidename) ||
|
||||
command_add("testspawn","[memloc] [value] - spawns a NPC for you only, with the specified values set in the spawn struct",200,command_testspawn) ||
|
||||
command_add("testspawnkill","- Sends an OP_Death packet for spawn made with #testspawn",200,command_testspawnkill) ||
|
||||
command_add("wc","[wear slot] [material] - Sends an OP_WearChange for your target",200,command_wc) ||
|
||||
command_add("numauths","- TODO: describe this command",200,command_numauths) ||
|
||||
command_add("setanim","[animnum] - Set target's appearance to animnum",200,command_setanim) ||
|
||||
command_add("connectworldserver","- Make zone attempt to connect to worldserver",200,command_connectworldserver) ||
|
||||
command_add("connectworld",nullptr,0,command_connectworldserver) ||
|
||||
command_add("serverinfo","- Get OS info about server host",200,command_serverinfo) ||
|
||||
command_add("crashtest","- Crash the zoneserver",200,command_crashtest) ||
|
||||
command_add("getvariable","[varname] - Get the value of a variable from the database",200,command_getvariable) ||
|
||||
command_add("chat","[channel num] [message] - Send a channel message to all zones",200,command_chat) ||
|
||||
command_add("showpetspell","[spellid/searchstring] - search pet summoning spells",200,command_showpetspell) ||
|
||||
#ifdef IPC
|
||||
command_add("ipc","- Toggle an NPC's interactive flag",200,command_ipc) ||
|
||||
#endif
|
||||
command_add("npcloot","[show/money/add/remove] [itemid/all/money: pp gp sp cp] - Manipulate the loot an NPC is carrying",80,command_npcloot) ||
|
||||
command_add("log","- Search character event log",80,command_log) ||
|
||||
command_add("gm","- Turn player target's or your GM flag on or off",80,command_gm) ||
|
||||
@@ -182,7 +170,6 @@ int command_init(void) {
|
||||
command_add("zone","[zonename] [x] [y] [z] - Go to specified zone (coords optional)",50,command_zone) ||
|
||||
command_add("zoneinstance","[instanceid] [x] [y] [z] - Go to specified instance zone (coords optional)",50,command_zone_instance) ||
|
||||
command_add("peqzone","[zonename] - Go to specified zone, if you have > 75% health",0,command_peqzone) ||
|
||||
command_add("tgczone",nullptr,0,command_peqzone) ||
|
||||
command_add("showbuffs","- List buffs active on your target or you if no target",50,command_showbuffs) ||
|
||||
command_add("movechar","[charname] [zonename] - Move charname to zonename",50,command_movechar) ||
|
||||
command_add("viewpetition","[petition number] - View a petition",20,command_viewpetition) ||
|
||||
@@ -192,14 +179,12 @@ int command_init(void) {
|
||||
command_add("date","[yyyy] [mm] [dd] [HH] [MM] - Set EQ time",90,command_date) ||
|
||||
command_add("time","[HH] [MM] - Set EQ time",90,command_time) ||
|
||||
command_add("timezone","[HH] [MM] - Set timezone. Minutes are optional",90,command_timezone) ||
|
||||
command_add("synctod","- Send a time of day update to every client in zone",90,command_synctod) ||
|
||||
command_add("invulnerable","[on/off] - Turn player target's or your invulnerable flag on or off",80,command_invul) ||
|
||||
command_add("invul",nullptr,0,command_invul) ||
|
||||
command_add("hideme","[on/off] - Hide yourself from spawn lists.",80,command_hideme) ||
|
||||
command_add("gmhideme",nullptr,0,command_hideme) ||
|
||||
command_add("emote","['name'/'world'/'zone'] [type] [message] - Send an emote message",80,command_emote) ||
|
||||
command_add("fov","- Check wether you're behind or in your target's field of view",80,command_fov) ||
|
||||
command_add("manastat","- Report your or your target's cur/max mana",80,command_manastat) ||
|
||||
command_add("npcstats","- Show stats about target NPC",80,command_npcstats) ||
|
||||
command_add("zclip","[min] [max] - modifies and resends zhdr packet",80,command_zclip) ||
|
||||
command_add("npccast","[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid",80,command_npccast) ||
|
||||
@@ -210,7 +195,6 @@ int command_init(void) {
|
||||
command_add("permagender","[gendernum] - Change your or your player target's gender (zone to take effect)",80,command_permagender) ||
|
||||
command_add("weather","[0/1/2/3] (Off/Rain/Snow/Manual) - Change the weather",80,command_weather) ||
|
||||
command_add("zheader","[zonename] - Load zheader for zonename from the database",80,command_zheader) ||
|
||||
command_add("zhdr",nullptr,0,command_zheader) ||
|
||||
command_add("zsky","[skytype] - Change zone sky type",80,command_zsky) ||
|
||||
command_add("zcolor","[red] [green] [blue] - Change sky color",80,command_zcolor) ||
|
||||
command_add("zuwcoords","[z coord] - Set underworld coord",80,command_zuwcoords) ||
|
||||
@@ -218,7 +202,6 @@ int command_init(void) {
|
||||
command_add("zunderworld","[zcoord] - Sets the underworld using zcoord",80,command_zunderworld) ||
|
||||
command_add("spon","- Sends OP_MemorizeSpell",80,command_spon) ||
|
||||
command_add("spoff","- Sends OP_ManaChange",80,command_spoff) ||
|
||||
command_add("itemtest","- merth's test function",250,command_itemtest) ||
|
||||
command_add("gassign","[id] - Assign targetted NPC to predefined wandering grid id",100,command_gassign) ||
|
||||
command_add("ai","[factionid/spellslist/con/guard/roambox/stop/start] - Modify AI on NPC target",100,command_ai) ||
|
||||
command_add("showspellslist","Shows spell list of targeted NPC",100,command_showspellslist) ||
|
||||
@@ -254,7 +237,7 @@ int command_init(void) {
|
||||
command_add("spawn","[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC",10,command_spawn) ||
|
||||
command_add("texture","[texture] [helmtexture] - Change your or your target's appearance, use 255 to show equipment",10,command_texture) ||
|
||||
command_add("npctypespawn","[npctypeid] [factionid] - Spawn an NPC from the db",10,command_npctypespawn) ||
|
||||
command_add("dbspawn",nullptr,0,command_npctypespawn) ||
|
||||
command_add("dbspawn",nullptr,10,command_npctypespawn) ||
|
||||
command_add("heal","- Completely heal your target",10,command_heal) ||
|
||||
command_add("appearance","[type] [value] - Send an appearance packet for you or your target",150,command_appearance) ||
|
||||
command_add("nukeitem","[itemid] - Remove itemid from your player target's inventory",150,command_nukeitem) ||
|
||||
@@ -262,14 +245,12 @@ int command_init(void) {
|
||||
command_add("interrogateinv","- use [help] argument for available options",0,command_interrogateinv) ||
|
||||
command_add("findnpctype","[search criteria] - Search database NPC types",100,command_findnpctype) ||
|
||||
command_add("findzone","[search criteria] - Search database zones",100,command_findzone) ||
|
||||
command_add("fz",nullptr,100, command_findzone) ||
|
||||
command_add("viewnpctype","[npctype id] - Show info about an npctype",100,command_viewnpctype) ||
|
||||
command_add("reloadstatic","- Reload Static Zone Data",150,command_reloadstatic) ||
|
||||
command_add("reloadquest"," - Clear quest cache (any argument causes it to also stop all timers)",150,command_reloadqst) ||
|
||||
command_add("reloadqst"," - Clear quest cache (any argument causes it to also stop all timers)",150,command_reloadqst) ||
|
||||
command_add("reloadworld",nullptr,255,command_reloadworld) ||
|
||||
command_add("reloadlevelmods",nullptr,255,command_reloadlevelmods) ||
|
||||
command_add("rq",nullptr,0,command_reloadqst) ||
|
||||
command_add("reloadzonepoints","- Reload zone points from database",150,command_reloadzps) ||
|
||||
command_add("reloadzps",nullptr,0,command_reloadzps) ||
|
||||
command_add("zoneshutdown","[shortname] - Shut down a zone server",150,command_zoneshutdown) ||
|
||||
@@ -334,7 +315,6 @@ int command_init(void) {
|
||||
command_add("manaburn","- Use AA Wizard class skill manaburn on target",10,command_manaburn) ||
|
||||
command_add("doanim","[animnum] [type] - Send an EmoteAnim for you or your target",50,command_doanim) ||
|
||||
command_add("randomfeatures","- Temporarily randomizes the Facial Features of your target",80,command_randomfeatures) ||
|
||||
command_add("rf",nullptr,80,command_randomfeatures) ||
|
||||
command_add("face","- Change the face of your target",80,command_face) ||
|
||||
command_add("helm","- Change the helm of your target",80,command_helm) ||
|
||||
command_add("hair","- Change the hair style of your target",80,command_hair) ||
|
||||
@@ -349,7 +329,6 @@ int command_init(void) {
|
||||
command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", 180, command_scribespell) ||
|
||||
command_add("unscribespell", "[spellid] - Unscribe specified spell from your target's spell book.", 180, command_unscribespell) ||
|
||||
command_add("interrupt","[message id] [color] - Interrupt your casting. Arguments are optional.",50,command_interrupt) ||
|
||||
command_add("d1","[type] [spell] [damage] - Send an OP_Action packet with the specified values",200,command_d1) ||
|
||||
command_add("summonitem","[itemid] [charges] - Summon an item onto your cursor. Charges are optional.",200,command_summonitem) ||
|
||||
command_add("si",nullptr,200,command_summonitem) ||
|
||||
command_add("giveitem","[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.",200,command_giveitem) ||
|
||||
@@ -709,77 +688,6 @@ void command_resetaa(Client* c,const Seperator *sep){
|
||||
c->Message(0,"Usage: Target a client and use #resetaa to reset the AA data in their Profile.");
|
||||
}
|
||||
|
||||
void command_sendop(Client *c,const Seperator *sep){
|
||||
|
||||
int RezSpell = 0;
|
||||
|
||||
if(sep->arg[1][0]) {
|
||||
RezSpell = atoi(sep->arg[1]);
|
||||
}
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RezzRequest, sizeof(Resurrect_Struct));
|
||||
Resurrect_Struct *rs = (Resurrect_Struct*)outapp->pBuffer;
|
||||
|
||||
strcpy(rs->your_name, c->GetName());
|
||||
strcpy(rs->rezzer_name, "A Cleric01");
|
||||
rs->spellid = RezSpell;
|
||||
DumpPacket(outapp);
|
||||
c->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
void command_optest(Client *c, const Seperator *sep)
|
||||
{
|
||||
if(sep->IsNumber(1))
|
||||
{
|
||||
switch(atoi(sep->arg[1]))
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_AdventureFinish, sizeof(AdventureFinish_Struct));
|
||||
AdventureFinish_Struct *af = (AdventureFinish_Struct*)outapp->pBuffer;
|
||||
af->win_lose = 1;
|
||||
af->points = 125;
|
||||
c->FastQueuePacket(&outapp);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_AdventureData, sizeof(AdventureRequestResponse_Struct));
|
||||
AdventureRequestResponse_Struct *arr = (AdventureRequestResponse_Struct*)outapp->pBuffer;
|
||||
if(sep->IsHexNumber(2))
|
||||
arr->unknown000 = hextoi(sep->arg[2]);
|
||||
else
|
||||
arr->unknown000 = 0xBFC40100;
|
||||
arr->risk = 1;
|
||||
arr->showcompass = 1;
|
||||
strcpy(arr->text, "This is some text for an adventure packet!\0");
|
||||
arr->timeleft = 60*60;
|
||||
//arr->timetoenter = 30*60;
|
||||
if(sep->IsHexNumber(3))
|
||||
arr->unknown2080=hextoi(sep->arg[3]);
|
||||
else
|
||||
arr->unknown2080=0x0A;
|
||||
arr->x = c->GetY();
|
||||
arr->y = c->GetX();
|
||||
arr->z = c->GetZ();
|
||||
c->FastQueuePacket(&outapp);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
c->SendMarqueeMessage(15, 250, 0, 500, 5000, "Some msg");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void command_help(Client *c, const Seperator *sep)
|
||||
{
|
||||
int commands_shown=0;
|
||||
@@ -838,50 +746,6 @@ void command_serversidename(Client *c, const Seperator *sep)
|
||||
c->Message(0, "Error: no target");
|
||||
}
|
||||
|
||||
void command_testspawnkill(Client *c, const Seperator *sep)
|
||||
{
|
||||
/* EQApplicationPacket* outapp = new EQApplicationPacket(OP_Death, sizeof(Death_Struct));
|
||||
Death_Struct* d = (Death_Struct*)outapp->pBuffer;
|
||||
d->corpseid = 1000;
|
||||
// d->unknown011 = 0x05;
|
||||
d->spawn_id = 1000;
|
||||
d->killer_id = c->GetID();
|
||||
d->damage = 1;
|
||||
d->spell_id = 0;
|
||||
d->type = BASH;
|
||||
d->bindzoneid = 0;
|
||||
c->FastQueuePacket(&outapp);*/
|
||||
}
|
||||
|
||||
void command_testspawn(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->IsNumber(1)) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_NewSpawn, sizeof(NewSpawn_Struct));
|
||||
NewSpawn_Struct* ns = (NewSpawn_Struct*)outapp->pBuffer;
|
||||
c->FillSpawnStruct(ns, c);
|
||||
strcpy(ns->spawn.name, "Test");
|
||||
ns->spawn.spawnId = 1000;
|
||||
ns->spawn.NPC = 1;
|
||||
if (sep->IsHexNumber(2)) {
|
||||
if (strlen(sep->arg[2]) >= 3) // 0x00, 1 byte
|
||||
*(&((uint8*) &ns->spawn)[atoi(sep->arg[1])]) = hextoi(sep->arg[2]);
|
||||
else if (strlen(sep->arg[2]) >= 5) // 0x0000, 2 bytes
|
||||
*((uint16*) &(((uint8*) &ns->spawn)[atoi(sep->arg[1])])) = hextoi(sep->arg[2]);
|
||||
else if (strlen(sep->arg[2]) >= 9) // 0x0000, 2 bytes
|
||||
*((uint32*) &(((uint8*) &ns->spawn)[atoi(sep->arg[1])])) = hextoi(sep->arg[2]);
|
||||
else
|
||||
c->Message(0, "Error: unexpected hex string length");
|
||||
}
|
||||
else {
|
||||
strcpy((char*) (&((uint8*) &ns->spawn)[atoi(sep->arg[1])]), sep->argplus[2]);
|
||||
}
|
||||
EncryptSpawnPacket(outapp);
|
||||
c->FastQueuePacket(&outapp);
|
||||
}
|
||||
else
|
||||
c->Message(0, "Usage: #testspawn [memloc] [value] - spawns a NPC for you only, with the specified values set in the spawn struct");
|
||||
}
|
||||
|
||||
void command_wc(Client *c, const Seperator *sep)
|
||||
{
|
||||
if(sep->argnum < 2)
|
||||
@@ -927,12 +791,6 @@ void command_wc(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void command_numauths(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(0, "NumAuths: %i", zone->CountAuth());
|
||||
c->Message(0, "Your WID: %i", c->GetWID());
|
||||
}
|
||||
|
||||
void command_setanim(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() && sep->IsNumber(1)) {
|
||||
@@ -972,13 +830,6 @@ char buffer[255];
|
||||
#endif
|
||||
}
|
||||
|
||||
void command_crashtest(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(0,"Alright, now we get an GPF ;) ");
|
||||
char* gpf=0;
|
||||
memcpy(gpf, "Ready to crash", 30);
|
||||
}
|
||||
|
||||
void command_getvariable(Client *c, const Seperator *sep)
|
||||
{
|
||||
char tmp[512];
|
||||
@@ -997,71 +848,6 @@ void command_chat(Client *c, const Seperator *sep)
|
||||
c->Message(0, "Error: World server disconnected");
|
||||
}
|
||||
|
||||
void command_showpetspell(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == 0)
|
||||
c->Message(0, "Usage: #ShowPetSpells [spellid | searchstring]");
|
||||
else if (SPDAT_RECORDS <= 0)
|
||||
c->Message(0, "Spells not loaded");
|
||||
else if (Seperator::IsNumber(sep->argplus[1]))
|
||||
{
|
||||
int spellid = atoi(sep->argplus[1]);
|
||||
if (spellid <= 0 || spellid >= SPDAT_RECORDS)
|
||||
c->Message(0, "Error: Number out of range");
|
||||
else
|
||||
c->Message(0, " %i: %s, %s", spellid, spells[spellid].teleport_zone, spells[spellid].name);
|
||||
}
|
||||
else
|
||||
{
|
||||
int count=0;
|
||||
char sName[64];
|
||||
char sCriteria[65];
|
||||
strn0cpy(sCriteria, sep->argplus[1], 64);
|
||||
strupr(sCriteria);
|
||||
for (int i = 0; i < SPDAT_RECORDS; i++)
|
||||
{
|
||||
if (spells[i].name[0] != 0 && (spells[i].effectid[0] == SE_SummonPet || spells[i].effectid[0] == SE_NecPet))
|
||||
{
|
||||
strcpy(sName, spells[i].teleport_zone);
|
||||
strupr(sName);
|
||||
char* pdest = strstr(sName, sCriteria);
|
||||
if ((pdest != nullptr) && (count <=20))
|
||||
{
|
||||
c->Message(0, " %i: %s, %s", i, spells[i].teleport_zone, spells[i].name);
|
||||
count++;
|
||||
}
|
||||
else if (count > 20)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (count > 20)
|
||||
c->Message(0, "20 spells found... max reached.");
|
||||
else
|
||||
c->Message(0, "%i spells found.", count);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef IPC
|
||||
void command_ipc(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() && c->GetTarget()->IsNPC())
|
||||
{
|
||||
if (c->GetTarget()->CastToNPC()->IsInteractive())
|
||||
{
|
||||
c->GetTarget()->CastToNPC()->interactive = false;
|
||||
c->Message(0, "Disabling IPC");
|
||||
}
|
||||
else
|
||||
{
|
||||
c->GetTarget()->CastToNPC()->interactive = true;
|
||||
c->Message(0, "Enabling IPC");
|
||||
}
|
||||
}
|
||||
else
|
||||
c->Message(0, "Error: You must target an NPC");
|
||||
}
|
||||
#endif /* IPC */
|
||||
|
||||
void command_npcloot(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() == 0)
|
||||
@@ -1641,16 +1427,6 @@ void command_timezone(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void command_synctod(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(13, "Updating Time/Date for all clients in zone...");
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_TimeOfDay, sizeof(TimeOfDay_Struct));
|
||||
TimeOfDay_Struct* tod = (TimeOfDay_Struct*)outapp->pBuffer;
|
||||
zone->zone_time.getEQTimeOfDay(time(0), tod);
|
||||
entity_list.QueueClients(c, outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
void command_invul(Client *c, const Seperator *sep)
|
||||
{
|
||||
bool state=atobool(sep->arg[1]);
|
||||
@@ -1714,15 +1490,6 @@ void command_fov(Client *c, const Seperator *sep)
|
||||
c->Message(0, "I Need a target!");
|
||||
}
|
||||
|
||||
void command_manastat(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *target=c->GetTarget()?c->GetTarget():c;
|
||||
|
||||
c->Message(0, "Mana for %s:", target->GetName());
|
||||
c->Message(0, " Current Mana: %d",target->GetMana());
|
||||
c->Message(0, " Max Mana: %d",target->GetMaxMana());
|
||||
}
|
||||
|
||||
void command_npcstats(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() == 0)
|
||||
@@ -5915,19 +5682,6 @@ void command_interrupt(Client *c, const Seperator *sep)
|
||||
c->InterruptSpell(ci_message, ci_color);
|
||||
}
|
||||
|
||||
void command_d1(Client *c, const Seperator *sep)
|
||||
{
|
||||
EQApplicationPacket app(OP_Action, sizeof(Action_Struct));
|
||||
Action_Struct* a = (Action_Struct*)app.pBuffer;
|
||||
a->target = c->GetTarget()->GetID();
|
||||
a->source = c->GetID();
|
||||
a->type = atoi(sep->arg[1]);
|
||||
a->spell = atoi(sep->arg[2]);
|
||||
a->sequence = atoi(sep->arg[3]);
|
||||
app.priority = 1;
|
||||
entity_list.QueueCloseClients(c, &app);
|
||||
}
|
||||
|
||||
void command_summonitem(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!sep->IsNumber(1))
|
||||
@@ -10871,28 +10625,6 @@ void command_picklock(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void command_qtest(Client *c, const Seperator *sep)
|
||||
{
|
||||
|
||||
|
||||
if(c && sep->arg[1][0])
|
||||
{
|
||||
if(c->GetTarget())
|
||||
{
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_Speech, sizeof(Server_Speech_Struct)+strlen(sep->arg[1])+1);
|
||||
Server_Speech_Struct* sem = (Server_Speech_Struct*) pack->pBuffer;
|
||||
strcpy(sem->message, sep->arg[1]);
|
||||
sem->minstatus = c->Admin();
|
||||
sem->type = 1;
|
||||
strncpy(sem->to,c->GetTarget()->GetCleanName(), 64);
|
||||
strncpy(sem->to,c->GetCleanName(), 64);
|
||||
sem->guilddbid = c->GuildID();
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void command_mysql(Client *c, const Seperator *sep)
|
||||
{
|
||||
if(!sep->arg[1][0] || !sep->arg[2][0]) {
|
||||
|
||||
+2
-1
@@ -2960,7 +2960,8 @@ bool EntityList::MakeTrackPacket(Client *client)
|
||||
Group *g = client->GetGroup();
|
||||
|
||||
for (auto it = mob_list.cbegin(); it != mob_list.cend(); ++it) {
|
||||
if (!it->second || it->second == client || !it->second->IsTrackable())
|
||||
if (!it->second || it->second == client || !it->second->IsTrackable() ||
|
||||
it->second->IsInvisible(client))
|
||||
continue;
|
||||
|
||||
MobDistance = it->second->DistNoZ(*client);
|
||||
|
||||
+15
-9
@@ -235,19 +235,24 @@ void Lua_Client::SetBindPoint(int to_zone) {
|
||||
self->SetBindPoint(to_zone);
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, float new_x) {
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, new_x);
|
||||
self->SetBindPoint(to_zone, to_instance);
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, float new_x, float new_y) {
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, new_x, new_y);
|
||||
self->SetBindPoint(to_zone, to_instance, new_x);
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, float new_x, float new_y, float new_z) {
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, new_x, new_y, new_z);
|
||||
self->SetBindPoint(to_zone, to_instance, new_x, new_y);
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, to_instance, new_x, new_y, new_z);
|
||||
}
|
||||
|
||||
float Lua_Client::GetBindX() {
|
||||
@@ -1297,9 +1302,10 @@ luabind::scope lua_register_client() {
|
||||
.def("SetEXP", (void(Lua_Client::*)(uint32,uint32,bool))&Lua_Client::SetEXP)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(void))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,float))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,float,float))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,float,float,float))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,int))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,int,float))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,int,float,float))&Lua_Client::SetBindPoint)
|
||||
.def("SetBindPoint", (void(Lua_Client::*)(int,int,float,float, float))&Lua_Client::SetBindPoint)
|
||||
.def("GetBindX", (float(Lua_Client::*)(void))&Lua_Client::GetBindX)
|
||||
.def("GetBindX", (float(Lua_Client::*)(int))&Lua_Client::GetBindX)
|
||||
.def("GetBindY", (float(Lua_Client::*)(void))&Lua_Client::GetBindY)
|
||||
|
||||
+4
-3
@@ -73,9 +73,10 @@ public:
|
||||
void SetEXP(uint32 set_exp, uint32 set_aaxp, bool resexp);
|
||||
void SetBindPoint();
|
||||
void SetBindPoint(int to_zone);
|
||||
void SetBindPoint(int to_zone, float new_x);
|
||||
void SetBindPoint(int to_zone, float new_x, float new_y);
|
||||
void SetBindPoint(int to_zone, float new_x, float new_y, float new_z);
|
||||
void SetBindPoint(int to_zone, int to_instance);
|
||||
void SetBindPoint(int to_zone, int to_instance, float new_x);
|
||||
void SetBindPoint(int to_zone, int to_instance, float new_x, float new_y);
|
||||
void SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z);
|
||||
float GetBindX();
|
||||
float GetBindX(int index);
|
||||
float GetBindY();
|
||||
|
||||
+148
-1
@@ -1249,6 +1249,152 @@ double lua_clock() {
|
||||
return static_cast<double>(t) / 1000.0;
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
try { \
|
||||
npc_type->name = luabind::object_cast<c_type>(cur); \
|
||||
} \
|
||||
catch(luabind::cast_failed) { \
|
||||
npc_type->size = default_value; \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
npc_type->size = default_value; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define LuaCreateNPCParseString(name, str_length, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
try { \
|
||||
std::string tmp = luabind::object_cast<std::string>(cur); \
|
||||
strncpy(npc_type->name, tmp.c_str(), str_length); \
|
||||
} \
|
||||
catch(luabind::cast_failed) { \
|
||||
strncpy(npc_type->name, default_value, str_length); \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
strncpy(npc_type->name, default_value, str_length); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
void lua_create_npc(luabind::adl::object table, float x, float y, float z, float heading) {
|
||||
if(luabind::type(table) != LUA_TTABLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
NPCType* npc_type = new NPCType;
|
||||
memset(npc_type, 0, sizeof(NPCType));
|
||||
|
||||
|
||||
luabind::adl::index_proxy<luabind::adl::object> cur = table["name"];
|
||||
LuaCreateNPCParseString(name, 64, "_");
|
||||
LuaCreateNPCParseString(lastname, 64, "");
|
||||
LuaCreateNPCParse(cur_hp, int32, 30);
|
||||
LuaCreateNPCParse(max_hp, int32, 30);
|
||||
LuaCreateNPCParse(size, float, 6.0f);
|
||||
LuaCreateNPCParse(runspeed, float, 1.25f);
|
||||
LuaCreateNPCParse(gender, uint8, 0);
|
||||
LuaCreateNPCParse(race, uint16, 1);
|
||||
LuaCreateNPCParse(class_, uint8, WARRIOR);
|
||||
LuaCreateNPCParse(bodytype, uint8, 0);
|
||||
LuaCreateNPCParse(deity, uint8, 0);
|
||||
LuaCreateNPCParse(level, uint8, 1);
|
||||
LuaCreateNPCParse(npc_id, uint32, 1);
|
||||
LuaCreateNPCParse(texture, uint8, 0);
|
||||
LuaCreateNPCParse(helmtexture, uint8, 0);
|
||||
LuaCreateNPCParse(loottable_id, uint32, 0);
|
||||
LuaCreateNPCParse(npc_spells_id, uint32, 0);
|
||||
LuaCreateNPCParse(npc_spells_effects_id, uint32, 0);
|
||||
LuaCreateNPCParse(npc_faction_id, int32, 0);
|
||||
LuaCreateNPCParse(merchanttype, uint32, 0);
|
||||
LuaCreateNPCParse(alt_currency_type, uint32, 0);
|
||||
LuaCreateNPCParse(adventure_template, uint32, 0);
|
||||
LuaCreateNPCParse(trap_template, uint32, 0);
|
||||
LuaCreateNPCParse(light, uint8, 0);
|
||||
LuaCreateNPCParse(AC, uint32, 0);
|
||||
LuaCreateNPCParse(Mana, uint32, 0);
|
||||
LuaCreateNPCParse(ATK, uint32, 0);
|
||||
LuaCreateNPCParse(STR, uint32, 75);
|
||||
LuaCreateNPCParse(STA, uint32, 75);
|
||||
LuaCreateNPCParse(DEX, uint32, 75);
|
||||
LuaCreateNPCParse(AGI, uint32, 75);
|
||||
LuaCreateNPCParse(INT, uint32, 75);
|
||||
LuaCreateNPCParse(WIS, uint32, 75);
|
||||
LuaCreateNPCParse(CHA, uint32, 75);
|
||||
LuaCreateNPCParse(MR, int32, 25);
|
||||
LuaCreateNPCParse(FR, int32, 25);
|
||||
LuaCreateNPCParse(CR, int32, 25);
|
||||
LuaCreateNPCParse(PR, int32, 25);
|
||||
LuaCreateNPCParse(DR, int32, 25);
|
||||
LuaCreateNPCParse(Corrup, int32, 25);
|
||||
LuaCreateNPCParse(PhR, int32, 0);
|
||||
LuaCreateNPCParse(haircolor, uint8, 0);
|
||||
LuaCreateNPCParse(beardcolor, uint8, 0);
|
||||
LuaCreateNPCParse(eyecolor1, uint8, 0);
|
||||
LuaCreateNPCParse(eyecolor2, uint8, 0);
|
||||
LuaCreateNPCParse(hairstyle, uint8, 0);
|
||||
LuaCreateNPCParse(luclinface, uint8, 0);
|
||||
LuaCreateNPCParse(beard, uint8, 0);
|
||||
LuaCreateNPCParse(drakkin_heritage, uint32, 0);
|
||||
LuaCreateNPCParse(drakkin_tattoo, uint32, 0);
|
||||
LuaCreateNPCParse(drakkin_details, uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[0], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[1], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[2], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[3], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[4], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[5], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[6], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[7], uint32, 0);
|
||||
LuaCreateNPCParse(armor_tint[8], uint32, 0);
|
||||
LuaCreateNPCParse(min_dmg, uint32, 2);
|
||||
LuaCreateNPCParse(max_dmg, uint32, 4);
|
||||
LuaCreateNPCParse(attack_count, int16, 0);
|
||||
LuaCreateNPCParseString(special_abilities, 512, "");
|
||||
LuaCreateNPCParse(d_meele_texture1, uint16, 0);
|
||||
LuaCreateNPCParse(d_meele_texture2, uint16, 0);
|
||||
LuaCreateNPCParseString(ammo_idfile, 32, "");
|
||||
LuaCreateNPCParse(prim_melee_type, uint8, 0);
|
||||
LuaCreateNPCParse(sec_melee_type, uint8, 0);
|
||||
LuaCreateNPCParse(ranged_type, uint8, 0);
|
||||
LuaCreateNPCParse(hp_regen, int32, 1);
|
||||
LuaCreateNPCParse(mana_regen, int32, 1);
|
||||
LuaCreateNPCParse(aggroradius, int32, 0);
|
||||
LuaCreateNPCParse(assistradius, int32, 0);
|
||||
LuaCreateNPCParse(see_invis, uint8, 0);
|
||||
LuaCreateNPCParse(see_invis_undead, bool, false);
|
||||
LuaCreateNPCParse(see_hide, bool, false);
|
||||
LuaCreateNPCParse(see_improved_hide, bool, false);
|
||||
LuaCreateNPCParse(qglobal, bool, false);
|
||||
LuaCreateNPCParse(npc_aggro, bool, false);
|
||||
LuaCreateNPCParse(spawn_limit, uint8, false);
|
||||
LuaCreateNPCParse(mount_color, uint8, false);
|
||||
LuaCreateNPCParse(attack_speed, float, 0);
|
||||
LuaCreateNPCParse(attack_delay, uint8, 30);
|
||||
LuaCreateNPCParse(accuracy_rating, int, 0);
|
||||
LuaCreateNPCParse(avoidance_rating, int, 0);
|
||||
LuaCreateNPCParse(findable, bool, false);
|
||||
LuaCreateNPCParse(trackable, bool, false);
|
||||
LuaCreateNPCParse(slow_mitigation, int16, 0);
|
||||
LuaCreateNPCParse(maxlevel, uint8, 0);
|
||||
LuaCreateNPCParse(scalerate, uint32, 0);
|
||||
LuaCreateNPCParse(private_corpse, bool, false);
|
||||
LuaCreateNPCParse(unique_spawn_by_name, bool, false);
|
||||
LuaCreateNPCParse(underwater, bool, false);
|
||||
LuaCreateNPCParse(emoteid, uint32, 0);
|
||||
LuaCreateNPCParse(spellscale, float, 0);
|
||||
LuaCreateNPCParse(healscale, float, 0);
|
||||
LuaCreateNPCParse(no_target_hotkey, bool, false);
|
||||
LuaCreateNPCParse(raid_target, bool, false);
|
||||
LuaCreateNPCParse(probability, uint8, 0);
|
||||
|
||||
NPC* npc = new NPC(npc_type, nullptr, x, y, z, heading, FlyMode3);
|
||||
npc->GiveNPCTypeData(npc_type);
|
||||
entity_list.AddNPC(npc);
|
||||
}
|
||||
luabind::scope lua_register_general() {
|
||||
return luabind::namespace_("eq")
|
||||
[
|
||||
@@ -1435,7 +1581,8 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("enable_recipe", &lua_enable_recipe),
|
||||
luabind::def("disable_recipe", &lua_disable_recipe),
|
||||
luabind::def("clear_npctype_cache", &lua_clear_npctype_cache),
|
||||
luabind::def("clock", &lua_clock)
|
||||
luabind::def("clock", &lua_clock),
|
||||
luabind::def("create_npc", &lua_create_npc)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1924,6 +1924,7 @@ void NPC::ModifyNPCStat(const char *identifier, const char *newValue)
|
||||
else if(id == "PhR") { PhR = atoi(val.c_str()); return; }
|
||||
else if(id == "runspeed") { runspeed = (float)atof(val.c_str()); CalcBonuses(); return; }
|
||||
else if(id == "special_attacks") { NPCSpecialAttacks(val.c_str(), 0, 1); return; }
|
||||
else if(id == "special_abilities") { ProcessSpecialAbilities(val.c_str()); return; }
|
||||
else if(id == "attack_speed") { attack_speed = (float)atof(val.c_str()); CalcBonuses(); return; }
|
||||
else if(id == "atk") { ATK = atoi(val.c_str()); return; }
|
||||
else if(id == "accuracy") { accuracy_rating = atoi(val.c_str()); return; }
|
||||
|
||||
+18
-11
@@ -1023,11 +1023,12 @@ XS(XS_Client_SetBindPoint); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_SetBindPoint)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items < 1 || items > 5)
|
||||
Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, to_zone= -1, new_x= 0.0f, new_y= 0.0f, new_z= 0.0f)");
|
||||
if (items < 1 || items > 6)
|
||||
Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, to_zone= -1, to_instance = 0, new_x= 0.0f, new_y= 0.0f, new_z= 0.0f)");
|
||||
{
|
||||
Client * THIS;
|
||||
int to_zone;
|
||||
int to_instance;
|
||||
float new_x;
|
||||
float new_y;
|
||||
float new_z;
|
||||
@@ -1047,25 +1048,31 @@ XS(XS_Client_SetBindPoint)
|
||||
to_zone = (int)SvIV(ST(1));
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
new_x = 0.0f;
|
||||
if(items < 3)
|
||||
to_instance = 0;
|
||||
else {
|
||||
new_x = (float)SvNV(ST(2));
|
||||
to_instance = (int)SvIV(ST(2));
|
||||
}
|
||||
|
||||
if (items < 4)
|
||||
new_y = 0.0f;
|
||||
new_x = 0.0f;
|
||||
else {
|
||||
new_y = (float)SvNV(ST(3));
|
||||
new_x = (float)SvNV(ST(3));
|
||||
}
|
||||
|
||||
if (items < 5)
|
||||
new_z = 0.0f;
|
||||
new_y = 0.0f;
|
||||
else {
|
||||
new_z = (float)SvNV(ST(4));
|
||||
new_y = (float)SvNV(ST(4));
|
||||
}
|
||||
|
||||
THIS->SetBindPoint(to_zone, new_x, new_y, new_z);
|
||||
if (items < 6)
|
||||
new_z = 0.0f;
|
||||
else {
|
||||
new_z = (float)SvNV(ST(5));
|
||||
}
|
||||
|
||||
THIS->SetBindPoint(to_zone, to_instance, new_x, new_y, new_z);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
@@ -6155,7 +6162,7 @@ XS(boot_Client)
|
||||
newXSproto(strcpy(buf, "SetDeity"), XS_Client_SetDeity, file, "$$");
|
||||
newXSproto(strcpy(buf, "AddEXP"), XS_Client_AddEXP, file, "$$;$$");
|
||||
newXSproto(strcpy(buf, "SetEXP"), XS_Client_SetEXP, file, "$$$;$");
|
||||
newXSproto(strcpy(buf, "SetBindPoint"), XS_Client_SetBindPoint, file, "$;$$$$");
|
||||
newXSproto(strcpy(buf, "SetBindPoint"), XS_Client_SetBindPoint, file, "$;$$$$$");
|
||||
newXSproto(strcpy(buf, "GetBindX"), XS_Client_GetBindX, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetBindY"), XS_Client_GetBindY, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetBindZ"), XS_Client_GetBindZ, file, "$$");
|
||||
|
||||
+159
-2
@@ -8187,6 +8187,158 @@ XS(XS_Mob_GetSpellStat)
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetSpecialAbility); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_GetSpecialAbility)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbility(THIS, special_ability)");
|
||||
{
|
||||
int RETVAL;
|
||||
Mob* THIS;
|
||||
int ability = SvIV(ST(1));
|
||||
dXSTARG;
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSpecialAbility(ability);
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetSpecialAbilityParam); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_GetSpecialAbilityParam)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbilityParam(THIS, special_ability, param)");
|
||||
{
|
||||
int RETVAL;
|
||||
Mob* THIS;
|
||||
int ability = SvIV(ST(1));
|
||||
int param = SvIV(ST(2));
|
||||
dXSTARG;
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSpecialAbilityParam(ability, param);
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_SetSpecialAbility); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_SetSpecialAbility)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbility(THIS, ability, value)");
|
||||
{
|
||||
Mob* THIS;
|
||||
int ability = SvIV(ST(1));
|
||||
int value = SvIV(ST(2));
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSpecialAbility(ability, value);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Mob_SetSpecialAbilityParam); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_SetSpecialAbilityParam)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 4)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbilityParam(THIS, ability, param, value)");
|
||||
{
|
||||
Mob* THIS;
|
||||
int ability = SvIV(ST(1));
|
||||
int param = SvIV(ST(2));
|
||||
int value = SvIV(ST(3));
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSpecialAbilityParam(ability, param, value);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Mob_ClearSpecialAbilities); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_ClearSpecialAbilities)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::ClearSpecialAbilities(THIS)");
|
||||
{
|
||||
Mob* THIS;
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ClearSpecialAbilities();
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Mob_ProcessSpecialAbilities); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_ProcessSpecialAbilities)
|
||||
{
|
||||
dXSARGS;
|
||||
if(items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::ProcessSpecialAbilities(THIS, str)");
|
||||
{
|
||||
Mob* THIS;
|
||||
const char *str = (const char*)SvPV_nolen(ST(1));
|
||||
|
||||
if(sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ProcessSpecialAbilities(str);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@@ -8485,11 +8637,16 @@ XS(boot_Mob)
|
||||
newXSproto(strcpy(buf, "DoArcheryAttackDmg"), XS_Mob_DoArcheryAttackDmg, file, "$$$$$$$");
|
||||
newXSproto(strcpy(buf, "DoThrowingAttackDmg"), XS_Mob_DoThrowingAttackDmg, file, "$$$$$$$");
|
||||
newXSproto(strcpy(buf, "SetDisableMelee"), XS_Mob_SetDisableMelee, file, "$$");
|
||||
newXSproto(strcpy(buf, "IsMeleeDisabled"), XS_Mob_IsMeleeDisabled, file, "$$");
|
||||
newXSproto(strcpy(buf, "IsMeleeDisabled"), XS_Mob_IsMeleeDisabled, file, "$");
|
||||
newXSproto(strcpy(buf, "SetFlurryChance"), XS_Mob_SetFlurryChance, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetFlurryChance"), XS_Mob_GetFlurryChance, file, "$");
|
||||
newXSproto(strcpy(buf, "GetSpellStat"), XS_Mob_GetSpellStat, file, "$$$$");
|
||||
|
||||
newXSproto(strcpy(buf, "GetSpecialAbility"), XS_Mob_GetSpecialAbility, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetSpecialAbilityParam"), XS_Mob_GetSpecialAbilityParam, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetSpecialAbility"), XS_Mob_SetSpecialAbility, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetSpecialAbilityParam"), XS_Mob_SetSpecialAbilityParam, file, "$$$$");
|
||||
newXSproto(strcpy(buf, "ClearSpecialAbilities"), XS_Mob_ClearSpecialAbilities, file, "$");
|
||||
newXSproto(strcpy(buf, "ProcessSpecialAbilities"), XS_Mob_ProcessSpecialAbilities, file, "$$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -172,5 +172,5 @@ void QGlobalCache::LoadBy(const std::string &query)
|
||||
return;
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row)
|
||||
AddGlobal(0, QGlobal(std::string(row[0]), atoi(row[1]), atoi(row[2]), atoi(row[3]), row[4], row[5]? atoi(row[5]): 0xFFFFFFFF));
|
||||
AddGlobal(0, QGlobal(row[0], atoi(row[1]), atoi(row[2]), atoi(row[3]), row[4], row[5] ? atoi(row[5]) : 0xFFFFFFFF));
|
||||
}
|
||||
@@ -1226,7 +1226,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
"WHERE tre.recipe_id IN (%s) "
|
||||
"GROUP BY tre.recipe_id HAVING sum(tre.componentcount) = %u "
|
||||
"AND sum(tre.item_id * tre.componentcount) = %u", buf2.c_str(), count, sum);
|
||||
auto results = QueryDatabase(query);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
|
||||
+3
-1
@@ -755,6 +755,7 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
zoneid = in_zoneid;
|
||||
instanceid = in_instanceid;
|
||||
instanceversion = database.GetInstanceVersion(instanceid);
|
||||
pers_instance = false;
|
||||
zonemap = nullptr;
|
||||
watermap = nullptr;
|
||||
pathing = nullptr;
|
||||
@@ -824,11 +825,12 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
if(!is_perma)
|
||||
{
|
||||
if(rem < 150) //give some leeway to people who are zoning in 2.5 minutes to finish zoning in and get ported out
|
||||
rem = 150;
|
||||
rem = 150;
|
||||
Instance_Timer = new Timer(rem * 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
pers_instance = true;
|
||||
Instance_Timer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
inline const uint32 GetZoneID() const { return zoneid; }
|
||||
inline const uint32 GetInstanceID() const { return instanceid; }
|
||||
inline const uint16 GetInstanceVersion() const { return instanceversion; }
|
||||
inline const bool IsInstancePersistent() const { return pers_instance; }
|
||||
inline const uint8 GetZoneType() const { return zone_type; }
|
||||
|
||||
inline Timer* GetInstanceTimer() { return Instance_Timer; }
|
||||
@@ -274,6 +275,7 @@ private:
|
||||
uint32 zoneid;
|
||||
uint32 instanceid;
|
||||
uint16 instanceversion;
|
||||
bool pers_instance;
|
||||
char* short_name;
|
||||
char file_name[16];
|
||||
char* long_name;
|
||||
|
||||
+22
-17
@@ -1197,21 +1197,21 @@ bool ZoneDatabase::LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Str
|
||||
i = 0;
|
||||
/* Is home bind */
|
||||
if (atoi(row[6]) == 1){
|
||||
pp->binds[4].zoneId = atoi(row[i]); i++;
|
||||
i++; /* Instance ID can go here eventually */
|
||||
pp->binds[4].x = atoi(row[i]); i++;
|
||||
pp->binds[4].y = atoi(row[i]); i++;
|
||||
pp->binds[4].z = atoi(row[i]); i++;
|
||||
pp->binds[4].heading = atoi(row[i]); i++;
|
||||
pp->binds[4].zoneId = atoi(row[i++]);
|
||||
pp->binds[4].instance_id = atoi(row[i++]);
|
||||
pp->binds[4].x = atoi(row[i++]);
|
||||
pp->binds[4].y = atoi(row[i++]);
|
||||
pp->binds[4].z = atoi(row[i++]);
|
||||
pp->binds[4].heading = atoi(row[i++]);
|
||||
}
|
||||
/* Is regular bind point */
|
||||
else{
|
||||
pp->binds[0].zoneId = atoi(row[i]); i++;
|
||||
i++; /* Instance ID can go here eventually */
|
||||
pp->binds[0].x = atoi(row[i]); i++;
|
||||
pp->binds[0].y = atoi(row[i]); i++;
|
||||
pp->binds[0].z = atoi(row[i]); i++;
|
||||
pp->binds[0].heading = atoi(row[i]); i++;
|
||||
pp->binds[0].zoneId = atoi(row[i++]);
|
||||
pp->binds[0].instance_id = atoi(row[i++]);
|
||||
pp->binds[0].x = atoi(row[i++]);
|
||||
pp->binds[0].y = atoi(row[i++]);
|
||||
pp->binds[0].z = atoi(row[i++]);
|
||||
pp->binds[0].heading = atoi(row[i++]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1224,12 +1224,18 @@ bool ZoneDatabase::SaveCharacterLanguage(uint32 character_id, uint32 lang_id, ui
|
||||
}
|
||||
|
||||
bool ZoneDatabase::SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home){
|
||||
if (zone_id <= 0){ return false; }
|
||||
if (zone_id <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Save Home Bind Point */
|
||||
std::string query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i)", character_id, zone_id, instance_id, x, y, z, heading, is_home);
|
||||
LogFile->write(EQEMuLog::Debug, "ZoneDatabase::SaveCharacterBindPoint for character ID: %i zone_id: %u instance_id: %u x: %f y: %f z: %f heading: %f ishome: %u", character_id, zone_id, instance_id, x, y, z, heading, is_home);
|
||||
auto results = QueryDatabase(query); if (!results.RowsAffected()){ std::cout << "ERROR Bind Home Save: " << results.ErrorMessage() << "\n\n" << query << "\n" << std::endl; }
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.RowsAffected()) {
|
||||
LogFile->write(EQEMuLog::Debug, "ERROR Bind Home Save: %s. %s", results.ErrorMessage().c_str(), query.c_str());
|
||||
}
|
||||
ThrowDBError(results.ErrorMessage(), "ZoneDatabase::SaveCharacterBindPoint", query);
|
||||
return true;
|
||||
}
|
||||
@@ -3234,7 +3240,6 @@ bool ZoneDatabase::SetCharacterFactionLevel(uint32 char_id, int32 faction_id, in
|
||||
|
||||
bool ZoneDatabase::LoadFactionData()
|
||||
{
|
||||
|
||||
std::string query = "SELECT MAX(id) FROM faction_list";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@@ -3265,7 +3270,6 @@ bool ZoneDatabase::LoadFactionData()
|
||||
strn0cpy(faction_array[index]->name, row[1], 50);
|
||||
faction_array[index]->base = atoi(row[2]);
|
||||
|
||||
|
||||
query = StringFormat("SELECT `mod`, `mod_name` FROM `faction_list_mod` WHERE faction_id = %u", index);
|
||||
auto modResults = QueryDatabase(query);
|
||||
if (!modResults.Success())
|
||||
@@ -3273,8 +3277,9 @@ bool ZoneDatabase::LoadFactionData()
|
||||
|
||||
for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow)
|
||||
faction_array[index]->mods[modRow[1]] = atoi(modRow[0]);
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::GetFactionIdsForNPC(uint32 nfl_id, std::list<struct NPCFaction*> *faction_list, int32* primary_faction) {
|
||||
|
||||
+9
-5
@@ -71,9 +71,11 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
break;
|
||||
case GateToBindPoint:
|
||||
target_zone_id = m_pp.binds[0].zoneId;
|
||||
target_instance_id = m_pp.binds[0].instance_id;
|
||||
break;
|
||||
case ZoneToBindPoint:
|
||||
target_zone_id = m_pp.binds[0].zoneId;
|
||||
target_instance_id = m_pp.binds[0].instance_id;
|
||||
break;
|
||||
case ZoneSolicited: //we told the client to zone somewhere, so we know where they are going.
|
||||
target_zone_id = zonesummon_id;
|
||||
@@ -717,20 +719,22 @@ void NPC::Gate() {
|
||||
Mob::Gate();
|
||||
}
|
||||
|
||||
void Client::SetBindPoint(int to_zone, float new_x, float new_y, float new_z) {
|
||||
void Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z) {
|
||||
if (to_zone == -1) {
|
||||
m_pp.binds[0].zoneId = zone->GetZoneID();
|
||||
m_pp.binds[0].instance_id = (zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) ? zone->GetInstanceID() : 0;
|
||||
m_pp.binds[0].x = x_pos;
|
||||
m_pp.binds[0].y = y_pos;
|
||||
m_pp.binds[0].z = z_pos;
|
||||
}
|
||||
else {
|
||||
m_pp.binds[0].zoneId = to_zone;
|
||||
m_pp.binds[0].instance_id = to_instance;
|
||||
m_pp.binds[0].x = new_x;
|
||||
m_pp.binds[0].y = new_y;
|
||||
m_pp.binds[0].z = new_z;
|
||||
}
|
||||
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[0].zoneId, 0, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0, 0);
|
||||
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0, 0);
|
||||
}
|
||||
|
||||
void Client::GoToBind(uint8 bindnum) {
|
||||
@@ -741,13 +745,13 @@ void Client::GoToBind(uint8 bindnum) {
|
||||
// move the client, which will zone them if needed.
|
||||
// ignore restrictions on the zone request..?
|
||||
if(bindnum == 0)
|
||||
MovePC(m_pp.binds[0].zoneId, 0.0f, 0.0f, 0.0f, 0.0f, 1, GateToBindPoint);
|
||||
MovePC(m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, 0.0f, 0.0f, 0.0f, 0.0f, 1, GateToBindPoint);
|
||||
else
|
||||
MovePC(m_pp.binds[bindnum].zoneId, m_pp.binds[bindnum].x, m_pp.binds[bindnum].y, m_pp.binds[bindnum].z, m_pp.binds[bindnum].heading, 1);
|
||||
MovePC(m_pp.binds[bindnum].zoneId, m_pp.binds[bindnum].instance_id, m_pp.binds[bindnum].x, m_pp.binds[bindnum].y, m_pp.binds[bindnum].z, m_pp.binds[bindnum].heading, 1);
|
||||
}
|
||||
|
||||
void Client::GoToDeath() {
|
||||
MovePC(m_pp.binds[0].zoneId, 0.0f, 0.0f, 0.0f, 0.0f, 1, ZoneToBindPoint);
|
||||
MovePC(m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, 0.0f, 0.0f, 0.0f, 0.0f, 1, ZoneToBindPoint);
|
||||
}
|
||||
|
||||
void Client::SetZoneFlag(uint32 zone_id) {
|
||||
|
||||
Reference in new issue
Block a user