Compare commits

..

4843 Commits

Author SHA1 Message Date
Xackery cd01ed87df Added missed pet summons 2021-11-23 18:16:22 -08:00
Xackery 8a79994b4e Added more elixir error constants 2021-11-18 09:51:55 -08:00
Xackery 93a661a434 Removed debug line 2021-11-16 17:19:37 -08:00
Xackery 3e8796bb4c Added ElixirSpellCache, #elixircheck 2021-11-16 17:03:42 -08:00
Xackery c23fc4ade7 Added Elixir 2021-11-15 20:55:40 -08:00
Xackery 3b628c1ace Added tweaks to dev containers 2021-11-15 20:54:28 -08:00
JJ 27f8ae3999 [Hotfix] Optional SQL for existing servers (#1756) 2021-11-13 22:15:49 -05:00
JJ 80a891e541 Make room for host names.
Since m_remote_ip_address does not resolve IP address, world server may still use host name.
2021-11-13 20:14:39 -05:00
KayenEQ 776449aa3d [Spells] Update to IsCombatProc checks (#1741)
* Update spells.cpp

* Update spells.cpp

* Update spells.cpp

* Update spells.cpp
2021-11-13 14:47:42 -05:00
JJ cef352f0ac [Bug Fix] Removed unused pointer. Fixes #157. (#1748) 2021-11-13 10:39:35 -05:00
Kinglykrab e8607a0c78 [Commands] Cleanup #checklos Command. (#1744)
- Cleanup message and logic.
2021-11-13 05:25:58 -05:00
Kinglykrab 9c55cf9a8e [Bug Fix] Loginserver Error String Constants. (#1747)
- Constant was named after Windows macro.
2021-11-13 02:00:45 -05:00
Chris Miles a9d1034298 [Loginserver] Worldserver Name Sanitization (#1739)
* Sanitize bad words in server names

* Add config options and enforcement for dev/test servers and servers starting with a special character

* Refine bad word logic

* Add installer to dev/test servers

* Change server prefixes

* Special char prefix

* Formatting

* Remove multi words

* Add server types enum

* Add error constants

* Remove sanitize from world level

* Use strn0cpy
2021-11-12 23:02:05 -06:00
Kinglykrab 8b83a13560 [Rules] Add Archery/Throwing Ammo Consumption Rules. (#1743)
- Add RULE_BOOL(Combat, ArcheryConsumesAmmo, true, "Set to false to disable Archery Ammo Consumption")
- Add RULE_BOOL(Combat, ThrowingConsumesAmmo, true, "Set to false to disable Throwing Ammo Consumption")
2021-11-12 23:04:09 -05:00
hg 3c87480553 [Quest API] Add back removed lua class properties (#1742)
Fixes regression from 7b6decae
2021-11-12 21:16:39 -05:00
Kinglykrab 1a69218045 [Commands] Cleanup #faction Command. (#1716)
* [Commands] Cleanup #faction Command.
- Remove find subcommand as we have #findfaction now.
- Cleanup message.

* Remove #setfaction message.
2021-11-12 18:28:14 -05:00
Kinglykrab e870ee5e0e [Commands] Remove #logtest Command. (#1731)
- Remove unused/deprecated command.
2021-11-12 14:46:05 -06:00
Kinglykrab 908c6c18af [Commands] Cleanup #findnpctype Command. (#1714)
* [Commands] Cleanup #findnpctype Command.
- Cleanup message and logic.

* Logic cleanup, found_count is always greater than 0.

* Fix order.

* Add return.
2021-11-12 09:19:43 -05:00
Kinglykrab f591378ed3 [Commands] Cleanup #viewnpctype Command. (#1713)
* [Commands] Cleanup #viewnpctype Command.
- Create a temporary NPC to use ShowStats() instead.
- Cleanup message.

* Cleanup spawn/emote/textures logic in ShowStats() when unused.

* Formatting.
2021-11-12 08:58:43 -05:00
Kinglykrab 0997a8a31e [Commands] Remove #bug Command. (#1737)
- Remove unused command.
2021-11-12 08:23:22 -05:00
Kinglykrab 0bf6627fb0 [Commands] Remove #crashtest Command. (#1734)
- Remove unused/deprecated command.
2021-11-12 08:19:58 -05:00
Kinglykrab fb8539e679 [Commands] Cleanup #endurance Command. (#1719)
- Add message.
2021-11-12 08:11:45 -05:00
Kinglykrab f8c2e85f3e [Commands] Cleanup #mana Command. (#1718)
* [Commands] Cleanup #mana Command.
- Add message.

* Add self message.
2021-11-12 08:10:43 -05:00
Kinglykrab 110d2a0e10 [Commands] Cleanup #heal Command. (#1717)
* [Commands] Cleanup #heal Command.
- Add message.

* Remove target requirement.

* Add self message.

* Typo.
2021-11-12 08:06:53 -05:00
Kinglykrab 8d9415191a [Commands] Cleanup #reloadquest Command. (#1712)
- Cleanup message and logic.
2021-11-12 07:42:22 -05:00
Kinglykrab 7178a7e55d [Commands] Remove #clearinvsnapshots Command. (#1736)
* [Commands] Remove #clearinvsnapshots Command.
- Remove unused command.

* Web editor conflict fail

Co-authored-by: JJ <3617814+joligario@users.noreply.github.com>
2021-11-12 07:41:46 -05:00
Kinglykrab 9e8d03d92d [Commands] Remove #connectworldserver Command. (#1735)
- Remove unused command.
2021-11-12 05:58:18 -05:00
Kinglykrab f4a70eff43 [Commands] Remove #d1 Command. (#1733)
- Remove unused command.
2021-11-12 05:58:01 -05:00
Kinglykrab f9ec45c7ff [Commands] Remove #ipc Command. (#1732)
- Remove unused command.
2021-11-12 05:57:43 -05:00
Kinglykrab cf8bf9e4fc [Commands] Remove #manastat Command. (#1730)
- Remove unused command.
2021-11-12 05:57:25 -05:00
Kinglykrab 575237d764 [Commands] Remove #mysqltest Command. (#1729)
- Removed unused/deprecated command.
2021-11-12 05:57:09 -05:00
Kinglykrab e12e8df3ef [Commands] Remove #numauths Command. (#1728)
- Remove unused command.
2021-11-12 05:56:50 -05:00
Kinglykrab 8d7b7d6cc4 [Commands] Remove #optest Command. (#1727)
- Remove unused command.
2021-11-12 05:56:32 -05:00
Kinglykrab 6f79ea117c [Commands] Remove #refundaa Command. (#1726)
- Remove unused command.
2021-11-12 05:56:11 -05:00
Kinglykrab 7b022502da [Commands] Remove #qtest Command. (#1725)
- Remove unused command.
2021-11-12 05:55:54 -05:00
Kinglykrab 4a376b7859 [Commands] Remove #testspawn and #testspawnkill Commands. (#1724)
- Remove unused commands.
2021-11-12 05:55:35 -05:00
Kinglykrab 87cdf7feb1 [Commands] Remove #synctod Command. (#1723)
- Remove unused command.
2021-11-12 05:55:06 -05:00
Kinglykrab caf32290b8 [Commands] Remove #sendop Command. (#1722)
- Remove unused command.
2021-11-12 05:54:44 -05:00
JJ 7d495c56b3 [Logs] Show local_address in correct location (#1721) 2021-11-12 05:54:21 -05:00
Kinglykrab dc1c7bb284 [Commands] Remove #serversidename Command. (#1720)
- Remove unused command.
2021-11-12 05:53:44 -05:00
Chris Miles a6c85babfc [Loginserver] Add config option to display player count (#1738)
* [Loginserver] Add config option to display player count

* Update name
2021-11-11 22:38:41 -06:00
hg cbea7045fa [Loginserver] Identify unknown login client packet fields (#1680)
* Add player login reply struct

* Use player login reply struct for failed logins

* Use base message struct for login requests

* Refactor server list reply serialization

Use BaseMessage and BaseReplyMessage structs for server list
and add flags for server type and status

* Use reply message struct for login handshake

Remove client version checks, the packets are the same for titanium and rof2

* Use base headers for join server requests

* Log correct server list ip

* Add compressed flag to base message header

Document encrypt type flag more
2021-11-11 20:13:30 -06:00
KayenEQ 099759c477 [Commands] #tune command rewrite (#1677)
* tune updates

* Update tune.cpp

* tune update

* updates

* updates

* less zero

* update

* up

* u

* Update tune.cpp

* Update tune.cpp

* avoidance working

* accuracy

* save1

* Update tune.cpp

* override

* Removed Old Tune Code

* cleanup1

* up

* finished v1

* Update command.cpp

* Update command.cpp

* spellfix

* Update command.cpp

* remove test command

* added SYNC comments

Hopefully if anyone changes these functions they will change the corresponding tune

* Tune_ to Tune

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-11-11 19:41:59 -06:00
cybernine186 65197ac027 [Rules] Gate /tgb, /autofire and /melody (#1679)
* Rules to negate /tgb, /autofire, and /melody

Created new rules to negate server and client side effects of commands: /tgb, /autofire, and /melody. These commands are enabled by default and can be disabled to enforce a classic EQ experience if using progression style play for example.

Rules
--------------
RULE_BOOL(Character, EnableBardMelody, true, "Enable Bard /melody by default, to disable change to false for a classic experience.")
RULE_BOOL(Character, EnableRangerAutoFire, true, "Enable Ranger /autofire by default, to disable change to false for a classic experience.")
RULE_BOOL(Character, EnableTGB, true, "Enable /tgb (Target Group Buff) by default, to disable change to false for a classic experience.")

* Removed sql query for rules per Mackal recommendation.
2021-11-11 19:41:03 -06:00
Alex e4bd6f5bd2 [Networking] Servertalk Legacy World Connections for Login (#1662)
* servertalk server connections will now attempt to parse legacy connections as well as modern ones

* Some fixes for legacy connections

* Change legacy default from local to eqemu
2021-11-11 19:37:35 -06:00
mmcgarvey acf5836253 [Rules] Add optional rule for lifetap heals (#1689)
What:
	Add toggle for compounding bonuses for lifetap heals.

Why:
	When spell damage and heal amount bonuses are scaled to ludicrous
	levels, this double dip results in very high heals from
	relatively weak lifetaps.

Created new rule:  Spells:CompoundLifetapHeals

If true (default):
	Apply spell damage bonuses to lifetap damage
	Pass that amount through heal bonuses
	Heal for this resulting amount
If false:
	Apply spell damage bonuses to lifetap damage
	Heal for this resulting amount
2021-11-11 19:37:14 -06:00
KayenEQ 17c8e8414c [Spells] Fixed proc rate for Ranged procs (#1715) 2021-11-11 19:27:50 -06:00
KayenEQ 239033a269 [Bug Fix] Prevent critical DOTs from affecting beneficial damage over time (#1710)
* no critical from lich

* better
2021-11-11 18:32:16 -05:00
Kinglykrab fa07064466 [Commands] Cleanup #cvs Command. (#1709)
* [Commands] Cleanup #cvs Command.
- Cleanup message and display.
- Add Total Clients to message.
- Add Unique IPs to message.

* Formatting.

* Formatting.
2021-11-11 16:48:50 -05:00
Kinglykrab 994ef712b2 [Commands] Cleanup #cast Command. (#1706)
* [Commands] Cleanup #cast Command.
- Cleanup message.

* Add optional cast non-instant parameter.
- Fix cast time.

* Fix message.
2021-11-11 16:48:35 -05:00
KayenEQ 33c30d3cbb [Bug Fix] Fix for dual wield animation when same delay weapons. (#1671)
* DW animation fix

* spelling

* better animation

looks better for low skill where dw doesn't fire as often.

* Update attack.cpp
2021-11-10 21:27:51 -05:00
KayenEQ d9c8e80bca [Spells] Allow item click effects to have cast time and recast time modified by focus effects. (#1695)
* prelim

* Spell Focus implemented

* AA implemented

* Update spdat.h

* Update spdat.h

* working

* Update spells.cpp

* prelim excludes

* enum limit expansion

* overhaul

* v2 testing

* updates

* working

* Fin

* Update spell_effects.cpp

* Update spell_effects.cpp

* update

* Update spells.cpp

* fix

* fix

* Update spell_effects.cpp

* remove debugs

* Update spells.cpp
2021-11-10 21:23:49 -05:00
Kinglykrab 990729fe21 [Commands] Cleanup #distance Command. (#1707)
- Cleanup message.
2021-11-10 21:21:06 -05:00
Kinglykrab aac0dd2993 [Commands] Cleanup #setlanguage Command. (#1705)
* [Commands] Cleanup #setlanguage Command.
- Cleanup message and lofic.
- Add GetLanguageName() helper and GetLanguageMap() for future use.

* Optimize GetLanguageName().
2021-11-10 21:20:51 -05:00
Kinglykrab b17c24d2df [Commands] Cleanup #setskill Command. (#1704)
* [Commands] Cleanup #setskill Command.
- Cleanup message and logic.

* Optimize GetSkillName().
2021-11-10 21:20:40 -05:00
Kinglykrab 32d606c667 [Bug Fix] Fix Mob::ShowStats() Proximity Display. (#1708) 2021-11-10 19:48:02 -05:00
Kinglykrab 6661672e2d [Commands] Cleanup #showskills Command. (#1698)
* [Commands] Cleanup #showskills Command.
- Cleanup display and use GetSkillName() helper method.

* Add optional "all" parameter to show all skills.

* Formatting.

* Formatting.

* Target, not c.
2021-11-09 23:24:46 -05:00
Kinglykrab b5391b9110 [Commands] Cleanup #showstats Command. (#1700)
- Convert Mob::ShowStats() to use the #npcstats code and make #npcstats use Mob::ShowStats().
2021-11-09 21:25:42 -05:00
Kinglykrab e306059f43 [Commands] Cleanup #showspellslist Command. (#1703)
- Cleanup messages and display.
2021-11-09 21:24:34 -05:00
Kinglykrab a64e326c68 [Commands] Cleanup #viewzoneloot Command. (#1702)
- Cleanup message logic.
2021-11-09 21:24:25 -05:00
Kinglykrab 605b3d3a27 [Commands] Cleanup #fov Command. (#1701)
- Cleanup message.
2021-11-09 21:24:17 -05:00
Kinglykrab 248e6d44db [Commands] Cleanup #npccast Command. (#1699)
- Cleanup messages and display.
2021-11-09 21:23:48 -05:00
Kinglykrab 328a94e2d4 [Commands] Add #findfaction Command. (#1697)
- Add #findfaction [search criteria] command.
- Cleanup other #find command messages/logic.
- Add GetMaxFaction() helper method.
- Add races.h defines for races 725-732.
2021-11-09 21:23:38 -05:00
Michael Cook (mackal) 211196a722 Fix Channel TellEcho issues (#1676)
These were missed switching them to TellEcho from a previous change
2021-11-09 10:54:54 -05:00
Kinglykrab 0b283e60db [Commands] Remove #listnpcs Command. (#1696)
- Unused command.
2021-11-07 18:32:33 -05:00
Kinglykrab 90871cb3d9 [Commands] Cleanup #worldshutdown Command. (#1694)
- Cleanup system messages and magic numbers.
2021-11-07 17:21:42 -05:00
Kinglykrab bf92845a4a [Rules] Add Resurrection Sickness rules for Characters/Bots. (#1692)
* [Rules] Add Resurrection Sickness rule for Characters/Bots.
- Add RULE_BOOL(Character, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")
- Add RULE_BOOL(Bots, UseOldRaceRezEffects, false, "Older clients had ID 757 for races with high starting STR, but it doesn't seem used anymore")
- Add RULE_BOOL(Bots, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")

* Add rules for spell IDs.

* Fix bot health on spawn when resurrection sickness is disabled.
- Formatting.

* Remove 'this' keyword.
2021-11-07 17:21:34 -05:00
Kinglykrab f8cbc2faed [Commands] Further implement #worldwide functionality. (#1693)
- Add #worldwide remove [Spell ID] - Removes a spell from player buffs worldwide.
- Add #worldwide message [Message] - Sends a worldwide message in Chat::Yellow.
- Add #worldwide move [Zone ID] or #worldwide move [Zone Short Name] - Moves every player in the game to the specified zone.
- Add #worldwide moveinstance [Instance ID] - Moves every player in the game to the specified instance.
- All but `#worldwide message` send a message to sender client.
2021-11-07 17:21:22 -05:00
Kinglykrab 30fdb18945 [Bug Fix] Fix Elemental Illusion spells not using proper texture. (#1691) 2021-11-07 17:21:04 -05:00
Kinglykrab 062fb73f03 [Commands] Remove #test, #spon, and #spoff Commands. (#1686)
- These commands are unused or outdated.
2021-11-07 17:20:55 -05:00
Kinglykrab 194c71727d [Commands] Cleanup #npcstats Command. (#1690)
- Cleanup menu and add stats that were not there before.
- Only display some data if necessary (i.e only show loot/money if they have loot/money)
- Add skill name helper method.
- Add faction name helper method.
- Add Charmed stats and other getter methods.
- Cleanup QueryLoot() method.
2021-11-07 17:20:43 -05:00
Kinglykrab e1de3d2ae0 [Commands] Cleanup #zstats Command. (#1687)
- Add new data from NewZone_Struct to command and clean up display.
2021-11-07 17:15:03 -05:00
KayenEQ 7f497f9d32 [Spells] Implemented SPA 415 SE_FFItemClass (#1688)
* prelim

* Spell Focus implemented

* AA implemented

* Update spdat.h

* Update spdat.h

* prelim excludes

* enum limit expansion

* overhaul

* v2 testing

* updates

* working

* Fin

* Update spell_effects.cpp

* Update spell_effects.cpp

* var fix

* Update spell_effects.cpp

make it not apply to casted spells... oops

* Update spell_effects.cpp

* Update spell_effects.cpp
2021-11-07 16:35:30 -05:00
KayenEQ 1cdb1816a2 [Bug Fix] SOF+ clients item click recast timer not met check (#1682)
* Update client_packet.cpp

* Update spells.cpp

* augs working too
2021-11-06 23:14:36 -04:00
Kinglykrab bc82b897c5 [Commands] Add #emptyinventory Command. (#1684)
* [Commands] Add #emptyinventory Command.
- Allows you empty you or your target's inventory completely. (Equipment, General, Bank, and Shared Bank)
- Fixed an issue not allowing quest::removeitem(item_id, quanity) to remove 0 charge items.
- Fixed an issue not allowing eq.remove_item(item_id, quanity) to remove 0 charge items.

* Update command.cpp

* Update client.cpp
2021-11-06 22:34:04 -04:00
hg beb4de0b45 [Cleanup] Remove unused door variable. (#1685) 2021-11-06 21:57:05 -04:00
KayenEQ 785926a584 [Quest API] Added NPC special ability to modify Riposte/Dodge/Parry/Block chance (#1683)
* Update attack.cpp

* u

* Update attack.cpp

* spellchecked
2021-11-06 21:06:14 -04:00
Natedog2012 5c7972345a [Bug Fix] Fix startzone rule to default players to correct zone when not found … (#1669)
* Fix startzone rule to default players to correct zone when not found in database

* Formatting

Co-authored-by: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com>
2021-11-06 18:22:52 -04:00
Natedog2012 886f00ed50 Fix resetAA to actually remove all AAs except granted AAs (#1681) 2021-11-06 17:36:19 -04:00
Kinglykrab b983fac860 [Quest API] Alphabetize Perl method exports. (#1672)
- Keeps things tidier.
Perl script was used to get this in order easily.
```pl
my @perl_file_types = (
	"bot",
	"client",
	"doors",
	"entity",
	"expedition",
	"groups",
	"hateentry",
	"inventory",
	"mob",
	"npc",
	"object",
	"perlpacket",
	"player_corpse",
	"questitem",
	"raids",
	"spell"
);

foreach my $file_type (sort {$a cmp $b} @perl_file_types) {
	my $perl_file = "perl_$file_type.cpp";
	open my $client_file, '<', $perl_file or die "Cannot open file_name $perl_file";
	{
		local $/;
		$content = <$client_file>;
	}
	close $client_file;

	open my $perl_data_file, ">", "perl_$file_type\_data.cpp";

	my @variables = ();

	foreach my $line (split("\n", $content)) {
		if ($line=~/newXSproto\(/i) {
			$line =~ s/\s+/ /g;
			my @line_data = split(/ /, $line);
			push(@variables, join(" ", @line_data));
		}
	}

	foreach my $variable (sort {$a cmp $b} @variables) {
		$variable =~ s/^ //ig;
		print $perl_data_file "\t$variable\n";
	}

	close $perl_data_file;
}```
2021-11-06 17:36:06 -04:00
Kinglykrab 7b6decaef3 [Quest API] Alphabetize Lua method exports. (#1673)
- Keeps things tidier.
- Removes unnecessary/outdated comments at the top of files.
2021-11-06 17:36:00 -04:00
Kinglykrab 8d8301fbd7 [Commands] Add #findskill [search criteria] Command. (#1674)
* [Commands] Add #findskill [search criteria] Command.
- Allows you to search for skills by ID or partial name.

* Add error message.

* Update command.cpp

* Update command.cpp

* Update command.cpp
2021-11-06 17:35:43 -04:00
Kinglykrab b4aa401210 [Commands] Add #findtask [search criteria] Command. (#1675)
* [Commands] Add #findtask [search criteria] Command.
- Allows you to search for Tasks by ID or partial name.

* Update command.cpp
2021-11-06 17:35:37 -04:00
KayenEQ f1bfd6bc2a [Spells] Implemented SPA 512 SE_Proc_Timer_Modifier, Fixed AA procs not working (#1646)
* update for SPA 511

* remove debugs, AA implemented

* update

* twinprocfix

* AA procs added

* format update

* update

* proctimer limits

* update

* rename function

renamed function
only check for buffs value > 0, don't need to check for AA's which are negative ID's

* pre merge

* variable updates

* Update spell_effects.cpp

* var rename

update var name to better represent its function.

* updated proc struct

added reuse timer

* reuse timer to spell procs

* updates

* debug remove

* Update mob.cpp

* fix

* merge
2021-11-05 14:14:11 -04:00
KayenEQ 8c95323728 [Spells] Update to Charm target restriction code (#1666)
* charm target restrictions

* fixed

* Update spells.cpp

* Update spells.cpp

* Update spells.cpp

only send spell bar when we have to, avoid potential exploit.

* logs
2021-11-05 10:39:17 -04:00
KayenEQ 5874deeffc Update spell_effects.cpp (#1670) 2021-11-03 21:07:45 -04:00
KayenEQ 18cc648c8d Update spell_effects.cpp (#1668) 2021-11-03 19:01:08 -04:00
Kinglykrab 9d515b20f2 [Quest API] Simplify bulk Scribe and Train logic. (#1660)
* [Quest API] Simplify bulk Scribe and Train logic.
- Add $client->GetFreeDisciplineSlot(starting_slot) to Perl.
- Add $client->ScribeSpells(min_level, max_level) to Perl.
- Add $client->LearnDisciplines(min_level, max_level) to Perl.
- Add client:GetNextAvailableDisciplineSlot(starting_slot) to Lua.
- Add client:ScribeSpells(min_level, max_level) to Lua.
- Add client:LearnDisciplines(min_level, max_level) to Lua.
Convert quest::scribespells() and quest::traindisc() to use new ScribeSpells and LearnDisciplines methods for consistency.

* Update command.cpp
2021-11-03 18:31:13 -04:00
Kinglykrab 17aaab1f9d [Quest API] Add Spell methods to Perl. (#1631)
* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
2021-11-03 17:47:15 -04:00
Chris Miles 6e26e8953c [Loginserver] Health Checks (#1665)
* Health checks stash

* Healthcheck work
2021-11-03 14:39:51 -05:00
Natedog2012 e4138b871b [Rules] Add optional rules for HealAmt and SpellAmt to scale DoTs/HoTs. (#1661)
* Add optional rules for itembonuses HealAmt and SpellAmt to scale for DoTs/HoTs

* Fix typo

* Only 1 rulecheck

* Apply +healingitems and +dmgitems after focus effects so they scale properly

* Fix dots / hots to not always use PVPScaling for extra_dmg / extra_healing

Adjust +healamt and +spelldmg to scale over the full duration of the spell, Thanks Kayen
2021-11-02 15:12:07 -05:00
splose 4ac525afc2 [Rules] Missing Character:TradeskillUpTailoring (#1667) 2021-11-02 12:57:16 -05:00
Chris Miles 05782433b8 [Loginserver] Add some resiliency to LS requests (#1663) 2021-11-02 00:19:13 -05:00
KayenEQ 9af7122b1d [BugFix] Remove potential nullptrs in Virus Code (#1658) 2021-10-31 00:06:32 -05:00
Chris Miles 9e7a763482 [Charm] Push up fragments of Kayen's PR back up (#1659) 2021-10-31 00:04:48 -05:00
Akkadius 1231d44b55 Revert "[BugFix] Charm Targeting and other issues. (#1655)"
This reverts commit df3161455a.
2021-10-30 22:18:40 -05:00
hg 873f1f7f34 [Hotfix] Add include to fix windows build (#1657) 2021-10-30 21:11:04 -05:00
Chris Miles d87db648c3 [Loginserver] Code Cleanup and Tweaks (#1653)
* if for whatever reason the world server is not sending an address, use the local address it sends

* Log when world is sending loginserver info

* Force legacy mode when login host is login.eqemulator.net to avoid misconfigurations at least until things change

* Add human IP translation to log messages

* Sanitize world server name

* Code cleanup and renaming member variables

* More cleanup

* Remove this->

* Validation constants

* Key worldserver lookups by both longname and shortname both

* Update allowed character list

* Fix short_name API response field; add world_id to response

* Shorten receiver verbosity

* Remove unnecessary member variables from database and rename database to m_database

* Adjust MAX_SERVER_VERSION_LENGTH

* Fix indents
2021-10-30 19:09:42 -05:00
Chris Miles 119c3d14b7 [Hotfix] Gate some new shared task logic behind task rule (#1656) 2021-10-30 19:06:38 -05:00
Chris Miles 3cda32c213 [Saylinks] In-Memory Saylink Lookups (#1644)
* Implement saylink memory lookups (performance)

* Ignore commands
2021-10-30 17:32:59 -05:00
KayenEQ df3161455a [BugFix] Charm Targeting and other issues. (#1655)
* fix for target change bug on client

* Update spell_effects.cpp
2021-10-30 16:48:55 -05:00
KayenEQ 4389f84ea5 [BugFix] Fix for bard song instrument mod formula from recent update (#1654)
* Update spell_effects.cpp

* Update spell_effects.cpp

* Update spell_effects.cpp
2021-10-30 08:50:15 -04:00
Chris Miles f9855fd097 [Rez] Fix Z during Resurrection (#1648) 2021-10-30 00:54:44 -05:00
Chris Miles f912814e13 [Commands] Fix Z on #spawnfix (#1647)
* Fix Z on spawnfix

* Slight adjustment
2021-10-30 00:54:33 -05:00
Paul Coene 5738958a2a Fix issue with droplimit code (#1650) 2021-10-28 14:43:40 -04:00
Michael Cook (mackal) d36d11653a Fix issue with new summmon method putting players OOB (#1649)
The FindClosestZ was finding the Z above them ... lets try just not
doing that for now :)
2021-10-27 23:42:31 -04:00
Chris Miles 7230714cbc [Spells/Disciplines] Bulk Train / Scribe (#1640)
* Bulk scribe spells

* Add bulk disc training

* Remove bulk from non bulk method

* PR adjustments
2021-10-27 21:45:27 -04:00
Chris Miles 6e5bf4b941 [Saylinks] Multiple saylinks in brackets (#1643)
* Saylink edge case where multiple saylinks show up within a bracket

* Update partial
2021-10-27 00:01:37 -05:00
KayenEQ fb66afd565 [Spells] Implemented SPA 511 SE_Ff_FocusTimerMin (#1645)
* update for SPA 511

* remove debugs, AA implemented

* update

* format update

* rename function

renamed function
only check for buffs value > 0, don't need to check for AA's which are negative ID's

* var rename

update var name to better represent its function.
2021-10-26 21:36:10 -04:00
Chris Miles ef5124d756 [Shared Tasks] World Reload Task Data on #task reloadall (#1641) 2021-10-24 21:53:29 -05:00
KayenEQ 987de17e93 [Spells] Rework for SPA 413 SE_FcBaseEffects and Bard updates (#1629)
* baseline start

* update1

* updates

* base effect implemented for bard

* instrument mod updates

amplification amps itself

* updates

* updates

* debug

* base effect updates

* baseeffects for spell focus updated

* update skill attack baseeffects

* focus will remain for quest functions

* song cap mod added back in

* remove debugs1

* fix cr

* base effects functionalish

* remove debug

* Update client_mods.cpp

* spdat instrumentmod

* Update spell_effects.cpp

* Update spdat.h

* remove new instrument mod check

split PR
2021-10-24 18:38:28 -05:00
KayenEQ 060be606e7 [Spells] Rework of Virus Effect code (#1593)
* start of rework

* functional

* virus updates

* Update npc.cpp

* updates

* updates

* update v2

* pre remove old code

* removed old code1

* remove debugs

* description

* Update spell_effects.cpp

* changed function name

* remove unused var

* merge error fix

* fix formating issue

* Update spdat.cpp

* Update spell_effects.cpp

* Convert virus entity range code to use vectors and GetCloseMobList

* Formatting [skip ci]

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-10-24 18:27:51 -05:00
Kinglykrab 1c5f9f2e0f [Bug Fix] Fix possible #proximity crash. (#1639) 2021-10-24 17:50:43 -04:00
Paul Coene 62253cc016 [Bug Fix] Edge cases where min_drop 1 not honored with valid choices (#1617)
* [Bug Fix] Edge cases where min_drop 1 not honored with valid choices

* Forgot header file change.

* Remove verbose option from MeetsLootDropLevelRequirements per @akka

* Fix spacing

* Restore verbose mode after further consideration

* Remove logging on counting of valid items

Co-authored-by: Noudess <noudess@gmail.com>
2021-10-24 16:17:42 -05:00
KayenEQ 0b18671e91 [Spells] Update to how Bard Instrument mods are applied to spell effects (#1628)
* new instrument mod spell effect checks

PR split

* format

* Update spdat.cpp

correction, all direct damage spells get modifiers. Made a mistake with the parse, was using wrong mod.

* restriction changes

cure effects can be modified.
decided to keep a list of known effects that are not modified to return false. and will keep the default to be true for anything as to not inhibit custom bard song development

* SE_ProcChance is modified

* Update spdat.cpp

* update

* Update spell_effects.cpp
2021-10-24 16:07:25 -05:00
Kinglykrab c98f3cfb4c [Quest API] Further char array cleanup. (#1634)
- Cleans up the rest of the char arrays used when exporting to events.
- Converts all events to use a similar variable name for export `export_string`.
- Needless calls to .c_str() removed.
2021-10-24 16:06:22 -05:00
Kinglykrab 624d11de4e [Bug Fix] Fix missing format in client message. (#1637) 2021-10-24 17:03:24 -04:00
Logan 5eb95a95d0 [Rules] Added rule to extend max race id (#1630)
* Added rule to extend max race id

* Cleaned fmt of MaxRaceID

* Added format command

* Updated MaxRaceID default to be 732
2021-10-24 15:53:49 -05:00
JJ da01156673 Update 2021_03_03_instance_safereturns.sql (#1636) 2021-10-24 11:53:23 -04:00
KayenEQ 6a244f16e1 Update spells.cpp (#1635) 2021-10-24 11:08:21 -04:00
KayenEQ 36d10462f7 [Combat] Updates to IMMUNE_MELEE_NONMAGICAL mechanics (#1616)
* pre remove debug

* Update attack.cpp

* Update attack.cpp

* Update attack.cpp

* Update attack.cpp

* apply to temp pets

* format fix

* changed to just use one rule

Merged into NPC's and Pet's into one rule.
2021-10-22 22:39:37 -04:00
Natedog2012 c30dbf6628 [Bug Fix] Do not check tics remaining on non-buff spells (#1633) 2021-10-22 17:16:56 -04:00
splose 657cbbcabe define caster to fix a crash from #1618 (#1632) 2021-10-22 13:48:15 -04:00
Kinglykrab 81e7cf5a32 [Quest API] Convert Spell Events to similar formats and exports. (#1618)
* [Quest API] Convert Spell Events to similar formats and exports.
Export spell ID, caster ID, caster level, tics remaining, and buff slot to Perl/Lua spell events.
- Export e.buff_slot, e.caster_id, e.caster_level, e.spell_id, and e.tics_remaining to `event_spell_buff_tic`, `event_spell_effect`, and `event_spell_fade` in Lua.
- Export $buff_slot, $caster_id, $caster_level, $spell_id, $tics_remaining to `EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT`, `EVENT_SPELL_EFFECT_BUFF_TIC_NPC`, `EVENT_SPELL_EFFECT_CLIENT`, `EVENT_SPELL_EFFECT_NPC`, and `EVENT_SPELL_FADE` in Perl.

* Formatting.

* Remove debug variable.
2021-10-20 16:02:12 -04:00
Kinglykrab edf298685e [Quest API] Convert all char arrays to strings. (#1612)
* [Quest API] Convert all char arrays to strings.
Also change multiple loops for zone controller to one loop.

* Remove 'this' keyword'
2021-10-20 15:59:28 -04:00
Kinglykrab efab0c4b6b [Quest API] Add remove LDoN Win/Loss to Perl and Lua. (#1611)
* [Quest API] Add remove LDoN Win/Loss to Perl and Lua.
- Add $client->RemoveLDoNLoss(theme_id) to Perl.
- Add $client->RemoveLDoNWin(theme_id) to Perl.
- Add quest::removeldonloss(theme_id) to Perl.
- Add quest::removeldonwin(theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyclientname(client_name, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyclientname(client_name, theme_id) to Perl.
- Add quest::worldwideaddldonloss(theme_id, min_status, max_status) to Perl.
- Add quest::worldwideaddldonwin(theme_id, min_status, max_status) to Perl.
- Add client:RemoveLDoNLoss(theme_id) to Lua.
- Add client:RemoveLDoNWin(theme_id) to Lua.
- Add eq.remove_ldon_loss(theme_id) to Lua.
- Add eq.remove_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_client_name(client_name, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_client_name(client_name, theme_id) to Lua.
- Add eq.world_wide_add_ldon_loss(theme_id, min_status, max_status) to Lua.
- Add eq.world_wide_add_ldon_win(theme_id, min_status, max_status) to Lua.
Adds enum for LDoN Themes and Theme Bitmasks so we're not using magic numbers.
Adds item links to item messages and augment messages on rejection/restriction/Lore.

* Update client_packet.cpp

* Update client_packet.cpp

* Update servertalk.h

Alphabetical.
2021-10-20 15:11:14 -04:00
Kinglykrab c838564023 [Bug Fix] Fix OpenSSL Support for Windows (#1625) 2021-10-19 22:28:10 -05:00
Chris Miles d197ee631e [Saylinks] Fix auto saylink injection edge cases (#1620)
* Fix auto saylink injection edge cases

* Add even more resiliency to edge cases

* Move to split based injection

* Add some constants
2021-10-19 22:25:13 -05:00
Kinglykrab 3dcddcba04 [Quest API] Add GetHateRandomBot(), GetHateRandomClient(), and GetHateRandomNPC() to Perl/Lua. (#1613)
- Add $mob->GetHateRandomBot() to Perl.
- Add $mob->GetHateRandomClient() to Perl.
- Add $mob->GetHateRandomNPC() to Perl.
- Add mob:GetHateRandomBot() to Lua.
- Add mob:GetHateRandomClient() to Lua.
- Add mob:GetHateRandomNPC() to Lua.
2021-10-17 23:41:10 -04:00
Natedog2012 7823ff5336 [Quest API] Add EVENT_LOOT_ZONE to zone_controller (#1608)
* Add EVENT_LOOT_ZONE to zone_controller

* Fix porting event_loot_zone to lua API

* Remove extra spacing and remove forced message to allow for scripted responses.

* Allow all script parsing to fire before sending a failed lootitem, add corpse_id

* Only search for zone_controller once
2021-10-16 23:19:19 -05:00
Chris Miles 11c335a015 [DiaWind] Tag Adjustments for title, button_one, button_two (#1610)
* Add a consistent way to handle a few different tags

* Simplify logic further
2021-10-16 21:35:03 -05:00
Kinglykrab 07d96ad921 [Bug Fix] Fix Character Recast Type -1 saving to database. (#1598) 2021-10-16 15:10:42 -04:00
Kinglykrab 5d522b149b [Bug Fix] Allow invisible to be cast on Raid Group members. (#1607)
When `Spells:InvisRequiresGroup` was true, you could only cast on Group members, intended functionality is to cast on Group members and/or people in your Raid Group.
2021-10-16 08:56:38 -04:00
splose 234bd89ed5 Merge pull request #1609 from KayenEQ/npcMagicAttack2
hotfix for PR #1606 (IMMUNE MELEE NONMAGICAL)
2021-10-16 00:38:06 -04:00
KayenEQ af5cfb9bed [Spells] Fix to prevent Charmed Pets from continuing fight target if owner is dead. (#1600)
* Fix for charm break if pet owner dead

* fix, can't check hatelist it is already wiped.

* Update spell_effects.cpp
2021-10-16 00:22:07 -04:00
KayenEQ 426f9c337b hotfix 2021-10-16 00:10:54 -04:00
KayenEQ 5235dcee95 Fix Immune Melee Nonmagical logic (#1606) 2021-10-15 20:46:57 -04:00
Paul Coene 203ba2d340 [Bug Fix] Urgent - Previous fix for TimeSync on static zones broke dynamic zones. (#1605)
* [BugFix] Urgent - Previous fix for TimeSync on static zones broke dynamic zones

* Use local variable instead of inline accessor for consistancy.

Co-authored-by: Noudess <noudess@gmail.com>
2021-10-15 13:17:51 -04:00
KayenEQ 9c67421ccc quick fix for persistent effects fading (#1604) 2021-10-15 09:04:14 -04:00
KayenEQ 6669fc8214 [Bug Fix] Healing pets not correctly dropping out of combat status (#1603)
* Fix for pets not correctly triggering in combat timers

* Update spells.cpp
2021-10-14 23:30:34 -04:00
Paul Coene cef873f793 [BugFix] Remove detection of client pets from Sense[Summoned|Undead|Animal] spells (#1601)
* Remove detection of client pets from Sense[Summoned|Undead|Animal]

* Use IsPetOwnerClient() function instead of individual checks

* Add option to exclude client pets from GetClosestMobByBodyType

* Add parameter

Co-authored-by: Noudess <noudess@gmail.com>
2021-10-14 10:52:29 -04:00
KayenEQ 6a962f2591 [Spells] Update SPA158 Reflect (#1590)
* update

* updates

* updates

* update

* update

* Update ruletypes.h

* Apply extra spell dmg

Mob with the reflect effect apply its Extra Spell Damage from item stat to the reflected spell.
Updated portion of formula for extra damage based on live parsing.

* correct formula
2021-10-12 15:30:36 -04:00
Kinglykrab 91adf9c0eb [Quest API] Add cross zone and world wide dialogue windows to Perl/Lua. (#1599)
* [Quest API] Add cross zone and world wide dialogue windows to Perl/Lua.
- Add quest::crosszonedialoguewindowbycharid(character_id, message) to Perl.
- Add quest::crosszonedialoguewindowbygroupid(group_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyraidid(raid_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyguildid(guild_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyexpeditionid(expedition_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyclientname(client_name, message) to Perl.
- Add quest::worldwidedialoguewindow(message, min_status, max_status) to Perl.
- Add eq.cross_zone_dialogue_window_by_char_id(character_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_group_id(group_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_raid_id(raid_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_guild_id(guild_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_expedition_id(expedition_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_client_name(client_name, message) to Lua.
- Add eq.world_wide_dialogue_window(message, min_status, max_status) to Lua.

* Use string instead.
2021-10-11 16:33:18 -04:00
hg 9887580f9a Make columns in doors table not nullable (#1597)
This makes the float and integer fields in the doors table not nullable.
The only column this should affect is the buffer column which wasn't
being loaded in the old doors loading query. The other columns weren't
validated but they should still be made not nullable to avoid issues.

This will fix a crash in potimeb which is the only zone that had NULL
values in the buffer column with the current peq database. This column
can be removed in a future followup since it isn't being used anyway.
2021-10-09 13:45:38 -04:00
KayenEQ b7c62b5242 Merge pull request #1592 from KayenEQ/updateSPA157SpellDS
[Spells] Update to SPA 157 Spell Damage Shield
2021-10-09 12:05:15 -04:00
KayenEQ 89a40272c6 Merge pull request #1588 from KayenEQ/spa154and209updates
[Spells] Update to SPA 154 and SPA 209 Dispel Bene/Detrimental
2021-10-09 00:57:42 -04:00
Chris Miles db369c98c8 [HP Updates] Fix for Titanium clients not being updated properly by removing client version check (#1596) 2021-10-08 21:04:19 -07:00
KayenEQ 10ba5d6046 Merge pull request #1595 from KayenEQ/instanthealbug1
[Spells] Hotfix for healing code error from recent commit.
2021-10-08 18:54:54 -04:00
KayenEQ dd1a869531 hotfix 2021-10-08 18:43:47 -04:00
KayenEQ a9e23cf83a Merge pull request #1594 from KayenEQ/fixExtraSpellAmt
[Spells] Minor fix to Item Extra Spell Damage Amt formula
2021-10-08 18:00:46 -04:00
KayenEQ 783c12590e minor fix
was not correct, was comparing negative to a positive
2021-10-08 13:14:39 -04:00
Kinglykrab 6689b57a52 [Commands] Convert item ID search to use saylinks similar to name search. (#1589) 2021-10-08 05:41:37 -04:00
Paul Coene 7029c699a0 Merge pull request #1591 from noudess/aggro
[Bug Fix] always_aggro flag needed to be checked on assist
2021-10-07 16:25:51 -04:00
KayenEQ 3b9574af14 fix 2021-10-05 16:59:07 -04:00
Noudess 740f84dc22 always_aggro flag needed to be checked on assist 2021-10-05 15:51:22 -04:00
KayenEQ 55d45f9a98 updates 2021-10-05 15:50:26 -04:00
Cole-SoD 61d1eeab6f Minor corrections (#1582) 2021-10-04 17:26:02 -04:00
Kinglykrab 133c1e866c [Bug Fix] Send appearance wasn't setting size properly when changing races. (#1586) 2021-10-04 17:25:51 -04:00
Kinglykrab b730461894 [Bug Fix] Trim output in hidden dialogue response. (#1587) 2021-10-04 17:25:21 -04:00
KayenEQ 8b08e22dbc removed unused function 2021-10-04 14:33:20 -04:00
KayenEQ fc7c99fb0a Update spdat.h 2021-10-04 11:14:56 -04:00
KayenEQ f1d267bb2d Update spell_effects.cpp 2021-10-04 08:31:52 -04:00
Kinglykrab 07664eedc0 [Bug Fix] Trim trailing whitespace off output in Popup. (#1584) 2021-10-03 14:51:12 -04:00
hg 64b8d7c874 Remove unnecessary includes (#1585)
The include order here was causing a compile error when building with
perl 5.12 due to a bad interaction with the older fmt submodule version
being used
2021-10-03 13:25:49 -04:00
Kinglykrab ccab07bd66 [Dialogue] Add hidden response support. (#1583)
Allows operators to hide responses.
Syntax is `hiddenresponse`.
2021-10-03 13:06:39 -04:00
Kinglykrab 3a76d9a28e [Bug Fix] Dialogue Window Name replace. (#1581)
{name} was being replaced with the string "$name" because Perl would parse it properly, but when used here it doesn't return the client's name.
2021-10-03 13:06:31 -04:00
Kinglykrab 5720a5020d [Quest API] Add attuned/augment support to client->SummonBaggedItems() in Perl/Lua. (#1580)
Perl Example:
```pl
my @bag_items = (
      { item_id => 33649, charges => 1, attuned => 1, augment_one => 32940 }
    );
```

Lua Example:
```lua
local bag_items = {
	{ item_id = 33649, charges = 1, attuned = 1, augment_one = 32940 }
}
2021-10-02 19:35:35 -04:00
Kinglykrab b3e9e2099a [Quest API] Add GetIPExemption(), GetIPString(), and SetIPExemption(exemption_amount) to Perl/Lua.
- Add $client->GetIPExemption() to Perl.
- Add $client->GetIPString() to Perl.
- Add $client->SetIPExemption(exemption_amount) to Perl.
- Add client:GetIPExemption() to Lua.
- Add client:GetIPString() to Lua.
- Add client:SetIPExemption(exemption_amount) to Lua.

Will make plugin::IP unnecessary and allow people to get readable IP string easier, as well as set/get IP exemptions from Perl and Lua.
2021-10-02 13:39:32 -04:00
Kinglykrab 93acf50bb4 [Quest API] Add client->ReadBookByName(book_name, book_type) to Perl/Lua.
- Add $client->ReadBookByName(booK_name, book_type) to Perl.
- Add client:ReadBookByName(booK_name, book_type) to Lua.
- Allows server operators to put books in to their database and read from their database instead of storing the values in a script, also allows them to read pre-existing books using a script.
2021-10-02 13:09:30 -04:00
Kinglykrab ff46a854f9 [Quest API] Add LavaDamage and MinLavaDamage to UpdateZoneHeader in Perl/Lua. (#1578)
Allows operators to modify lava damage dynamically.
2021-10-02 12:01:54 -04:00
Kinglykrab 8c5f26ca5e [Quest API] Add IsNPCSpawned(npc_ids) and CountSpawnedNPCs(npc_ids) to Perl/Lua. (#1570)
- Add quest::isnpcspawned(npc_ids) to Perl.
- Add quest::countspawnednpcs(npc_ids) to Perl.
- Add eq.is_npc_spawned(npc_ids) to Lua.
- Add eq.count_spawned_npcs(npc_ids) to Lua.
2021-10-02 12:01:39 -04:00
hg 5560b198ca [Quest API] Add client->SummonBaggedItems(bag_item_id, bag_items_ref) to Perl/Lua.
Alternative apis using arrays of hash items for EQEmu/Server#1575

Perl usage:
```pl
    # create as an array, pass as reference
    my @bag_items = (
      { item_id => 1001, charges => 1 },
      { item_id => 1002, charges => 1 },
      { item_id => 10037, charges => 10 },
    );
    $client->SummonBaggedItems(17403, \@bag_items);

    # create directly as an array reference
    my $bag_items = [
      { item_id => 1001, charges => 1 },
      { item_id => 1002, charges => 1 },
      { item_id => 10037, charges => 10 },
    ];
    $client->SummonBaggedItems(17403, $bag_items); ```

Lua Usage:
```lua
    local bag_items = {
      { item_id = 1001, charges = 1 },
      { item_id = 1002, charges = 1 },
      { item_id = 10037, charges = 10 }
    }
    e.other:SummonBaggedItems(17403, bag_items);
2021-10-02 12:00:00 -04:00
Chris Miles 9a413cf553 [Shared Tasks] Task Kill Update Fix (#1573)
* Revert "Revert "Shared task kill update fix""

This reverts commit 859751f74d.

* Swap return for continue in this context

* Slight tweak

* Slight tweak

* Remove no longer needed task methods

* Update scope for IncrementDoneCount

* Create helper method Client::GetPartyMembers() and add client->HasTaskState()

* Move HandleUpdateTasksOnKill responsibility to TaskManager

* Remove unnecessary pointer
2021-10-01 20:57:00 -07:00
Kinglykrab bb5c491794 [Dialogue] Add support for Dialogue Window titles. (#1563)
* [Dialogue] Add support for Dialogue Window titles.
- Custom title allows defaults to be overridden where necessary, like a leaderboard or something.
- Default target to client in case people want to send Dialogue Windows from current client.

* Fix possible issue with markdown.
- Example: Using the word "title" or using any identifier and forgetting the colon.
2021-10-01 22:20:15 -05:00
Kinglykrab 2f5d360e53 [Quest API] Add UntrainDiscBySpellID(spell_id, update_client) to Perl/Lua. (#1565)
- Add $client->UntrainDiscBySpellID(spell_id, update_client) to Perl.
- Add client:UntrainDiscBySpellID(spell_id, update_client) to Lua.
2021-10-01 22:14:56 -05:00
hg 92e03dccb9 [Quest API] Add perl hash apis for dz creation (#1571)
Add hash overload to perl CreateExpedition api

  This adds an api to perl similar to the Lua api that accepts a reference
  to a hash table with expedition creation info

  Usage example:
    my $expedition_info = {
      expedition => { name => "Perl expedition", min_players => 2, max_players => 6 },
      instance   => { zone => "crushbone", version => 0, duration => 3600 },
      compass    => { zone => "gfaydark", x => 238, y => 987, z => -24.90 },
      safereturn => { zone => "gfaydark", x => 245.84, y => 987.93, z => -27.6, h => 484.0 },
      zonein     => { x => 479.44, y => -500.18, z => 5.75, h => 421.8 }
    };

    $client->CreateExpedition($expedition_info);

  Syntax for passing directly from a hash:
    my %expedition_info = (...);
    $client->CreateExpedition(\%expedition_info);

Add CreateTaskDynamicZone api to perl

  Usage example:
    sub EVENT_TASKACCEPTED {
      if ($task_id == 4795) {
        my %dz_hash = (
          "instance",   { zone=>"thundercrest", version => 11 },
          "compass",    { zone=>"broodlands", x=>1241.88, y=>511.147, z=>23.4192 },
          "safereturn", { zone=>"broodlands", x=>1242.0, y=>526.0, z=>27.0, h=>0.0 }
        );
        $client->CreateTaskDynamicZone($task_id, \%dz_hash)
      }
    }
2021-10-01 22:12:45 -05:00
hg 5ffe6284ca [Shared Tasks] Start solo task replay timers from completion time (#1568)
Shared tasks start replay timers based on accept time but solo tasks
should start from completion time. Solo tasks on live that have a
non-unlimited duration may require further investigation
2021-10-01 22:11:57 -05:00
hg fb98349bbd [Quest API] Add mob SetPet and RemovePet quest apis (#1569)
Will be required for tutoriala script and other similar events
2021-10-01 22:11:16 -05:00
hg 00a22ca12e [Repositories] Use repositories to load doors (#1572)
Remove Door struct that was being used to map db columns
2021-10-01 22:09:40 -05:00
Chris Miles 3883adcefc [Dialogue Window / Saylinks] Missing Changes (#1574)
* Implement auto saylink injection

* Cover Lua say since it takes a different code path

* [Dialogue] Dialogue Window Middleware (#1526)

* Dialogue window quest dialogue work

* Add rest of DialogueWindow hooks

* Remove spacing
2021-10-01 22:09:21 -05:00
Kinglykrab 0762ffa3dc [Quest API] Typo in Perl $entity_lsit->IsMobSpawnedByNpcTypeID(). (#1576)
This causes the wrong name to show up on Spire.
2021-10-01 21:19:26 -04:00
KayenEQ b70dc64d96 Update spell_effects.cpp 2021-10-01 20:36:54 -04:00
Akkadius 859751f74d Revert "Shared task kill update fix"
This reverts commit 91c451b6c5.
2021-10-01 18:42:36 -05:00
Akkadius 91c451b6c5 Shared task kill update fix 2021-10-01 18:42:02 -05:00
KayenEQ 30c7ed7e45 Merge pull request #1557 from KayenEQ/spa395fix2
[Spells] Healing focuses effects update and Fix for SPA 395
2021-10-01 15:52:25 -04:00
KayenEQ 509b6f2056 Merge pull request #1558 from KayenEQ/spa382update2
[Spells] More updates for SPA 382 SE_NegateSpellEffect
2021-10-01 15:51:32 -04:00
KayenEQ 558bebe710 updates 2021-10-01 15:50:26 -04:00
KayenEQ 08a85c5dae Merge remote-tracking branch 'upstream/master' into spa395fix2 2021-10-01 14:28:45 -04:00
KayenEQ d22f9ee294 Merge remote-tracking branch 'upstream/master' into spa382update2 2021-10-01 14:26:43 -04:00
Cole-SoD 0aeaf7c3b7 [Zone] Add LavaDamage and MinLavaDamage support to ZoneHeader (#1540)
* Add LavaDamage and MinLavaDamage support to ZoneHeader

* Add lava_damage and min_lava_damage to base_zone_repository.h

* Update version.h and utils/sql/git/required/ file

* Correct SQL Query, adjust utils/sql/db_update_manifest.txt to check one column

* Correct manifest
https://github.com/EQEmu/Server/pull/1540#discussion_r714330945
2021-09-30 11:44:22 -05:00
KayenEQ c04bcef273 Update spells.cpp (#1554) 2021-09-30 11:43:36 -05:00
KayenEQ 7fcea371c2 [Spells] Updated Memory Blur SPA 63 - Implemented Live Mechanics (#1559)
* memory blur updated

* Update spdat.h
2021-09-30 11:43:05 -05:00
Natedog2012 dd765238f7 Merge pull request #1553 from Natedog2012/tradeskill_fix
[Tradeskill] Fix logic in taught tradeskill recipes
2021-09-29 19:05:41 -05:00
Paul Coene 2c98a11696 Merge pull request #1561 from noudess/timesync
[Bug Fix] Zones no longer syncing time to world
2021-09-29 16:57:30 -04:00
Noudess d4f14efaa0 Fix TimeSync to work with new Servertalk connection order 2021-09-27 10:04:02 -04:00
KayenEQ 27787c247b Update spell_effects.cpp 2021-09-23 18:01:08 -04:00
KayenEQ ea9c07aa98 393 NegateEffect updates 2021-09-23 16:43:07 -04:00
KayenEQ 5cd9bfeb70 reminder
bot code needs to updated, then old function can be removed
2021-09-23 14:23:17 -04:00
KayenEQ b699196299 Update effects.cpp 2021-09-23 14:14:46 -04:00
KayenEQ e89c2aec4a Update bot.cpp 2021-09-23 13:48:15 -04:00
KayenEQ 456fb56e82 revert for bots 2021-09-23 13:42:36 -04:00
KayenEQ 03ac828134 Update bot.cpp 2021-09-23 12:28:34 -04:00
KayenEQ 34b2264d5d bots... 2021-09-23 12:21:53 -04:00
KayenEQ 933ede40f9 Update bot.cpp 2021-09-23 12:13:29 -04:00
KayenEQ 881dc33c9b update 2021-09-23 12:00:16 -04:00
KayenEQ 3faa0d2603 update 2021-09-23 11:41:36 -04:00
KayenEQ 1ce5087e2a Update effects.cpp 2021-09-23 09:35:09 -04:00
Natedog2012 bf8d94eb35 Fix SendTradeskillSearchResults row count was incorrect format. Remove extra database hits from last commit. 2021-09-22 21:43:49 -05:00
Natedog2012 9aac12f517 Hide tradeskill recipes that require being learned before crafting them, as well as fix how learned recipes are checked. 2021-09-22 18:21:57 -05:00
Kinglykrab 7b969173f4 [Door Manipulation] Resolve some typos and add a GM check. (#1550)
* [Door Manipulation] Resolve some typos and add a status check.

* Remove Status check and use GetGM() inside devtools check instead.
2021-09-22 16:43:01 -05:00
Kinglykrab ca77d22035 [Bug Fix] GetSpellStat() Identifiers were comparing improperly. (#1552)
- GetSpellStat() converts identifiers to lowercase and they were being checked against mixed case strings, causing certain identifiers to always fail.
2021-09-21 21:08:16 -04:00
Paul Coene ad3bf35397 Merge pull request #1548 from noudess/master
[Bug Fix] Fix bug where IVU could not be cast on char with Invis
2021-09-21 12:21:18 -04:00
Noudess 9b06221be0 [Bug Fix] Fix bug where IVU could not be cast on char with Invis 2021-09-20 11:30:33 -04:00
Kinglykrab c0de178173 [Commands] Overhauled #npcedit. (#1538)
* [Commands] Overhauled #npcedit.
- Added missing columns like untargetable, show_name, exp_mod, etc.
- Put stats in order of column appearance in table within help message and within code.
- Converted StringFormat to fmt::format.
- Added a GetGenderName() helper method.
- Prettified response messages of nearly every #npcedit option.

All tested and ready to go.

Would like input about possibly changing some of the command arguments to match the table column names more closely, example being "spell" should be "npc_spells_id".

* Cleanup.

* Fix indentation.
2021-09-19 16:32:21 -07:00
Kinglykrab 6a5face0aa [Dialogue] Add support for Dialogue Window buttons. (#1546)
* [Dialogue] Add support for Dialogue Window buttons.
- Also changes "mysterious" identifier to "{mysterious}".
- Both button names are required for anything to show up, otherwise it defaults to Yes/No similar to Client::SendFullPopup.

* Move SetEntityVariable so responses can override default button response.

* Add negativeid support so you can override button two popup ID.

* Fix log.

* Update dialogue_window.cpp

Convert button names to strings and negativeid to secondrespondid.
2021-09-19 16:24:04 -07:00
Kinglykrab c15c54e920 [Quest API] Cross zone and world wide method overhaul. (#1520)
* [Quest API] Cross zone and world wide method overhaul.
- Adds support for Character ID, Character Name, and Expedition ID to all cross zone methods that did not have a method.
- Adds worldwide LDoN Updates.
- Shrinks the number of packets and structs from 83 to 17.

No quest functionality will be affected by this, as the only changes are the underlying method used to send the cross zone and world wide data.

* Formatting, organization, and fixing of improper exports.

* Finalize comb through of variable types, update types, etc.

* Merge fixes.
2021-09-19 16:15:14 -07:00
Chris Miles 24c079dca4 [Hotfix] Fix freeze formatting for Quest API parsing (Spire) (#1547) 2021-09-19 15:25:52 -05:00
Kinglykrab 8eef7bb283 [Quest API] Add EVENT_COMBINE to Perl and Lua. (#1536)
- Exports $container_slot in Perl.
- Exports e.container_slot in Lua.

Allows you to perform events when clicking combine in a tradeskill container.
2021-09-19 15:22:51 -05:00
Michael Cook (mackal) 80493719f2 [Summoning] Make Summon a bit more live like (#1539)
Pretty sure the distance should probably be melee range / 2 but ahh
yeah. Can't do that. Hopefully 5 units isn't too far.
2021-09-19 15:19:29 -05:00
KayenEQ df9d6bc506 [Spells] Corrected implementation of SE_Purify 291 (#1541)
* Correct implementation of spa291

* debug removal
2021-09-19 15:17:10 -05:00
KayenEQ 71870cbd1c [Spells] Update to SPA 442 and 443 (SE_TriggerOnReqTarget, SE_TriggerOnReqCaster) (#1543)
* Update to SPA 442 and 443

Use SpellRestriction Id's and updated PassCastRestriction code

* Update mob.cpp
2021-09-19 15:16:56 -05:00
Kinglykrab f715ccd368 [Bug Fix] Fixes EVENT_DISCONNECT for /quit and /exit. (#1542)
/quit and /exit will now properly parse to EVENT_DISCONNECT so operators can do things on disconnect to these players, previously it only functioned for /camp.
2021-09-19 15:16:38 -05:00
KayenEQ 46edd56acc [Spells] Update SPA 101 SE_CompleteHeal (#1544)
Fixed buff stacking issue
2021-09-19 15:16:21 -05:00
KayenEQ 442850aebb [Spells] Update to SPA305 (#1545)
minor fix to allow for effects with negative values.
2021-09-19 15:16:02 -05:00
KayenEQ d4e752987e fixes 2021-09-17 23:21:03 -04:00
KayenEQ 9c6a85ff16 heal code updates 2021-09-17 22:27:45 -04:00
Kinglykrab fa8d8eccc2 [Quest API] Add corpse->RemoveItemByID(item_id, quantity) to Perl and Lua. (#1535)
* [Quest API] Add corpse->RemoveItemByID(item_id, quantity) to Perl and Lua.
- Add $corpse->RemoveItemByID(item_id, quantity) to Perl.
- Add corpse:RemoveItemByID(item_id, quantity) to Lua.

* Formatting.
2021-09-13 15:42:04 -04:00
Kinglykrab 6e76f89ca2 [Quest API] Add EVENT_CONSIDER to Perl and Lua. (#1531)
* [Quest API] Add EVENT_CONSIDER to Perl and Lua.
- Exports $entity_id in Perl.
- Exports e.entity_id in Lua.

Allows you to perform events on consider for server operators.

* Missing comma.

* Formatting.

* Add return capability to EVENT_CONSIDER and EVENT_CONSIDER_CORPSE so operators can break out of consider functions.
2021-09-13 15:30:17 -04:00
Akkadius 9589bf6bf8 [Hotfix] Crash fix that apparently didn't make it in another PR 2021-09-13 14:15:08 -05:00
Kinglykrab ce5fa9502f [Commands] Adds #dye command. (#1537)
* [Commands] Adds #dye command.

* Fix use tint.
2021-09-12 22:40:43 -05:00
Kinglykrab 7b1b05a35c [Bug Fix] Resolves issues with improper genders and textures on spells. (#1533)
* [Bug Fix] Resolves issues with improper genders and textures on spells.
Spells will now properly understand their expected gender and texture.
Logic is based on what I saw in a stock PEQ database, can be adjusted if need be.
Any feedback is helpful.

* Made use of GetRaceGenderDefaultHeight() and added all races to their proper conditions.

* Formatting.
2021-09-12 22:40:07 -05:00
Kinglykrab 38a86edc70 [Quest API] Add EVENT_CONSIDER_CORPSE to Perl and Lua. (#1530)
- Exports $corpse_entity_id in Perl.
- Exports e.corpse_entity_id in Lua.

Allows you to perform events on corpse consider for server operators.
2021-09-12 22:39:09 -05:00
Kinglykrab 56b9b6f2c4 [Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua. (#1529)
* [Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua.
- Add $corpse->GetLootList() to Perl.
- Add $npc->GetLootList() to Perl.
- Add corpse:GetLootList() to Lua.
- Add npc:GetLootList() to Lua.

Returns an array of item IDs for use with corpse and NPC methods such as HasItem(item_id), CountItem(item_id), and GetFirstSlotByItemID(item_id).

* Categories.

* Modify Lua to use classes.
2021-09-12 22:38:38 -05:00
Chris 97dcba70cf [Bots] Fix for Bot Pets Taunting (#1519)
Currently bot pets will taunt and there's no way to turn it off. This makes it so pets follow their owner's taunt settings.
2021-09-12 22:37:39 -05:00
Chris Miles 6b93130c13 [Saylinks] Implement Auto Saylink Injection (#1525)
* Implement auto saylink injection

* Cover Lua say since it takes a different code path
2021-09-12 22:08:30 -05:00
Chris Miles 94c1a50cc8 [GM Command] Door Manipulation Command Port (#1524)
* Initial commit

* Push latest

* Update door_manipulation.cpp

* More door work

* More doors work

* Upload notes

* Finalize changes

* Remove comment

* Add missing chat line

* Swapped URI parser with something not using deprecated C++ functions
2021-09-12 22:08:04 -05:00
Kinglykrab 31ab1d4287 Merge pull request #1522 from EQEmu/feature/temp_merchant_list_bug_fix
[Bug Fix] Resolves issue where loading temporary merchant list "fails" because there aren't any to load.
2021-09-11 10:35:39 -04:00
Paul Coene b6ba493450 Merge pull request #1528 from noudess/merchant
Fix bug where stacks of non-stackable items are removed when you buy 1.
2021-09-11 10:19:37 -04:00
Paul Coene c613db2338 Merge pull request #1527 from noudess/toofar
Hack to fix melee chasing fleeing mobs "too far" issues.
2021-09-10 18:21:38 -04:00
Noudess 05ac8499df Fix bug where stacks of non-stackable items are removed when you buy 1. 2021-09-10 10:18:59 -04:00
Chris Miles 69244a094d Update changelog.txt 2021-09-09 09:52:26 -05:00
Noudess 1155673642 Hack to fix melee chasing fleeing mobs "too far" issues. 2021-09-09 08:42:14 -04:00
Kinglykrab 930079959c [Bug Fix] Resolves issue where loading temporary merchant list "fails" because there aren't any to load. 2021-09-06 20:37:34 -04:00
Chris Miles c078257f70 [Quest API] Port DiaWind Plugin to Native Quest API (#1521)
* Port DiaWind plugin to native Quest API

* Add no logging aliases
2021-09-05 20:29:21 -05:00
Chris Miles e7dd8d49a9 [Shared Tasks] Shared Tasks System Implementation (#1451)
* Shared tasks WIP; lots of logging; shared tasks and tasks work internally the same for now; lots to cleanup yet

* Update task_manager.cpp

* Add tables

* World message handler

* Zone message handler

* More messaging

* More rearranging

* Task creation work (wip)

* Tweaks

* Decoupled things, added a shared task manager, moved logic to the manager, created the shared task object, now creating a sense of state on creation and members, zero validation, happy path

* Cleanup unnecessary  getter

* More work on shared task persistence and state loading

* Add int64 support into repositories

* More state handling, creation loads all tables

* Wrap up shared task state creation and removal

* Move more lookup operations to preloading (memory). Restore shared task state during world bootup

* Implement shared task updates

* Add members other than just leader in task confirmations

* Update shared_task_manager.cpp

* Hook task cancellation for shared task removal (middleware)

* Remove dynamic_zone_id from SharedTasks model in repositories (for now) since we will likely be one to many with DZ objects

* Get members to show up in the window on creation

* Add opcodes, cleanup

* Add opcode handlers

* Split some methods out, self removal of shared task and updating members

* Implement offline shared task sync

* Style changes

* Send memberlist on initial login; implement remove player from shared task window

* Refactorings, cleanup

* Implement make leader in shared tasks window

* Implement add player, sync shared task state after add

* Add opcodes for remaining clients

* Shared task invite dialogue window implementation and response handling (including validation)

* Logging

* Remove comment

* Some cleanup

* Pass NPC context through shared task request logic

* Remove extra SharedTaskMember fields

* Add message constants

* Remove static

* Only use dz for expedition request

This passes expedition creation parameters through DynamicZone instead
of injecting ExpeditionRequest since it can hold creation data now

* Store expedition leader on dz

This shifts to using the leader object that exists in the core dynamic
zone object. It will be moved to the dynamic zone table later with other
columns that should just be on the dz to make loading easier.

Expeditions are probably the only dz type that will use this for window
updates and command auth. Other systems on live do fill the window but
don't keep it updated

* Store expedition name on dz

This uses the name stored on dz (for window packets) instead of
duplicating it. This will be moved completely to dz table later

* Store uuid on dynamic zone

This lets dynamic zones generate the uuid instead of expeditions. Other
dz type systems may want to make use of this. Lockouts should also be
moved to dynamic zones at some point in the future so this will be
necessary for that

* Move expedition db columns to dz

These columns should just belong to the core dynamic zone. This will
simplify loading from the database and in the future a separate
expedition table may no longer be necessary.

* Move window packet methods to dz

It makes more sense for these methods to be in the core

This will also allow support for other systems to use the window, though
live behavior that updates the window for shared task missions when not
in an expedition is likely unintended since it's not updated on changes.

* Store dynamic zone ids on clients

These will now be used for client dynamic zone lookups to remove
dependency on any dz type system caches

* Move member management to dz

This moves server messaging for adding and removing members to internal
dynamic zone methods

Set default dz member status to Unknown

* Move member status caching to dz

This moves world member status caching into internal dz methods

Zone member updates for created expeditions are now async and sent after
world replies with member statuses. Prior to this two memberlist packets
were sent to members in other zones on creation to update statuses.

This also fixes a bug with member statuses being wrong for offline raid
members in the zone that created an expedition. Note that live kicks
offline players out of raids so this is only to support emu behavior.

* Move member status updates to dz

* Set dz member status on all client dzs

This also renames the zone entry dz update method and moves window
update to a dynamic zone method. Eventually expedition components
should just be merged with dz and handled as another dz type

* Save instance safe return on characters

Add character_instance_safereturns table and repository

Previously dz safe return only worked for online characters via the dz
kicktimer or offline characters with a workaround that moved them when
an expedition was deleted. There were various edge cases that would
cause characters to be moved to bind instead (succoring after removal,
camping before kick timer, removed while offline, bulk kickplayers
removal with some offline)

This updates a character's instance safereturn every time they enter a
zone. If a character enters world in an instance that expired or are no
longer part of they'll be moved to their instance safereturn (if the
safereturn data is for the same zone-instance). Bind is still a fallback

This may also be used for non-dz instancing so it's named generically

This removes the expedition MoveMembersToSafeReturn workaround which
deprecates the is_current_member column of dynamic_zone_members and
will be removed in a followup patch.

* Remove is_current_member from dz members

This was only being used in the workaround to move past members to
dz safereturns if they were still inside the dz but not online

* Let dz check leader in world

This moves expedition leader processing in world to the dynamic zone.
This is a step in phasing out the separate expedition class for things
that can run off the dynamic zone core with simple dz type checks

This greatly simplifies checking leader on member and status changes
without needing callbacks. Other dz types that may use the dz leader
object can just handle it directly on the dz the same as expeditions

* Let dz handle member expire warnings

This moves expire warning checks to dz. This will make it easier for
other dz types to issue expire warnings if needed

* Use separate dynamic zone cache

Dynamic zones are no longer member objects of expeditions and have been
placed into their own cache. This was done so other dz types can be
cached without relying on their systems. Client and zone dz Lookups are
now independent of any system

This continues the process of phasing out a separate expedition cache.
Eventually expeditions can just be run directly as dynamic zones
internally with a few dz type checks.

Add dz serialization methods (cereal) for passing server dz creation

Modify #dz list to show cache and database separately. Also adds #dz
cache reload. This command will reload expeditions too since they
currently hold references to the dz in their own zone cache.

Add a dynamic zone processing class to world to process all types and
move expedition processing to it

* Move expedition makeleader processing to dz

* Let dz handle expedition deletions

This removes the need for separate expedition cache in world

This will greatly simplify world dynamic zone caching and processing.
Dynamic zones that are expeditions can just handle this directly. Once
lockouts and other components are completely moved to dynamic zones the
separate expedition cache in zone will also no longer be necessary

* Remove ExpeditionBase class

Since world no longer caches expeditions this will not be necessary

* Fix windows compile

* Implement task dz creation

Prototype dz creation for shared tasks

* Add and remove shared task members from dz

Also keep leader updated (used in choose zone window)

* Fix client crash on failed shared task

* Fix linux compile and warning

* Check client nullptr for dz message

This was accidently removed when expedition makeleader was moved

* Disable dz creation for solo tasks

* Add shared task repository headers to CMakeLists

* Add shared task dynamic zones table

* Add shared task dz database persistence

* Get members from db on shared task dz creation

This fixes a case where removing a member from a shared task dz would
fail if the member's name was empty. This could happen if the shared
task dz was created while a member was offline.

This also changes the dz member removal method to only check id. It
might be possible to change all dz member validations to only check
ids since names are primarily for window updates, but shared task dz
member names need to be non-empty anyway to support possible live-like
dz window usage in the future.

* Add character message methods to world

Add simple and eqstr message methods to ClientList

Add shared task manager methods to message all members or leader

* Add SyncClientSharedTaskState and nested sync strategies to cover M3 work

* Fix whitespace

* Implement task request cooldown timer

This implements the task request cooldown (15 seconds) that live uses
when a task is accepted. This will also need to be set when shared
tasks are offered (likely due to additional group/raid validations)

* Implement shared task selector validation

This implements the validation and filtering that occurs before the task
selection window is sent to a client for shared tasks

To keep things live-like, task selectors that contain a shared task will
be run through shared task validation and drop non-shared tasks. Live
doesn't mix types in task selections and this makes validation simpler.

Also note that live sends shared task selectors via a different opcode
than solo tasks but that has not been implemented yet

* Add separate shared task select opcodes

Live uses separate opcodes for solo and shared task selection windows

* Convert ActivityType to enum class

* Refactor task selector serialization

This adds serializer methods to task and task objective structs for the
task selection windows. This combines the duplicate task selector
methods to reduce code duplication and simplify serialization

* Add shared task selector

This sends shared task selection window using the shared task specific
opcode and adds an opcode handler for shared task accepts which are sent
by client in response to setting selection window to shared task type.

* Refactor task objective serialization

This adds a serialization method to the task objective struct for
serializing objectives in the window list and combines the separate
client-based methods to reduce duplicated code.

* Add task level spread and player count columns

* Implement shared task accept validation

This adds a common method for shared task character request queries

* Add task replay and request timer columns

* Add character task timers table

* Use shared task accept time on clients

This overrides client task accept time with shared task's creation time.
This is needed for accurate window task timers and lockout messages
especially for characters added to shared tasks post creation

* Implement task timer lockouts

This implements replay and request task timers for solo and shared tasks

* Add solo and shared task timer validation

* Remove logging of padding array

This gets interpreted as a c string which may not be null terminated

* Implement /kickplayers task

This also fixes current CancelTask behavior for leader which was
performing kickplayers functionality through the remove task button

* Implement /taskquit command

* Implement shared task invite validation

Remove active invitation before invite accept validation

* Remove local client db persistence during SyncClientSharedTaskRemoveLocalIfNotExists

* Add missing accept time arg to assign task

* Only validate non-zero task invite requirements

* Fix task error log crash

* Separate task cooldown timer messaging

* Use method to check for client shared task

* Avoid unneeded task invite validation query

Only need to query character data for levels for non-zero level spread

* Implement /tasktimers command

May want to add some type of throttled caching mechanism for this in
the future

* Add /tasktimers rate limiter

* Intercept shared task completion; more work to come

* Change SharedTaskActivityState and SharedTasks time objects to datetime

* Add updated_time updates to SharedTaskActivities

* Mark shared tasks as complete when all activities are completed

* Save a database query on shared task completion and use the active record in memory

* Don't record shared task completions to the quest log

* Implement RecordSharedTaskCompletion, add tables, repositories

* Update shared_task_manager.cpp

* Update shared_task_manager.cpp

* Add shared task replay timers

This is still not feature complete. On live any past members that ever
joined the shared task will receive a replay timer when it's completed

* Create FindCharactersInSharedTasks that searches through memory

* Remove namespace shorthand and formatting

* More minor cleanup

* Implement PurgeAllSharedTasks via #task command

* Add #task purgetimers

* Decrease m_keepalive time between processes

* Remove type ordering in /tasktimer query

* Add comment for task packet reward multiplier

This is likely a reward multiplier that changes text color based on
value to represent any scaled bonus or penalty

* Add replay timers to past members

This implements the live behavior that adds replay timers to any
previous member of a shared task. This likely exists to avoid possible
exploits.

Shared task member history is stored in memory and is used to assign
replay timers. This history will be lost on world crashes or restarts
but is simpler than saving past member state in database.

This also makes world send shared task replay timer messages since
past members need to be messaged now

* Move PurgeTaskTimers client method to tasks.cpp

* Remove dz members when purging shared tasks

Server dz states need to be updated before shared tasks are deleted

* Use exact name in shared task invites

This removes the wildcards from shared task invite character queries
which was sometimes selecting the wrong character

Taskadd validation is called even for invalid characters to allow for
proper messages to occur

* Clear declined active shared task invitations

This also notifies leader for declined shared task invites

* Store shared task member names

This adds back the character name field to SharedTaskMember. This should
make serialization easier in the future and reduce database lookups when
names are needed for /task commands

* Implement /taskplayerlist command

* Replace queries with member name lookups

Now that shared task members store names these queries are unnecessary

This also adds not-a-member messages for /taskremove and /taskmakeleader

* Implement shared task member change packet

This avoids sending the full member list to members when a single member
is added or removed and lets the client generate chat messages for it.

* Serialize shared task member list from world

This uses cereal to serialize the full member list from world and
removes the zone query workarounds

* Initialize client task state array

This was causing sql query errors on client state reloads

The client task information array was uninitialized resulting in being
filled with 0xcdcdcdcd values in msvc debug builds. Under release builds
this may have resulted in indeterminate values

A better fix would be to refactor some of this legacy code

* Add shared task command messages

Add messages for non-leader task commands

This adds taskadd, taskremove, taskmakeleader, and taskquit messages

The leader receives double messages for taskremove like live due to the
client generated message as well as the explicit one. It also receives
double server messages if the leader /taskremoves self.

* Replace some task messages with eqstrs

This also updates to use live colors

* Avoid shared task invite leader lookup query

Since member names are stored now this query is also unnecessary

* Avoid reloading client state on shared task accept

This was unnecessarily reloading client task state when added to a
shared task.

This also resulted in all active tasks being resent to shared task
members on creation. The shared task itself is the only task that
needs to be sent which is handled by AcceptNewTask.

* Remove active shared task invite on zone

Live doesn't re-send shared task invites after zoning like it does for
expeditions so there's no need to keep these around. This fixes active
invitations never getting reset on characters that zone or go offline.

* Choose new shared task leader if leader removed

* Add separate shared task kickplayers method

* Enable EVENT_CAST_ON for clients

This will be required for a shared task objective (The Creator) in DoN

* Revert "Avoid reloading client state on shared task accept"

This reverts commit 3af14fee2de8b109ffb6c2b2fc67731e1531a665.

Without this clients added to a task after some objectives have been
completed don't get updated state. Will need to investigate this later

* Disallow looting inside a dz by non-members

Non-members of a dynamic zone should not be allowed to loot npcs inside
it. This should have been disabled for expeditions already but was still
allowed due to an oversight (or live behavior changed). This is less
critical for shared tasks since members can be added and removed at will
without leaving a dz but still an important feature.

* Change load where criteria

* Increase task completion emote column size

* Use eqstr for task item reward message

* Implement radiant and ebon crystal rewards

This adds reward columns for radiant and ebon crystals to the tasks
table and updates task description serialization

* Send task completion emote before rewards

This matches live and makes it a little easier to see item rewards when
tasks have a long completion emote. This also changes it to send via the
same normal message opcode that live uses.

* Do not send a shared task in completed task history

* Allow EVENT_TASK_STAGE_COMPLETE for quest goals

This invokes event_task_stage_complete for task elements flagged with a
quest controlled goal method. It should be expected behavior that a
completed task stage always fires this event even if a quest controls it

* Add SyncSharedTaskZoneClientDoneCountState

* Swap return for continue in this case

* Formatting

* Simplify

* Formatting

* Formatting

* Formatting

* Remove errant check

* Formatting, add setter for shared tasks

* Remove debugging

* Comments in PR

* More PR follow up

* Formatting

* Cleanup

* Update packet comments

* Comments

* More cleanup

* Send command error message if not in shared task

/taskadd is the only command with this feedback on live. Newer live
clients also generate this instead of the server sending the message

* Implement expire_time on SharedTask object and add a purge on world bootup

* Comment

* Add SyncClientSharedTaskStateToLocal where clients fall out of sync and no longer have a task locally

* Clamp shared task activity updates to max done count and discard updates out of bounds

* Fix packet send

* Revert packet send

* Adjust clamping OOO for completed time check. Add completed tables to purge truncation

* Refactor kill update logic so that shared task kill updates only update one client instead of all clients

* Cleanup how we're checking for active tasks

* Forward task sets that contain shared tasks

This forwards task sets that contain a shared task to shared task
selector validation like normal task selectors

* Change eqstr for empty solo task offers

This is the message live appears to use if all task offers are filtered
out by solo task validation

* Fix max active tasks client message

This message starts at the third argument. It was maybe intended to be
an npc say message but live just sends it as a normal eqstr with the
first two arguments nulled.

* Load client task state after zoning complete

This fixes a possible race where a character removed from a shared task
while zoning would be stuck with an incorrect character activities state
after zoning was completed.

This was caused by the character loading task state to early on zone
entry but never receiving the remove player message from world since
they are missing from the world cle until zoning is completed.

Loading client state after zone connection is completed makes sure the
client has the latest state and available to the world cle

* Send message to clients removed while zoning

This message should usually only be sent to characters that were
removed from a shared task while zoning but will occur for any sync
state removals where a message wouldn't have already occured.

* Post rebase fix

* HG comment for checking active task

* Addressing HG comments around zeroing out a shared task id

* Remove errant comment

* Post rebase database manifest updates

* Update eqemu_logsys_log_aliases.h

* More rebase catches

* Bump database version for last commit

Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
2021-09-05 01:21:23 -05:00
splose 943c623be0 [Hitpoints] More HP Fixes - Remove Hacks (#1518)
* Fix HP update throttling

* Remove more hacks

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-09-04 23:17:59 -05:00
Michael Cook (mackal) 41352f77ae [Spells] Implement PVP resist and duration overrides (#1513)
* Make use of PVP resist field

* Implement PVP duration formulas
2021-09-03 20:19:39 -05:00
Logan af6d344e12 [Mods] Added Hastev3Cap (#1506)
* Added Hastev3Cap

* Added Hastev3Cap rule
2021-09-03 20:15:24 -05:00
KayenEQ 59434e0101 [Spells] Updated SE_NegateSpellEffect SPA 382, new functionality (#1514)
* updated SPA 382

Updated SE_NegateSpellEffect SPA 382

Now uses spell values base1 which allows you to limit which bonuses are negated.

* Update spdat.h

* minor update

* Update bonuses.cpp

reset bool correctly

* Update bonuses.cpp

* Update bonuses.cpp
2021-09-03 20:15:07 -05:00
Kinglykrab 119018cf41 [Quest API] Add GetHealScale() and GetSpellScale() to Perl and Lua. (#1515) 2021-09-03 19:47:33 -05:00
Chris Miles e1df72d64d [Hitpoints] Remove HP Update Throttling (#1517)
* Remove HP update throttling and increase HP update resolution and accuracy

* Make some log statements detail

* Add better logging messages

* Remove old self update throttle block check preventing updates to self
2021-09-03 19:47:25 -05:00
Chris Miles 7f823256f4 [Hotfix] Fixing FMT Format Crash (#1516) 2021-09-03 12:59:17 -05:00
KayenEQ 9525827881 [Spells] Allow SE_SecondaryForte 248 to be calculated as a bonus instead of hardcoded AA (#1507)
* start

* Update client.cpp

* Update client.cpp

* Update bonuses.cpp

* Update bonuses.cpp

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-08-31 01:32:16 -05:00
Kinglykrab fec1b1538e [Quest API] Modify GetItemStat() and GetSpellStat() functionality. (#1509)
- Added quest::getitemstat(item_id, stat_identifier) to Perl.
- Added quest::getspellstat(spell_id, stat_identifier, slot) to Perl.
- Added eq.get_item_stat(item_id, stat_identifier) to Lua.
- Added eq.get_spell_stat(spell_id, stat_identifier, slot) to Lua.

Wasn't sure where to put the GetItemStatValue() method so I put it in inventory profile, I can move it wherever is preferred.

These additions will allow people to grab item and spell stat values in plugins without needing a mob object.
2021-08-31 01:31:56 -05:00
Akkadius 87a4f64ff0 [Compile Fix] Squelch warnings 2021-08-31 01:24:21 -05:00
Dencelle 7b069dcf20 [Cheat Detection] Anti-Cheat reimplementation (#1434)
* [Cheat Detection] Anti-Cheat reimplementation

* minor patch fixes

* ceiling to server side runspeed

Warp(LT) was picking up a bunch of expected 6.2 but it was reported back as 6.5, this should help reduce the amount of false positives we get

* use ceil instead of std::ceilf for linux

* boat false positive fix

* stopping the double detection

* fixes and cleanup

* auto merge tricked me...

* dummy divide by 0 checks

this should prevent anyone from setting Zone:MQWarpDetectionDistanceFactor to 0 and causing a crash.

* Formatting

* encapsulation to its own class and clean up

* more detections

* typo

* OP_UnderWorld implmentation

* Update client_packet.h

* Syntax changes, formatting, cleanup

* preventing crashes due to invalid packet size

* typos and clearer logic

* seperated the catagory for cheats

* Updated MQGhost for more detail

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-31 01:08:31 -05:00
Kinglykrab 26299354b6 [Quest API] Adds new methods to NPCs and Corpses (#1510)
- Add $npc->HasItem(item_id) to Perl.
- Add $npc->CountItem(item_id) to Perl.
- Add $npc->GetItemIDBySlot(loot_slot) to Perl.
- Add $npc->GetFirstSlotByItemID(item_id) to Perl.
- Add $corpse->HasItem(item_id) to Perl.
- Add $corpse->CountItem(item_id) to Perl.
- Add $corpse->GetItemIDBySlot(loot_slot) to Perl.
- Add $corpse->GetFirstSlotByItemID(item_id) to Perl.
- Add npc:HasItem(item_id) to Lua.
- Add npc:CountItem(item_id) to Lua.
- Add npc:GetItemIDBySlot(loot_slot) to Lua.
- Add npc:GetFirstSlotByItemID(item_id) to Lua.
- Add corpse:HasItem(item_id) to Lua.
- Add corpse:CountItem(item_id) to Lua.
- Add corpse:GetItemIDBySlot(loot_slot) to Lua.
- Add corpse:GetFirstSlotByItemID(item_id) to Lua.

These methods will allow server operators to view the loot a current has in a slot, the first slot found by item ID, count the item by ID, and see if the NPC has the item.

With that functionality you could build a custom loot system and modify loot more dynamically.
2021-08-31 00:42:08 -05:00
Kinglykrab 642cbfcadc [Bug Fix] Shared Bank Charges Fix (#1511)
- Shared bank charges were being set to int8 on select, meaning any item that stacks over 127 would break if put in shared bank, causing loss of items.
2021-08-31 00:41:43 -05:00
KayenEQ cb3f8daedd [Spells] Major update to cast restriction code and new spell field 'caster_requirement_id' (field220) implemented (#1508)
* Implemented spells_new table 'field220' as 'caster_requirement_id'

Implemented spells_new table 'field220' as 'caster_requirement_id'

* Update spell_effects.cpp

* updates to CastRestriction

enum using live description
updated entire function
missing and new types added
many fixes

* updates

* code fixes

* updates

* updates

* Update spdat.h

* typo fix
2021-08-31 00:41:20 -05:00
KayenEQ 5f3c054044 [Spells] Updated pet suspend code to use spell effect data and bonuses (#1501) 2021-08-31 00:35:18 -05:00
Chris Miles 3b01608a71 [Server] Tweak inter process keepalive timers; this is a very tiny overhead for inter-process chatter to check for connection liveness (#1502) 2021-08-31 00:34:28 -05:00
Chris Miles 06890f695a [Repositories] Add datetime support to repositories (#1503) 2021-08-31 00:34:10 -05:00
Chris Miles 228e0007ca Pad zero size packets which is what we did on encrypted connections prior to #1464 (#1504) 2021-08-31 00:33:49 -05:00
Chris Miles f4bd7c53c0 [Logging] Implement World GMSay Logging (#1505)
* Implement world GM say logging

* Add missed callback function

* Update min status
2021-08-31 00:33:31 -05:00
Alex 1c8231eb9e [Netcode] Remove security from servertalk connections (#1464)
* Remove security from servertalk connections

* Remove the two hello steps before handshake that are now obsolete out

* Revert "Remove the two hello steps before handshake that are now obsolete out"

This reverts commit 32d61ea238.

* Keep old values for enums

* Use downgrade security handshake for backwards compat

* Send handshake instead of hello to fast connect

* Add connect callback so it will actually work
2021-08-15 23:39:38 -05:00
KayenEQ bde5d6931c [Spells] Implemented SPA 390 SE_FcTimerLockout (#1496)
* Implemented SPA 390 SE_FcTimerLockout

Implemented

SPA 390 SE_FcTimerLockout

This focus limited effect sets any spell that meets the criteria of the of the focus limits to be a on recast timer.
Base value: recast duration in milliseconds.

Note: This focus can only be applied from spells (not item or AA)
Note: Although reinforced by the server, to appear visually correct both server side and client side spell values need to match (ie. need to matching spells_new values).

Example spell: Suppression of Fire ID 16973.
Sets any fire spell in the clients spell bar to a 2 second recast when the client is affect by the spell.

* Formatting

* Use range based for

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-15 23:17:04 -05:00
KayenEQ d40d21121a [Feature] Implemented /shield ability and related affects (#1494)
* shield ability initial work

* updates

* update

* updates

* Update client_process.cpp

* major updates

optimized
pet support
perl support

* updates

* minor update

* fix merge error

* requested changes

* variable fix

* optimization

* minor update

* Revert "optimization"

This reverts commit 27e11e758b.

* fix

reset variables on shield_target if shielder dies or zones during shielding.

* edge case fix

Catch and fix situations where shield target doesn't have shielder variable cleared. Can occur if shielder . uses ability when target is not in combat then zones.

* combined packet and mob function

Shield now uses a common pathway through ShieldAbility, added parameters to perl function

* Addressing formatting for Kayen

* Fix function typo

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-15 22:59:10 -05:00
KayenEQ 9c62bf3c2f [Spells] Fix SPA 209 SE_DispelBeneficial not causing aggro (#1495)
Fix SPA 209 SE_DispelBeneficial not causing aggro.
2021-08-13 15:01:29 -05:00
KayenEQ c821397367 [Spells] Implemented SPA 471 SE_Double_Melee_Round (#1492)
* Implemented SPA 471 SE_Double_Melee_Round

#define SE_Double_Melee_Round			471
Percent chance to repeat primary weapon round with a percent damage modifier, base: pct chance repeat, limit: pct dmg mod, max: none

* minor fixes

* tab to spaces
2021-08-11 01:38:38 -05:00
Michael Cook (mackal) b539c63326 [cmake] Update min cmake version due to fe7cb76 (#1489) 2021-08-10 18:40:07 -05:00
KayenEQ 2c01fe59ce [Spells] Implemented SPA 489 SE_Worn_Endurance_Regen_Cap (#1493)
Implemented

SE_Worn_Endurance_Regen_Cap		489
modify worn item regen cap
base: amt, limit: none, max: none

Also added support to allow item mana regen cap to check item and spell bonuses.
2021-08-10 18:39:12 -05:00
KayenEQ 416fadd554 [Spells] Implemented SPA 504 and 506 (#1488)
* Implemented SPA 504 and 506

 SE_Damage_Taken_Position_Amt	506 // implemented - modify melee damage by amt if dmg taken from Front or Behind

SE_Melee_Damage_Position_Amt	504 // implemented - modify melee damage by amt if done from Front or Behind

* fix, description updates

* Update spdat.h
2021-08-10 14:46:52 -05:00
KayenEQ 51ad6d65dc [Spells] Implemented SPA 476 SE_Weapons_Stance and Live-like AA Enable/Disable Toggle (#1477)
* Work started on SPA 476

defines

* bonus structure add

bonus structure set up

* updates spa476

updates spa476

* spell bonus now functional

spell bonus working well.

* major update with debug messages

aa, item and spell now working

* Pre clean up, effect implemented

working for AA, spells, items, all checked for stacking issues.

* removed debug messages

removed debug messages

* spdat description added

spdat description added

* minor fix

removed debug shout
removed unneeded code check.

* syntax updates, minor fixes

syntax updates, minor fixes

* syntax fixes

syntax fixes

* improvements to code

moved function to check at swap item.  Easier to manage and more live like behavior. Required minor adjustment
Still working on AA toggle.

* updates to aa buy, functionalish

* Syntax / Formatting

* Add break / default to switch

* updates

* completed v2

* Major revisions

Main function check moved to when items are swapped and out of when ever bonus are recalculated.

AA Toggle and data structure now more accurate to live.

* Update aa.cpp

* debug removed

* implemented SE_Buy_AA_Rank

Closer to live.

* Update aa.cpp

broadening AA toggle to be more general use.

* improved various checks

aa toggle is now broadly implemented to be usable with any passive effect.

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-10 14:46:37 -05:00
KayenEQ c69446c460 [Spells] SPIndex fix for wrong const in variable (#1487)
* SPIndex fix for mislabeled spell

SPIndex fix for mislabeled spell

All other SPIndex variables were checked again without any additional errors found.

* spdat h merge fix
2021-08-02 21:42:41 -05:00
Gangsta 38a84cae93 [Quest API] Sit method (#1449)
* quest api sit method

* alphabetical

* Fix

* fix again

* Ok real fix unprivated

* Add Lua Export

Co-authored-by: ProducerZekServer <go@away.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 20:58:05 -05:00
Gangsta bb3c918eac [Spells] IsInvisSpell() Method + InvisRequireGroup Rule (#1453)
* IsInvis() Method + InvisRequireGroup Rule

* Fixed issues with invis rule crashes

* Fixed issues with invis rule crashes

* Invis Require Group nullptr fix

* Invis Group Require Fix crash

* Fixes Self only Invis Crashes

* Formatting, reverse check order to prevent unnecessary processing

Co-authored-by: ProducerZekServer <go@away.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 20:44:06 -05:00
KayenEQ 0e7cfe96ef [Spells] Update to SPA 130 and SPA 131 focus calculation, focus code improvements (#1486)
[Spells] Update to SPA 130 and SPA 131 focus calculation, focus code improvements
#use instead of PR 1483
2021-08-01 19:23:59 -05:00
KayenEQ e71b11fcba [Spells] New SPA focus effects and focus limits (#1462)
* Implemented SPA Duration Pct

Implemented new spell effects
SE_Duration_HP_Pct 			524
SE_Duration_Mana_Pct			525
SE_Duration_Endurance_Pct		526

Consumes 'base1' % of your maximum health/mana/endurance every 6 seconds. 'max' is maximum amount that can be consumed per tic.

Additional Functionality
Can be used as a heal/gain % by setting the base1 value to a positive.

* Implemented SPA Instant Mana/End pct

Fixes for SPA 524-526
Implemented
SE_Instant_Mana_Pct			522
SE_Instant_Endurance_Pct		523

Extracts 'base1' percent of your maximum mana/endurance, or 'max', whichever is lower.

* Implemented: SPA 521 EndAbsorbPctDmg

Implemented
SE_Endurance_Absorb_Pct_Damage 521

Absorb Damage using Endurance: base1 % (base2 End per 1 HP)
Note: Both base1 and base2 need to be divided by 100 for actually value

* Implemented SE_HealthTransfer 509

Implemented
SE_Health_Transfer			509
'life burn'
Consume base2 % of Hit Points to Damage for base % of Hit Points

Can be used for heal
Act of Valor

* Implemented SPA 515,516,518,496

Implemented
SE_AC_Avoidance_Max_Percent 515
SE_AC_Mitigation_Max_Percent	516
SE_Attack_Accuracy_Max_Percent	518
Above are stackable defense and offensive mods

SE_Critical_Melee_Damage_Mod_Max	496 - This is a non stackable melee critical modifier

* Implemented SPA 503 , 505

SE_Melee_Damage_Position_Mod	503
define SE_Damage_Taken_Position_Mod	505

SPA 503 increase/decreases melee damage by percent base1 based on your position base2 0=back 1=front

SPA 504 increase/decreases melee damage taken by percent base1 based on your position base2 0=back 1=front

* Implemented 467,468

Implemented
SE_DS_Mitigation_Amount		467
SE_DS_Mitigation_Percentage	468

Reduce incoming DS by amt or percentage. base1 is value, if a reduction is desired it should be set to negative for both.

* Fixes

Formula fixes

* Update spdat.h

Added spa descriptions.

* Implemented SPA 469, 470

Implemented
SE_Chance_Best_in_Spell_Grp     469  Chance to cast highest scribed spell within a spell group. All base2 spells share roll chance, only 1 cast.

SE_Trigger_Best_in_Spell_Grp	470

Chance to cast highest scribed spell within a spell group. Each spell has own chance.

Additional Changes:
Rewrote TrySpellTrigger function used for SPA 340 since it incorporates SPA 469. Improved code so that chance of spell being triggered should be more accurate statistically.

* Implemented SPA 474, 494

Implemented
 SE_Pet_Crit_Melee_Damage_Pct_Owner	474 - Gives pets a critical melee damage modifier from the owner

SE_Pet_Add_Atk	494 - Gives pet a ATK bonus from the owner

Fixed SE_PetMeleeMitigation 397 - The bonus was not being calculated

* Implemented SPA 465,477,478

Implemented

SE_PC_Pet_AE_Rampage			465
Chance for pet to AE rampage with a damage modifier

SE_Hatelist_To_Top_Index		477
Chance to be put on top of RAMPAGE list

SE_Hatelist_To_Tail_Index		478
Chance to be put on bottom of RAMPAGE list

* Implemented

Implemented

SE_Fearstun 	502
Stun with a max level limit. Normal stun restrictions don't apply. Base1 duration, base2 PC duration, max is level limit

SE_TwinCastBlocker 39
Previously unused spell effect that is now used on live. Simply, if this effect is present in a spell then the spell can not be twin cast.

* Implemented SPA 483

Implemented
Fc_Spell_Damage_Pct_IncomingPC	483
- Focus effect that modifies iby percent incoming spell damage on the target.
Base1= min Base2= max. Final percent is random between max and min each time focus is applied from a spell cast.

Note: Written to stack with similar functioning focus SPA 269 SE_FcSpellVulnerability.

* Implemented SPA 484

Implemented

SE_Fc_Spell_Damage_Amt_IncomingPC	484 // focus effect that modifies incoming spell damage by flat amount. Consider it a debuff that adds damage to incoming spells. Positive value to add additional damage.

* Implemented SPA 481, 485,486,512

Implemented

SE_Fc_Cast_Spell_On_Land 481
Focus effect that is checked when a spell is cast on a target, if target has this focus effect and all limiting criteria are met, then the target will cast a spell as specified by the focus. Can be given a roll chance for success. Base1=Chance, Base2=Spellid

Note: This spell has a huge amount of potential applications. See 'Alliance' type spells on live. (ie live spell 50247)

Implemented associated focus limits seen in live spells.

SE_Ff_CasterClass	485
- Caster of spell on target with a focus effect that is checked by incoming spells must be specified class or classes.

SE_Ff_Same_Caster	 486 -Caster of spell on target with a focus effect that is checked by incoming spells 0=Must be different caster 1=Must be same caster

The following is an associated effect seen with SPA 481

SE_Proc_Timer_Modifier 			512
This provides a way to rate limit the amount of spell triggers generated by SPA 481. For example after 1 successful spell trigger no additional spells can be triggered for 1.5 seconds. Ie. Base=1 and Base2 1500.
Written in a flexible format to allow scaling of multiple different buffs with this effect at same time.

* Stacking fixes for new effects

Stacking fixes for new effects.

* merge with upstream master

merge and update up spdat.h

* Update spdat.h

* Fix for bolt spell targeting self if target zone/died while casting.

Fix for bolt spell targeting self if target zone/died while casting. Despite the name being "ST_TargetOptional", this target type is reserved for projectile spells which all require a target, thus should be treated like any other targeted spell.

* Implemented new focus and limits

SE_Fc_Amplify_Mod 507  @Fc, On Caster, damage-heal-dot mod pct, base: pct

SE_Fc_Amplify_Amt 508
@Fc, On Caster, damage-heal-dot mod flat amt, base: amt

SE_Fc_ResistIncoming 510 implemented, @Fc, On Target, resist modifier, base: amt

SE_Fc_CastTimeMod2 500
@Fc, On Caster, cast time mod pct, base: pct

SE_Fc_CastTimeAmt  501
@Fc, On Caster, cast time mod flat amt, base: milliseconds

SE_Ff_DurationMax	 495
@Ff, Max duration of spell that can be focused, base: tics

SE_Ff_ReuseTimeMin  490
@Ff, Minimum recast time of a spell that can be focused, base: recast time

SE_Ff_ReuseTimeMax  491
 @Ff, Max recast time of a spell that can be focused, base: recast time

SE_Ff_Endurance_Min 492
@Ff, Minimum endurance cost of a spell that can be focused, base: endurance cost

SE_Ff_Endurance_Max 	493
 @Ff, Max endurance cost of a spell that can be focused, base: endurance cost

SE_Ff_Value_Min 479
@Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value

 SE_Ff_Value_Max 	480
@Ff, Max base value of a spell that can be focused, base: spells to be focused base1 value

SE_Ff_Override_NotFocusable		460 @Fc, Allow spell to be focused event if flagged with 'not_focusable' in spell table, base: 1

Added basic focus and limit descriptions to source.

* Update spell_effects.cpp

hotfix

* fix for SE_Ff_Override_Notfocusable

Fix for SE_Ff_Override_Notfocusable

Logic was not correct. Changed where spell field 'not_focusable' makes check to properly account for this effect.

* Update to SE_Fc_CastTimeMod2

Update to SE_Fc_CastTimeMod2
Found sources that show it can reduce cast time to instant. Rewrote formulas to account for such.

* fix

unintentional change, reverted back.

* fixed missing break statements

fixed missing break statements

* update to IsFocusLimit

missing limit cases added to IsFocusLimit

* Format CalcFocusEffect

* Revert "Format CalcFocusEffect"

This reverts commit e5b81791ee.

* Revert "Revert "Format CalcFocusEffect""

This reverts commit a1ce29a875.

* Post merge fixes

* More post merge adjustments

* Another post merge change

* Add LimitResist constants back

* Swap int16's for 32's

* int32 fix

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 17:45:05 -05:00
KayenEQ d270670145 [Spells] Update for SPA 403 and 404 (#1482)
* Update for SPA403 and 404

Update
SPA SE_LimitSpellClass: 403
SPA SE_LimitSpellSubclass: 404

Now use spell table values from column 221 and 222 respectively.

Unknown what the values mean in these fields, but at least live spells work properly.

Added FocusLImitInclude Enum to improved focus effect function readability.

* Formatting

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:47:17 -05:00
KayenEQ f01cf74fa6 [Spells] Update SPA 339 SE_TriggerOnCast (#1478)
* Recoded SE_TriggerOnCast Focus effect

Recoded SE_TriggerOnCast focus effect to be consistent with how all other focuses are checked. No longer an arbitrary limit as to number of a focus effects of this type you can have.

* new command: resetdisc_timer

usage: #resetdisc_timer [all | timer_id]

* syntax fixes

syntax improvements

* minor fix

changed numhits check

* Update spell_effects.cpp

* added better support for spell procs that don't require target.

* syntax

* Formatting and syntax tweaks

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:26:44 -05:00
KayenEQ 93b0264a8b Update to focus SE_BlockNextSpell (#1479)
Minor code changes to make the focus be checked consistent with how all other focuses are checked. No change in functionality.
2021-08-01 13:19:42 -05:00
KayenEQ 38beb804a3 [Spells] Added constant labeling to all StatBonuses that use as arrays. (#1485)
* constexpr labels added

* more updates

* more updates

* completed

* Update common.h

* Namespace constants, few minor spelling tweaks

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:13:14 -05:00
KayenEQ 72056ffba3 [Spells] Focus related functions to use int32 instead of int16
Need to increase from int16 to int32 when calculating focus due it causing issues with returning spell ids for some effects which can easily be over the int16 limit. CalcAAFocus and CalcFocusEffect were doing all math in int16 also, no reason not to increase to int32.
2021-08-01 13:06:57 -05:00
Michael Cook (mackal) 2d296eb317 [CI] Enable Bots (Typo) in Drone Config (#1481) 2021-07-30 11:47:22 -05:00
Michael Cook (mackal) c3f8b8073b Fix bots with ExtraAttackChance changes (#1480)
This should probably be updated to match everything in client, but this
will at least fix compile
2021-07-30 12:09:44 -04:00
KayenEQ 187d6e9dc4 [Spells] Bug fix for AOE Harmony/Lull (#1472)
* Bug fix for AOE Harmony/Lull type spells.

Fixed bug with SPA 30 SE_SE_ChangeFrenzyRad and SPA 86 SE_Harmony allowing those spells to affect NPC's above their level restrictions when cast as a 'Targeted AE' spell (ie. Harmony, Wake of Tranquility) when the targeted NPC was bellow level restricted range, but the NPC's next to them were above it.

As coded now, the adjacent NPC's if over level limit will still get the buff applied to them BUT will not get any benefits from the buff.

This bug was originally reported by: Isaaru

* Live like behavior

Implemented the live like behavior, if this case occurs on live, the buff is not applied to the targets over the level limit and "Your target looks unaffected" message is given.

* code optimization

code optimization
2021-07-29 19:20:21 -04:00
KayenEQ 78b15a0214 Implemented SPA 498 and 499 (extra attack chance effects) (#1475)
* Implemented SPA 498 and 499

Implemented
SE_AddExtraAttackPct_1h_Primary	498 , gives your double attacks a percent chance to perform an extra attack with 1-handed primary weapon, base: chance, limit: amt attacks max: none

SE_AddExtraAttackPct_1h_Secondary	499  gives your double attacks a percent chance to perform an extra attack with 1-handed secondary weapon, base: chance, limit: amt attacks max: none

Added limit functionality to similar effect SPA 266

SPA 266 will now be calculated to take highest percent value when applying bonus. (was additive, which does not seem correct based on AA data)

* Update attack.cpp

code update

* Update bonuses.cpp

code update

* Update spdat.h

added commas

* Update spell_effects.cpp

fix to remove unknown spa message

Co-authored-by: Michael Cook (mackal) <mcook@mackal.net>
2021-07-29 19:19:35 -04:00
KayenEQ a50663e0a4 Fix SE_TwinCastBlocker to block twinproc (#1476)
Improvement to SE_TwinCastBlocker implementation. Will now ensure both spell casted and weapon proced twincasts can be effectively blocked.
2021-07-29 18:56:02 -04:00
KayenEQ fee8772bb6 Implemented SPA 482 SE_Skill_Base_Damage_Mod (#1474)
* Implemented SPA 482 SE_Skill_Base_Damage_Mod

Implemented SPA 482 SE_Skill_Base_Damage_Mod

Modifies base melee damage by skill
Base: pct Limit: skill(-1=ALL), max: none

* Update spell_effects.cpp

fix to remove unknown spa message
2021-07-29 18:55:06 -04:00
Gangsta 7e85224202 [Merchants] Fix issue where an item purchased with 1 charges actually is bought with 0 charges
Co-authored-by: ProducerZekServer <go@away.com>
2021-07-27 01:03:17 -05:00
KayenEQ 5d92d484a1 Projectiles Update (#1468)
Fixed spell projectiles whose angle was not being calculated correctly.

Significantly improved all projectile timings. At least up to range of 300 should see more accurate timings for damage/effects occurring upon projectile impact. Will be noticed most significantly for all spell projectiles and for longer range archery.
2021-07-26 22:20:13 -04:00
E Spause 792a3b1443 Add SetGMStatus to LUA, cleanup unused variable, cleanup naming of new function added to Client class, remove unneeded return on void function. (#1471)
* Fix issue #1469 - remove unused variable in perl_client

* Add SetGMStatus to LUA, clean up naming in client.cpp to be consistent with the perl/lua naming, remove unneeded return in void function

* Delete PERL_CLIENT.ipch
2021-07-26 13:03:17 -04:00
splose 8696ba398b Merge pull request #1460 from EQEmu/feature/random_enhancements
[Feature] Add some knobs to our RNG class
2021-07-26 12:28:37 -04:00
splose 696d875624 Merge pull request #1457 from Natedog2012/master_copy2
Add Rank to lua Spell
2021-07-26 12:28:01 -04:00
splose b401404227 [Quest API] Add $client->SetGMStatus() (#1465)
* add $client->SetGMStatus()

* add UpdateAdmin after setting status
2021-07-26 12:21:06 -04:00
KimLS fe7cb764b2 Fix for compile issue when you either don't have openSSL or you're using a version not supported by httplib 2021-07-22 19:03:05 -07:00
KayenEQ 2b74d71ff5 [Feature] New SPAs pass 2 (#1459)
* Implemented SPA Duration Pct

Implemented new spell effects
SE_Duration_HP_Pct 			524
SE_Duration_Mana_Pct			525
SE_Duration_Endurance_Pct		526

Consumes 'base1' % of your maximum health/mana/endurance every 6 seconds. 'max' is maximum amount that can be consumed per tic.

Additional Functionality
Can be used as a heal/gain % by setting the base1 value to a positive.

* Implemented SPA Instant Mana/End pct

Fixes for SPA 524-526
Implemented
SE_Instant_Mana_Pct			522
SE_Instant_Endurance_Pct		523

Extracts 'base1' percent of your maximum mana/endurance, or 'max', whichever is lower.

* Implemented: SPA 521 EndAbsorbPctDmg

Implemented
SE_Endurance_Absorb_Pct_Damage 521

Absorb Damage using Endurance: base1 % (base2 End per 1 HP)
Note: Both base1 and base2 need to be divided by 100 for actually value

* Implemented SE_HealthTransfer 509

Implemented
SE_Health_Transfer			509
'life burn'
Consume base2 % of Hit Points to Damage for base % of Hit Points

Can be used for heal
Act of Valor

* Implemented SPA 515,516,518,496

Implemented
SE_AC_Avoidance_Max_Percent 515
SE_AC_Mitigation_Max_Percent	516
SE_Attack_Accuracy_Max_Percent	518
Above are stackable defense and offensive mods

SE_Critical_Melee_Damage_Mod_Max	496 - This is a non stackable melee critical modifier

* Implemented SPA 503 , 505

SE_Melee_Damage_Position_Mod	503
define SE_Damage_Taken_Position_Mod	505

SPA 503 increase/decreases melee damage by percent base1 based on your position base2 0=back 1=front

SPA 504 increase/decreases melee damage taken by percent base1 based on your position base2 0=back 1=front

* Implemented 467,468

Implemented
SE_DS_Mitigation_Amount		467
SE_DS_Mitigation_Percentage	468

Reduce incoming DS by amt or percentage. base1 is value, if a reduction is desired it should be set to negative for both.

* Fixes

Formula fixes

* Update spdat.h

Added spa descriptions.

* Implemented SPA 469, 470

Implemented
SE_Chance_Best_in_Spell_Grp     469  Chance to cast highest scribed spell within a spell group. All base2 spells share roll chance, only 1 cast.

SE_Trigger_Best_in_Spell_Grp	470

Chance to cast highest scribed spell within a spell group. Each spell has own chance.

Additional Changes:
Rewrote TrySpellTrigger function used for SPA 340 since it incorporates SPA 469. Improved code so that chance of spell being triggered should be more accurate statistically.

* Implemented SPA 474, 494

Implemented
 SE_Pet_Crit_Melee_Damage_Pct_Owner	474 - Gives pets a critical melee damage modifier from the owner

SE_Pet_Add_Atk	494 - Gives pet a ATK bonus from the owner

Fixed SE_PetMeleeMitigation 397 - The bonus was not being calculated

* Implemented SPA 465,477,478

Implemented

SE_PC_Pet_AE_Rampage			465
Chance for pet to AE rampage with a damage modifier

SE_Hatelist_To_Top_Index		477
Chance to be put on top of RAMPAGE list

SE_Hatelist_To_Tail_Index		478
Chance to be put on bottom of RAMPAGE list

* Implemented

Implemented

SE_Fearstun 	502
Stun with a max level limit. Normal stun restrictions don't apply. Base1 duration, base2 PC duration, max is level limit

SE_TwinCastBlocker 39
Previously unused spell effect that is now used on live. Simply, if this effect is present in a spell then the spell can not be twin cast.

* Implemented SPA 483

Implemented
Fc_Spell_Damage_Pct_IncomingPC	483
- Focus effect that modifies iby percent incoming spell damage on the target.
Base1= min Base2= max. Final percent is random between max and min each time focus is applied from a spell cast.

Note: Written to stack with similar functioning focus SPA 269 SE_FcSpellVulnerability.

* Implemented SPA 484

Implemented

SE_Fc_Spell_Damage_Amt_IncomingPC	484 // focus effect that modifies incoming spell damage by flat amount. Consider it a debuff that adds damage to incoming spells. Positive value to add additional damage.

* Implemented SPA 481, 485,486,512

Implemented

SE_Fc_Cast_Spell_On_Land 481
Focus effect that is checked when a spell is cast on a target, if target has this focus effect and all limiting criteria are met, then the target will cast a spell as specified by the focus. Can be given a roll chance for success. Base1=Chance, Base2=Spellid

Note: This spell has a huge amount of potential applications. See 'Alliance' type spells on live. (ie live spell 50247)

Implemented associated focus limits seen in live spells.

SE_Ff_CasterClass	485
- Caster of spell on target with a focus effect that is checked by incoming spells must be specified class or classes.

SE_Ff_Same_Caster	 486 -Caster of spell on target with a focus effect that is checked by incoming spells 0=Must be different caster 1=Must be same caster

The following is an associated effect seen with SPA 481

SE_Proc_Timer_Modifier 			512
This provides a way to rate limit the amount of spell triggers generated by SPA 481. For example after 1 successful spell trigger no additional spells can be triggered for 1.5 seconds. Ie. Base=1 and Base2 1500.
Written in a flexible format to allow scaling of multiple different buffs with this effect at same time.

* Stacking fixes for new effects

Stacking fixes for new effects.

* merge with upstream master

merge and update up spdat.h

* Update spdat.h

* Fix for bolt spell targeting self if target zone/died while casting.

Fix for bolt spell targeting self if target zone/died while casting. Despite the name being "ST_TargetOptional", this target type is reserved for projectile spells which all require a target, thus should be treated like any other targeted spell.
2021-07-20 11:06:20 -04:00
Michael Cook (mackal) ddb14187b0 Add some knobs to our RNG class
Also included is an additive lagged fibonacci generator that should is
very similar to EQ's. Also added BIASED_INT_DIST in case someone wants
to use "bad" int distribution to more closely match EQ as well.

An option to set a custom engine (just in case people would like to play
with other std engines) is available.

There is also support for GCC's SIMD accelerated extension to std random
engines.

All these options are hidden behind advanced options in CMake since
they're rather advanced knobs.
2021-07-16 21:50:46 -04:00
Natedog2012 7decf74505 Add Rank to lua Spell 2021-07-15 19:27:27 -05:00
KayenEQ 8a2a1b152e [Feature] New SPAs pass 1 (#1454)
* Implemented SPA Duration Pct

Implemented new spell effects
SE_Duration_HP_Pct 			524
SE_Duration_Mana_Pct			525
SE_Duration_Endurance_Pct		526

Consumes 'base1' % of your maximum health/mana/endurance every 6 seconds. 'max' is maximum amount that can be consumed per tic.

Additional Functionality
Can be used as a heal/gain % by setting the base1 value to a positive.

* Implemented SPA Instant Mana/End pct

Fixes for SPA 524-526
Implemented
SE_Instant_Mana_Pct			522
SE_Instant_Endurance_Pct		523

Extracts 'base1' percent of your maximum mana/endurance, or 'max', whichever is lower.

* Implemented: SPA 521 EndAbsorbPctDmg

Implemented
SE_Endurance_Absorb_Pct_Damage 521

Absorb Damage using Endurance: base1 % (base2 End per 1 HP)
Note: Both base1 and base2 need to be divided by 100 for actually value

* Implemented SE_HealthTransfer 509

Implemented
SE_Health_Transfer			509
'life burn'
Consume base2 % of Hit Points to Damage for base % of Hit Points

Can be used for heal
Act of Valor

* Implemented SPA 515,516,518,496

Implemented
SE_AC_Avoidance_Max_Percent 515
SE_AC_Mitigation_Max_Percent	516
SE_Attack_Accuracy_Max_Percent	518
Above are stackable defense and offensive mods

SE_Critical_Melee_Damage_Mod_Max	496 - This is a non stackable melee critical modifier

* Implemented SPA 503 , 505

SE_Melee_Damage_Position_Mod	503
define SE_Damage_Taken_Position_Mod	505

SPA 503 increase/decreases melee damage by percent base1 based on your position base2 0=back 1=front

SPA 504 increase/decreases melee damage taken by percent base1 based on your position base2 0=back 1=front

* Implemented 467,468

Implemented
SE_DS_Mitigation_Amount		467
SE_DS_Mitigation_Percentage	468

Reduce incoming DS by amt or percentage. base1 is value, if a reduction is desired it should be set to negative for both.

* Fixes

Formula fixes

* Update spdat.h

Added spa descriptions.

* Fixes for PR

removed debug shouts
fixed description issue
2021-07-14 23:15:04 -04:00
Chris Miles a8e12c82a7 [Repository Usage] Migrate NPC Scale Manager to use repositories (#1441) 2021-07-08 11:44:02 -05:00
Chris Miles b68607a6ef [Repository Generator] Add int64/bigint support, add support for reserved words (#1439) 2021-07-08 11:43:35 -05:00
Dencelle ab89fe13b4 [Code] Addition of zone constants for hard coding (#1443) 2021-07-08 11:43:13 -05:00
Gangsta c72a37a434 [Bugfix] Fixes guards assisting mobs against players (#1448)
Co-authored-by: ProducerZekServer <go@away.com>
2021-07-08 11:39:58 -05:00
Natedog2012 36e009a5bd Allow NPCs to aggro player pets with NPCAggro field set in database and new rule AggroPlayerPets set to true (#1450)
Co-authored-by: Natedog2012 <joewalters2012@gmail.com>
2021-07-08 11:38:57 -05:00
Dencelle f5ab135906 [Commands] Make #maxskills work on target. (#1445)
* [Commands] Make #maxskills work on target.

* Update command.cpp

* don't code when you first wake up... doesn't end well...

* another typo brought to you by lack of coffee
2021-07-07 11:55:23 -04:00
Michael Cook (mackal) 92914d86f1 Add defines (commented) for further known SPAs (#1446)
* Add defines (commented) for further known SPAs

Added as comments since that appears what we were doing. This just gets
us caught up to dev post.

* More SPAs
2021-07-05 13:02:49 -04:00
Chris Miles 82d6e0138d [Repositories] Regenerate repositories with int64 support, reserved word support (#1440) 2021-06-25 15:05:47 -05:00
Michael Cook (mackal) 1c75236508 [Spells Cleanup] Unify and add most hardcoded spell IDs (#1438)
Move the newer stuff added that was recently to the same place all of
our previous spell IDs were defined.

Either of these solutions were good, but I went with defines since it
was less changes

I also added a bunch of stuff the client has hardcoded behavior for, but
not currently implemented by us.

The removed stuff from the command_castspell were reused on live, so I
figured it was best to remove them from the restrictions since they are
no longer test spells
2021-06-25 14:38:02 -05:00
Kurt Gilpin 5a2b5cd295 [Inventory] Remove Trader's Satchel ID from inventory.cpp (#1423)
* Remove Trader's Satchel ID from inventory.cpp

Not sure if this is the right way to do this, but seems to work...

* Update inventory.cpp

Readibility.
2021-06-24 14:14:00 -05:00
Chris Miles 1f154af2ca [Hotfix] SendIllusion revert to October 2021-06-23 00:17:56 -05:00
Michael Cook (mackal) c214c3a95b [Bug Fix] spell cast time cap issue introduced in e5b9d72b81 (#1435)
Me bad coder.
2021-06-22 11:08:04 -05:00
Alex 34d5959cae [Typo] row[27] not row[25]. (#1432) 2021-06-19 15:11:18 -04:00
Alex 27cf5a4068 [Commands] Resolve issue with #giveitem crash with no target. (#1425) 2021-06-19 11:35:20 -04:00
Alex 249cbb7bc7 [Quest API] Add CanRaceEquipItem(item_id) to Perl/Lua. (#1411)
* [Quest API] Add CanRaceEquipItem(item_id) to Perl/Lua.
- Add $mob->CanRaceEquipItem(item_id) to Perl.
- Add mob:CanClassEquipItem(item_id) to Lua.
- Add mob:CanRaceEquipItem(item_id) to Lua.

* Use constants.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-17 18:42:44 -04:00
Alex ccfc8b296f [Quest API] Add SendToInstance(instance_type, zone_short_name, instance_version, x, y, z, heading, instance_identifier, duration) to Perl/Lua. (#1417)
* [Quest API] Add SendToInstance(instance_type, zone_short_name, instance_version, x, y, z, heading, instance_identifier, duration) to Perl/Lua.
- Add $client->SendToInstance(instance_type, zone_short_name, instance_version, x, y, z, heading, instance_identifier, duration) to Perl.
- Add client:SendToInstance(instance_type, zone_short_name, instance_version, x, y, z, heading, instance_identifier, duration) to Lua.

* Fix instance naming.

* Add current instance type to bucket name, remove unused variables.

* Typo.
2021-06-17 11:49:20 -05:00
Alex 3f8b67e500 [Quest API] Add RemoveAllNimbusEffects() to Perl/Lua. (#1413)
* [Quest API] Add RemoveAllNimbusEffects() to Perl/Lua.
- Add $client->RemoveAllNimbusEffects() to Perl.
- Add client:RemoveAllNimbusEffects() to Lua.

* Optimize.
2021-06-17 11:40:01 -05:00
splose 82ad8b5fe2 Adds ability to use the ~~old~~ proper 2HB animation and also allows you to do it on a per-zone basis since its rule-based. (#1420) 2021-06-17 11:39:25 -05:00
Alex 40db13d33e [Quest API] Add get_data_remaining(bucket_name) to Perl/Lua. (#1421)
- Add quest::get_data_remaining(bucket_name) to Perl.
- Add eq.get_data_remaining(bucket_name) to Lua.
2021-06-17 11:39:16 -05:00
Alex 68fe95786e [Quest API] Add getgendername(gender_id) to Perl/Lua. (#1405)
- Add quest::getgendername(gender_id) to Perl.
- Add eq.get_gender_name(gender_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:49:02 -05:00
Alex f8a72296e6 [Quest API] Add getdeityname(deity_id) to Perl/Lua. (#1404)
- Add quest::getdeityname(deity_id) to Perl.
- Add eq.get_deity_name(deity_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:45:38 -05:00
Alex ed6e53be54 [Quest API] Add getinventoryslotname(slot_id) to Perl/Lua. (#1406)
- Add quest::getinventoryslotname(slot_id) to Perl.
- Add eq.get_inventory_slot_name(slot_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:42:06 -05:00
splose f1d1731fc7 [Command] Add #npcedit rarespawn (#1418)
* add #npcedit rarespawn

* minor fix
2021-06-16 10:24:07 -05:00
splose d34afb6f30 Fix for unknown spell effect message with spell effect 459 (DamageModifierV2) (#1419) 2021-06-16 10:23:14 -05:00
Alex a98e3b758a [Quest API] Add CountItem(item_id) and RemoveItem(item_id, quantity) to Perl/Lua. (#1416)
- Add $client->CountItem(item_id) to Perl.
- Add $client->RemoveItem(item_id, quantity) to Perl.
- Add client:CountItem(item_id) to Lua.
- Add client:RemoveItem(item_id, quantity) to Lua.
2021-06-16 10:11:38 -05:00
Alex 797eaf308d [Quest API] Add AddNimbusEffect(effect_id) to Perl. (#1412)
- Add $client->AddNimbusEffect(effect_id) to Perl.
2021-06-16 10:06:30 -05:00
Alex 65150b0581 [Typo] dot_stacking_exempt not dot_stacking_exemp (#1409) 2021-06-16 10:05:44 -05:00
Alex 743b61ae13 [Typo] IsDisciplineBuff not IsDisciplineBuf (#1410) 2021-06-16 10:05:30 -05:00
Alex 966067ae74 [Typo] basediff not basedeiff (#1408) 2021-06-16 10:05:13 -05:00
Dencelle 4f5824b4a1 [Feature] Add lua and perl event for test buff (#1403)
* [Feature] Add lua and perl event for test buff

* added EnableTestBuff
2021-06-16 10:04:34 -05:00
Akkadius 5d937b5be9 [Hotfix] Correct PR syntax issue https://github.com/EQEmu/Server/pull/1374 2021-06-16 09:51:16 -05:00
Alex ecdebbc1a7 [Consistency] Deity not diety. (#1407)
* [Consistency] Deity not diety.

* Uppercase. [skip ci]
2021-06-16 09:33:10 -05:00
Chris Miles f2ffca1a06 [Command] #gearup Table Auto-Install (#1402)
* Update syntax for new httplib and run on own thread

* Only log if path is set in request

* Auto install tool table if does not exist locally

* Add lore and has item checks to reduce verbosity and errors

* Formatting

* Remove test code from test command
2021-06-16 09:31:56 -05:00
splose 19b14ea2d4 [Bug Fix] Fixed Invis vs Undead / Invis Vs Animals not breaking charm + Added rule for custom capabilities (#1374)
* Fixed Invis vs Undead / Invis Vs Animals not breaking charm
Added rule for custom capabilities

* Fix logging & remove comments

* change logic

* change logic

* if (RuleB(Pets, LivelikeBreakCharmOnInvis) || IsInvisible(formerpet))
2021-06-16 09:31:38 -05:00
Alex b9d8fb0d91 [Quest API] Add rename(name) to Perl/Lua. (#1414)
- Add quest::rename(name) to Perl.
- Add eq.rename(name) to Lua.
2021-06-16 09:30:32 -05:00
Alex 4c7f2391cd [Commands] Modify #summonitem and #giveitem. (#1400)
- #summonitem will now properly take item augments from an item link when used as a link for summoning.
- #summonitem help message and command message will now list proper argument list.
- #giveitem will now allow item links like #summonitem with the same functionality level.
- #giveitem help message and command message will now list proper argument list.
- #giveitem small fix where there were 2 checks for argument count at 7, meaning final argument count (8) did not work.
2021-06-13 21:48:48 -05:00
Chris Miles 7139530787 [Library] Update httplib (#1401)
* Update httplib

* Update syntax for new httplib and run on own thread

* Only log if path is set in request
2021-06-13 21:42:30 -05:00
Alex 3886636ec7 [Commands] Modify #grid and #wp. (#1399)
- #grid add will no longer let you put in a duplicate grid.
- Grid nodes now spawn with invul/immune to damage.
- Grid nodes now set an entity variable "grid_id" on spawn.
- This allows grid nodes to be specifically despawned by "grid_id" entity variable, meaning you can view multiple grids at once and not despawn them all accidentally.
- #grid hide will despawn your targeted NPC's Grid nodes.
- #grid add, #grid show, #grid delete, and #grid hide send messages to let GM know what's going on.
- #wp add and #wp delete now send messages to let the GM know what's going on.
- #wpadd now send messages to let the GM know what's going on.
2021-06-13 21:41:38 -05:00
Akkadius 22333ee40b Fix Loginserver log setting db load init 2021-06-13 20:04:03 -05:00
Alex 2ca37ae838 [Quest API] Add Popup(title, text, popup_id, negative_id, button_type, duration, button_name_one, button_name_two, sound_controls) to Lua. (#1396)
- Add client:Popup(title, text, popup_id, negative_id, button_type, duration, button_name_one, button_name_two, sound_controls) to Lua.
- There is no overload for only using button_name_one, as the SendFullPopup requires both button names to be set.
2021-06-13 18:44:54 -05:00
Kurt Gilpin 45eea666a1 [Items] Allow any bag type 51 to be used for Trader (#1392)
* Allow any bag type 51 to be used for Trader

Most commonly this would allow the different color satchels to be used in Trader mode.
PEQ database has 1 item (Yellow Trader's Satchel Token - 35037) marked as type 51, but otherwise only the proper bags are already set.
Bonus of removing the hard-coded ID from source.

* Updated

Fixed where I missed it in a couple more spots too.

* Update bonuses.cpp
2021-06-13 18:06:58 -05:00
Chris Miles bcb0e43d13 [Logging] Simplify Log Settings Initialization (#1394)
* Simplify logging loading

* Fix log injections and reduce verbosity
2021-06-13 18:06:43 -05:00
Alex 0e4361955d [Quest API] Add ResetAllDisciplineTimers() to Perl/Lua. (#1395)
- Add $client->ResetAllDisciplineTimers() to Perl.
- Add client:ResetAllDisciplineTimers() to Lua.
2021-06-13 18:06:36 -05:00
Chris Miles 8d90b5a2e7 [Hotfix] Illusion Revert (#1398)
* Revert some "fixes", clean some code up

* Use RaceGender default height data for when calculating size during SendIllusionPacket which should alleviate some inconsistencies for new clients zoning in and seeing the entity

* Some code cleanup
2021-06-13 18:06:27 -05:00
Chris Miles e1e5873398 [Hotfix] Fix crash pertaining to new PVPEnableGuardFactionAssist code (#1393)
Pushing through due to crash severity on master
2021-06-13 02:09:23 -05:00
Chris Miles 4a067e4e9b [Fix] Fix illusions (#1389) 2021-06-13 02:03:21 -05:00
Kurt Gilpin e285a88e13 Fix crash when casting with no target (#1390) 2021-06-12 13:13:48 -04:00
Alex d162f25536 [Commands] Add #findclass [search criteria] command. (#1384)
* [Commands] Add #findclass [search criteria] command.
- Allows GMs to find a class by name or ID.
- Modify some verbiage in command messages that were improper.

* Update find functions to use strings instead of chars.
2021-06-12 11:36:19 -05:00
Alex a0063997e1 [Quest API] Add SetHideMe() to Perl/Lua. (#1388)
- Add $client->SetHideMe(hide_me_state) to Perl.
- Add client:SetHideMe(hide_me_state) to Lua.
2021-06-12 11:34:55 -05:00
Alex 88526eac21 [Quest API] Add ChangeLastName() and ClearLastName() to Lua. (#1386) 2021-06-12 11:34:19 -05:00
Alex 6e12d2fd49 [Commands] Add #viewzoneloot [item id] command. (#1382)
* [Commands] Add #viewzoneloot [item id] command.
- Allows GMs to search for a specific item across all the loot currently available on the spawned NPCs in the zone.
- Specifying item ID 0 will allow GMs to see all the droppable items, I tested in Sanctus Seru (a huge zone) and it sent approximately 1,200 messages, which didn't lag or desync my client.

* Adjustments.

* Adjustments.
2021-06-12 11:32:36 -05:00
Alex 00dd7c2b71 [Quest API] Add getcleannpcnamebyid(npc_id) to Perl/Lua. (#1383)
* [Quest API] Add optional clean name parameter to getnpcnamebyid in Perl/Lua.
- Allows Server Operators to grab the clean name without having to clean it up in their Perl/Lua.

* Convert from a parameter to a method.

* Add safer method.

* Convert to proper type.
2021-06-11 23:41:06 -05:00
Alex cc46297b32 [Bug Fix] Fix CMakeLists.txt so compile works. (#1387)
* [Bug Fix] Fix CMakeLists.txt so compile works.

* Typo.

* Add ifdefs to bot files so they're not used unless bots are enabled.
2021-06-11 23:52:47 -04:00
RoTPvP 6e61f6d0ba [Spells] Added a pet check to Cazic Touch (#1365)
* Added a pet check to Cazic Touch

* Added a pet check to Cazic Touch

* Added rule option to Cazic pet Check

* Removed Magic Numbers

* Bracket fix

* Revert "Bracket fix"

This reverts commit 3deb3e0cad.

* Bracket fix

* Update spells.cpp

* Fixed constants

* Revert "Fixed constants"

This reverts commit 68502effd3.

* Update eq_constants.h

* Update eq_constants.h

Co-authored-by: ProducerZekServer <go@away.com>
Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-11 16:10:30 -05:00
Alex b87c5484b1 [Pets] Unhardcode Beastlord pet values. (#1379)
* [Pets] Unhardcode Beastlord pet values.
- Create a Beastlord pets table to allow server operators to easily customize Beastlord pets without a source modification.

* Add table to schema.
2021-06-11 15:57:14 -05:00
Dencelle f0bf3826bd [Bug Fix] NPC not breaking charm correctly (#1363)
* [Bug Fix] NPC not breaking charm correctly

#947 and #905
fixes the issue with charm breaking and spells being cast after to cause a faction war. this removes dots to stop faction wars also.

dot removal part needs better testing to ensure it works as intended

* Remove this-> since it is implied

* Update spell_effects.cpp

* clear all this->

* pMob to mob

* Added rule Spells:PreventFactionWarOnCharmBreak

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-11 15:55:23 -05:00
Alex d9d6a64941 [Bots] Add Bot scripting capabilities to the source. (#1378)
- This will allow server operators to interact with bots within a script in Perl or Lua.
2021-06-11 13:46:30 -05:00
Alex d54cd08560 [Spells] Adds a rule to allow right-click memorize from spell scrolls. (#1377)
* [Spells] Adds a rule to allow right-click memorize from spell scrolls.

* Typo.
2021-06-11 13:41:08 -05:00
regneq ebdb8e5d90 [Time] strict spawn_events now take into account EQ minute. (#1370)
* strict spawn_events now take into account EQ minute.

This should fixed the eqtime spawn condition from falling behind.

* change a log to logspawns and add a comment in ExecEvent function.

* moved the comment to the note paramenter in the rule for last commit.
2021-06-11 13:32:35 -05:00
hg b61cc85b5f [Expeditions] Move member compass updates to dz (#1371) 2021-06-11 13:31:50 -05:00
hg 5b3ab59b7c [Expeditions] Avoid expedition leader change if only member (#1372)
This fixes an edge case where a player could be made leader when added
to an expedition that only had a single member previously.

If a leader in a two-member expedition quit (forcing a leader change)
and the new leader went offline while throttled, a leader change flag
would be set until a non-leader was available. The first added member
would then be made the new leader.

This could also potentially occur on world startup due to the initial
throttle timer state but member statuses aren't processed there yet
2021-06-11 13:31:25 -05:00
Alex c3456ebea0 [Bots] Remove hardcoded race-class combinations from bots. (#1375)
* [Bots] Remove hardcoded race-class combinations from bots.
- Allows server operators to directly influence via a database table the classes a specific bot race can be.
- Previously this was hardcoded and required a source modification to do.
- Allowed races, classes, and genders have been removed due to redundancy at this point.

* Remove const cast and modify saylink definition.
2021-06-11 13:30:56 -05:00
Michael 0461ac7912 [Rule] Allow Skill ups from items (Default: On) (#1376) 2021-06-11 13:29:09 -05:00
Michael Cook (mackal) 02526072f3 [Quest API] Add Lua_Mob::GetShuffledHateList (#1381)
This returns the hate list but in a random order. This is useful to
prevent repeated (potentially infinite ...) calls to GetHateRandom()
2021-06-11 13:28:35 -05:00
splose 854a09fc84 [Bug Fix] Allow GMs to chat when stunned (#1380) 2021-06-11 13:27:52 -05:00
Michael Cook (mackal) f0d0c83710 Magic numbers bad (#1373) 2021-06-03 11:17:56 -04:00
RoTPvP 71e9dd5a3c [PVP] Pvp guard assist code. (Guards will assist in PvP based on faction) (#1367)
* Added Guard Assist Code

* Added PvP Rule and Detrimental Spell Check

* Added IsGuard() Method

* Change from uint to bool

* Added a faction check to IsGuard()

* Simplified Guard Checks, reduced costs

* Added IsNPC check to guard check

* simplified pet check

* Removed Magic numbers

* Formatting Fix

* Code fixes

* Fixed constants

Co-authored-by: ProducerZekServer <go@away.com>
2021-05-30 20:22:52 -05:00
Dencelle 542ec38660 [Bug Fix] Fix for charges not being sold correctly (#1357)
* fix for charges not being sold correctly

https://github.com/EQEmu/Server/issues/1350 this fixes this issue

* Update client_packet.cpp

* Update zone.cpp

this completes the fix for all charge items being sold to merchants

* code opmizations

could probably be fixed up better but this is a little cleaner

* Update snake_casing

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-05-24 21:16:46 -05:00
Alex e14acd6802 [Quest API] Add several methods to Perl/Lua API for LDoN stuff. (#1356)
- Swapped parameters in mostly unused functions to be theme_id first and points second. (No examples in PEQ quests.)
- Add $client->AddLDoNLoss(theme_id) to Perl.
- Add $client->AddLDoNWin(theme_id) to Perl.
- Add quest::crosszoneaddldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneaddldonpointsbycharid(character_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbygroupid(group_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyraidid(raid_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyguildid(guild_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyexpeditionid(expedition_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Fix quest::addldonloss(theme_id) in Perl.
- Fix quest::addldonwin(theme_id) in Perl.
- Add client:AddLDoNLoss(theme_id) to Lua.
- Add client:AddLDoNWin(theme_id) to Lua.
- Add eq.add_ldon_loss(theme_id) to Lua.
- Add eq.add_ldon_points(theme_id, points) to Lua.
- Add eq.add_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_points_by_char_id(character_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_group_id(group_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_raid_id(raid_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_guild_id(guild_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_expedition_id(expedition_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
2021-05-24 21:15:41 -05:00
hg 15328196e2 [Expeditions] Store members on dynamic zone (#1358)
This moves members from expeditions so other systems can use them

Replace expedition_members table with dynamic_zone_members

Move 'EnableInDynamicZoneStatus' rule to DynamicZone namespace

Modify #dz list to show dz members (not instance players) and type name

Move various queries to repository methods
2021-05-24 21:14:32 -05:00
splose e8b94a11f1 [Rules] Add rule to allow you to cast invis on already invis'd players (#1361) 2021-05-24 20:29:27 -05:00
TurmoilToad 7458b5f32f [Docs] Create CODE_OF_CONDUCT.md (#1360) 2021-05-24 20:23:50 -05:00
hg efa245d636 [Quest API] Add write overloads to lua packet quest api (#1366)
Makes prototyping easier without having to manually track an offset

Also add GetWritePosition and SetWritePosition
2021-05-24 20:22:31 -05:00
Michael Cook (mackal) e5b9d72b81 [Fix] Fix Spell Cast Time reduction issues (#1369)
Remove the overloads that don't make sense (bots probably doesn't make
sense either, but too lazy)

Fix the formulas

Removed the Spells:MaxCastTimeReduction rule since this is HARDCODED in
the client so it doesn't really make sense to have it as a customization
point. If you want to hack the client, change the hardcode as well I
guess.
2021-05-24 20:21:39 -05:00
Alex 93329b4b06 [Shared Bank] Add additional popup to shared bank warning message, as client-side filters can cause the message to be unseen. (#1368) 2021-05-24 20:15:37 -05:00
Michael Cook (mackal) b65cf4c081 This skill bonus was suppose to only apply to monks with epics (#1364)
This also scales up to 280 skill, so under that, you don't get as high
of a bonus
2021-05-19 19:40:51 -04:00
Dencelle a59ffc6e6b [Bug Fix] EntityList::AESpell fix for Pacify / Mez (#1354)
* [Bug Fix] EntityList::AESpell fix for Pacify / Mez

this fixes AE pacify / Mez spells only landing on 4 when it shouldn't have a cap

* Update effects.cpp

added constants

* Update effects.cpp

opmization thanks to @mackal

* Update effects.cpp

this fixes the unlimited issue

* added Spells:AOEMaxTargets to rules

incase a server doesn't want there to be a absolute unlimited AOE targeting for spells

* Update ruletypes.h
2021-05-15 17:33:45 -04:00
hg c1c2d7b302 [Dynamic Zones] Store min and max players on dz (#1355)
This starts some changes that move storage of things from expeditions to
dynamic zone class so other systems can possibly use them. This will also
make it easier to move window packet creation methods to DynamicZone.

For now these will remain on the expeditions table in the database. This
can be re-evaluated once other components are moved and seeing how other
systems may want to handle their player requirements.
2021-05-12 19:59:48 -05:00
Paul Coene 4cc24dea75 [GM Command] #list npcs Goto option now goes to higher Z if selected NPC is a boat. (#1349)
* #list npcs Goto option now goes to higher Z if npc selected is a boat.

Makes using #list npcs and using the goto button more useful when NPC is a boat, as normal Z will put you in the water.

* Use ?: instead of bool multiply

* Update command.cpp
2021-05-12 19:17:55 -05:00
hg 1f896d05ed [Repository Generator] Fix repository generator on windows (#1353)
Remove hardcoded port
2021-05-12 19:16:29 -05:00
Michael Cook (mackal) 1f978ffd72 [Bug Fix] EntityList::AESpell was off by one (#1351)
We need to do the spell effect first, then check the limits
2021-05-12 19:13:05 -05:00
JJ 6ce273baf5 [SQL] Tweak SQL from #1339 [skip ci] (#1348) 2021-05-10 11:13:58 -05:00
Alex e18b332414 [CLE] Reset iterator in IsAccountInGame() (#1345) 2021-05-10 01:34:40 -05:00
Paul Coene 2edda6e743 [Feature] Allow any spawn2 spawned mob to path while zone is idle if new flag is set. (#1339)
* Changes to allow any spawn2 to be marked to path even when zone is idle

* Fixed for Kingly review of PR

Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:21:43 -05:00
Paul Coene b335568bf9 Prevent client update while on boat if boat turning (#1343)
Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:15:38 -05:00
JeffyW 0758250ad1 [Installer] $ENV support, formatting, and optimizations (#1340)
* [Installer] $ENV support

Add support for passing in installation variables instead of install_variables.txt.

In particular:
- EQEMU_SERVER_SKIP_UPDATE
- EQEMU_SERVER_SKIP_MAPS_UPDATE
Both work the same as files with the same name.

- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
All get read into the same $installation_variables collection, and are still overridden by any values found in installation_variables.txt

- MYSQL_HOST
Added to the list of $installation_variables, supported in installation_variables.txt, and overrides the default host for where the database lives (allowing it to be a separate container)

- MYSQL_ROOT_PASSWORD
If set, will use "root" as the user for DROP/CREATE DATABASE calls, to prevent requiring the "eq" user requiring more permission than is given by default with the MySql/MariaDB containers.

* [Installer] new_server_with_bots

Enabling bots requires both updated binaries and some database scripts.  Fetching source and compiling the code is the longest part of setting up a new server.  If you know you want bots, rather than having to do it twice, we can just accept an option to do it all at the same time.

* [Installer] Git/Source/Build optimizations

Source code is the same for bot/non-bot, so switch to a common directory for source and separate directories for build.

If the source directory already exists with a .git subfolder, rather than attempt to re-clone, instead do a git pull to still get the latest code.  Helps when using a shared volume but rebuilding containers.

* [Installer] Formatting / Cleanup

Fixed some indentation, added an existing option to the utility script output, removed some excess newlines, and moved a debug output to help identifying errors.
2021-05-10 01:15:11 -05:00
Paul Coene 843aac631b [Bug Fix] Add debugging and fix edge case where no target for aggro mob (#1344)
Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:10:13 -05:00
hg 0ce7c11d36 [Expeditions] Track DZ member status in world (#1341)
World now caches and tracks member statuses so it can send them to zones
that request them on startup. Prior to this the cle would be searched in
world for every zone startup caching request, now it's only searched once
when a new expedition is created.

Bulk loading statuses removed since it would only be needed on world
startup now and likely have no clients in the client list anyway.

This also lets world choose non-linkdead members on expedition leader
changes and better detect when a leader change needs to occur
2021-05-10 01:07:19 -05:00
Alex 26d374d52a [Quest API] Add IsRaidTarget() to Perl and Lua (#1347)
- Add $npc->IsRaidTarget() to Perl.
- Add npc:IsRaidTarget() to Lua.
2021-05-10 01:05:46 -05:00
Paul Coene 39f5949441 #grid delete was deleting the grids everywhere (#1346)
Fix to only delete correct zone grid.
2021-05-09 16:39:54 -04:00
hg abf73947f4 [Dynamic Zones] Rename dynamic zone structs (#1327)
* Rename dz member id field

The name of the struct is enough to make this implicit

* Rename dz member enum and struct

Rename ExpeditionMember to DynamicZoneMember

Rename ExpeditionMemberStatus to DynamicZoneMemberStatus

* Rename dz window packet structs

This makes it more clear the window may be used by any dynamic zone
system not just expeditions (live missions fill the window when
player doesn't have an active expedition).

* Rename dz window packet fields
2021-04-27 18:53:56 -05:00
Michael Cook (mackal) 4358e24dab [Bug Fix] Fix use-after-free corruption with some DB calls (#1335) 2021-04-27 18:53:34 -05:00
Michael Cook (mackal) c063d9512e [Rule] Add a rule to disable the Pet Resist buff (#1337)
Spells:July242002PetResists defaults to true
2021-04-27 18:52:39 -05:00
Alex 39de9c04f6 Add new experience modifiers table to GetCharacterTables() and GetPlayerTables() in database_schema.h. (#1338) 2021-04-27 18:52:00 -05:00
Alex 1637ea95cb Fix Perl NPC GetAvoidanceRating() Perl Croak. (#1333) 2021-04-27 17:46:59 -04:00
Paul Coene 6fb687871c Fix calls to GetSafePoints to not pass null_ptr as zonename (#1336)
* Fix calls to GetSafePoints to not pass null_ptr as zonename

* Fix GetSafePoints to check and deal will nullptr being sent as short_zone_name

* Remove unintentinal formatting change

* Fix some typos/cut-n-paste errors I assume

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-27 17:21:37 -04:00
Alex dd06033a58 Add character-specific zone-based experience modifiers. (#1326)
* Add character-specific zone-based experience modifiers.

This will allow server operators to give players individual experience modifiers (regular and AA).

Zone ID 0 will server as a global modifier for players, if no rows are found the modifier defaults to 1.0 so experience is neither increased nor decreased.

Setting a zone-specific modifier will override the zone ID 0 global modifier.

Requires a SQL update: sql/git/required/2021_04_11_character_exp_modifiers.sql

- Add quest::getaaexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_aa_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::getexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::setaaexpmodifierbycharid(character_id, zone_id, aa_modifier) to Perl.
- Add eq.set_aa_exp_modifier_by_char_id(character_id, zone_id, aa_modifier) to Lua.
- Add quest::setexpmodifierbycharid(character_id, zone_id, exp_modifier) to Perl.
- Add eq.set_exp_modifier_by_char_id(character_id, zone_id, exp_modifier) to Lua.
- Add $client->GetAAEXPModifier(character_id, zone_id) to Perl.
- Add client:GetAAEXPModifier(character_id, zone_id) to Lua.
- Add $client->GetEXPModifier(character_id, zone_id) to Perl.
- Add client:GetEXPModifier(character_id, zone_id) to Lua.
- Add $client->SetAAEXPModifier(zone_id, aa_modifier) to Perl.
- Add client:SetAAEXPModifier(zone_id, aa_modifier) to Lua.
- Add $client->SetEXPModifier(zone_id, exp_modifier) to Perl.
- Add client:SetEXPModifier(zone_id, exp_modifier) to Lua.

* Removed unneeded [].

* Fix variable name,

* Fix variable name.

* Fix version.h.

* Rename 2021_04_11_character_exp_modifiers.sql to 2021_04_23_character_exp_modifiers.sql

* Update db_update_manifest.txt
2021-04-23 08:47:39 -04:00
Alex 13a50f7806 [Quest API] Add HTML color tag method to Perl and Lua. (#1324)
* Add HTML color tag method to Perl and Lua.
- Add quest::gethexcolorcode(color_name) to Perl.
- Add eq.get_hex_color_code(color_name) to Lua.

Full color list here: https://pastebin.com/rUYKr1ye

* Convert to static and use strcasecmp over strcmp.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-04-22 23:52:00 -05:00
Paul Coene c18562b150 [Bug] Fix ignore_primary_assist. (#1323)
* [Bug] Fix ignore_primary_assist.

* Fix to continue loop instead of return

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-22 23:40:17 -05:00
Michael Cook (mackal) dba3010c89 [Strings] Split String Optimizations (#1325)
* Switch the 2 split calls to SplitString

* Nuke duplicate split in favor of SplitString #1263

* Add a test for SplitString

* Optimize SplitString

Benchmarking:
--------------------------------------------------------------
Benchmark                       Time           CPU Iterations
--------------------------------------------------------------
bench_oldsplit               5201 ns       5201 ns     129500
bench_split                  1269 ns       1269 ns     548906

This is splitting a VERY long SpecialAbilities string. This is ~75%
speed up.
2021-04-22 23:36:39 -05:00
Alex 00fb9bc9f9 [Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.

With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.

This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.

The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()

Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()

SetStartZone parameter list was fixed also.

This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.

This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.

* Removed possible memory leaks.

* Fix SQL.

* Fix client message.

* Fix debug log.

* Fix log message.

* Fix call in rebind overload.

* Fix floats.

* Add default to column.
2021-04-22 22:49:44 -05:00
splose 5893730704 [Rules] Add rule 'GM:MinStatusToBypassLockedServer' (#1330)
* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked

* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked
2021-04-22 22:42:14 -05:00
Alex 0f23bd24cc [Quest API] Convert Client GetLastName() method export to Mob export. (#1331) 2021-04-22 22:41:19 -05:00
Peter Rigby 324d48aa90 [Fix] Moved assigning of AISpellVar variables before AI_Start() so that any values that override the rule values will not be ignored (#1321) 2021-04-07 01:22:42 -05:00
hg dadc1b2843 [Expeditions] Refactor expedition caching (#1315)
Add common expedition base class

Use repository for zone and world expedition caching

World now stores members and leader as Member objects instead of ids

This improves readability of the caching methods and lets world cache
expedition dzs and members like zone. World also now caches expeditions
as unique_ptr which will be necessary for future dz callback lambdas
that capture 'this' so addresses don't change on cache vector resizes.
2021-04-07 01:20:35 -05:00
Michael Cook (mackal) 0534a2c6be Switch scheduled hot zone check to search instead of split (#1313)
Using search_deliminated_string here is significantly faster than
splitting, most likely because of dynamic memory management

Some tests on my system:

----------------------------------------------------
Benchmark             Time           CPU Iterations
----------------------------------------------------
bench_split         864 ns        864 ns     807922
bench_search         35 ns         35 ns   20265205

This test was a case where the string was present somewhere in the
middle which gave a ~96% speed up

----------------------------------------------------
Benchmark             Time           CPU Iterations
----------------------------------------------------
bench_split         936 ns        936 ns     725518
bench_search         61 ns         61 ns   11156359

This test was when the string was not present, which will be the vast
majority of times this is actually checked, was ~93% speed up
2021-04-07 01:17:30 -05:00
RoTPvP 050e78b1b6 Added a check to stop Bard song for Mezz/Stun (#1319)
* Added a check to stop Bard song for Mezz/Stun

* Cleaned Song stun / mezz stop

* Update client_process.cpp

* removed bard check & added else where

* code clean up

Co-authored-by: ProducerZekServer <go@away.com>
2021-04-02 23:44:59 -04:00
Michael Cook (mackal) 084b253ff7 Hack to fix repulsable bard charms (#1320)
This isn't the exactly the right way, but it's behavior is much closer
to live than current for Solon's Song of the Sirens (725), the other
bard charms don't repulse due to mana cost
2021-04-01 14:19:47 -04:00
Michael Cook (mackal) a9a83a2052 [Bug Fix] Misc Bard Song Fixes (#1317)
* Bards song with a mana cost shouldn't repulse

* Bard songs with SE_TemporaryPets shouldn't repulse

This is mostly just an issue with Vet AAs, the actually songs have a
recast, so are already handled

* SE_Familiar should be prevented as well
2021-04-01 14:19:29 -04:00
Akkadius d117ce0bf2 [Hotfix] Incorrect Perl usage method (docs) 2021-03-31 00:18:43 -05:00
hg 10b1f7e1ca Add missing includes to fix windows compile (#1314) 2021-03-29 18:09:36 -05:00
Akkadius 4ac32d89e8 [Hotfix] DB Manifest 2021-03-29 03:01:07 -05:00
Chris Miles 7aa5308f9c [Scheduler] Event scheduler implementation (#1257)
* Event scheduler implementation

* Create 2021_02_17_server_scheduled_events.sql

* Tweak

* Remove unused event [skip ci]

* Cleanup [skip ci]

* PR adjustments

* Database manifest
2021-03-29 02:52:57 -05:00
Michael Cook (mackal) f51bc4daaf [Fix] Clean up Filtered/MessageString functions (#1311)
This solves the OOB issue pointed out in #1304 and cleans up the code a
bit so it should be less error prone
2021-03-29 02:18:03 -05:00
hg 049fe55c7f [Expeditions] Create common dz abstract class (#1312)
This creates an abstract class in common so zone and world can share
most of the implementation. World now has access to the same dz data and
api as zone.

Rename CharacterChange to AddRemoveCharacter for clarity

Rename GetRemainingDuration to GetDurationRemaining for consistency

Move dynamic zone queries to custom repository methods
2021-03-29 02:17:36 -05:00
hg f5cf566fca [Expeditions] Let dz process its expired state (#1310)
Move early empty shutdown and process rate rules to DynamicZone scope

This decouples the expired status check from expeditions into an
internal dz method that can be called by its owning system
2021-03-28 20:43:09 -05:00
Alex 97c11a1199 [Quest API] Add new zone name methods to Perl and Lua. (#1309)
- Add quest::GetZoneShortName(zone_id) to Perl.
- Add quest::GetZoneLongNameByID(zone_id) to Perl.
- Add eq.get_zone_id_by_name(zone_name) to Lua.
- Add eq.get_zone_short_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_name(zone_name) to Lua.
2021-03-28 20:25:50 -05:00
Akkadius ba64d6f494 [Installer] Swap unstable powershell download for Perl LWP::Simple call 2021-03-28 20:04:34 -05:00
Alex 410ba4b19a [Rules] Cleanup all unused rules. (#1308) 2021-03-28 18:37:21 -05:00
Paul Coene 74076078bb [Boats] Fix x/y offsets from client to reflect EQ x/y instead of boat heading… (#1296)
* Fix x/y offsets from client to reflect EQ x/y instead of boat heading x/y

* Use std version of math calls and reduce the # of calls

* Remove errant instrumentation

Co-authored-by: Noudess <noudess@gmail.com>
2021-03-28 18:20:02 -05:00
hg d9e23a0303 [Expeditions] Decouple dz updates from expeditions (#1303)
Use internal dz messages to process duration and location changes

Add world DynamicZone class (later this will inherit from a base)

Add FindDynamicZoneByID to get dz from zone and world system caches
2021-03-28 18:14:36 -05:00
Thalix dbb9c1d4f4 Minor ruletypes.h cleanup (#1306)
Minor ruletypes.h cleanup
2021-03-28 18:06:56 -05:00
Michael Cook (mackal) d202695e88 [Cleanup] Only link Lua with zone (#1288)
Only zone requires to be linked to lua, so let's not link EVERYTHING.

There is probably more clean up we could do, but I know for a fact Lua
is only used by zone.

This probably has some measurable benefits that probably don't really
matter that much :)
2021-03-19 00:12:46 -05:00
Michael Cook (mackal) 323f5ea92e [Bug Fix] Add Bounds Checking to OP_LFGCommand Comment Processing
Theoretically this could be used to corrupt memory, but they would have
to get extremely lucky to actually execute a successful attack
2021-03-18 23:43:13 -05:00
hg 5b74f1e756 [Expeditions] Refactor expedition requests (#1301)
Move ExpeditionLockoutTimer to common

This simplifies expedition request conflict checks and uses repository
for the queries instead of processing the query result directly.
2021-03-18 23:42:41 -05:00
hg ee4af65268 [Expeditions] Cleanup client dz safe return methods (#1300)
This changes Zone::GetDynamicZone to return a pointer instead of a copy
and also lets DynamicZone be forward declared in zone.h
2021-03-18 23:42:20 -05:00
hg 739b975cad [Expeditions] [Quest API] Add expedition IsLocked to Quest API (#1292) 2021-03-16 00:04:08 -05:00
Thalix 5035451af7 [Crash] Bugfix for zone crash caused by #flymode -1 (#1291)
* Update command.cpp

Fixed typo in the command description.

* Bugfix for #flymode zone crash

Bugfix for #flymode zone crash when invalid values are passed. Also, when entering #flymode without parameters, the correct syntax is now displayed.

* Changed as requested
2021-03-16 00:03:35 -05:00
hg 18a3ff5f12 Throttle auto expedition leader changes (#1293)
This fixes unnecessary leader processing on mass dzquits

Also marks leader dirty for empty expeditions in case something goes
wrong (shouldn't be possible after 62e480fe)
2021-03-16 00:01:48 -05:00
hg 0d12bf0b1f [Expeditions] Store description and leader name on dz (#1294)
* Rename dynamic zone source files

* Store description and leader name on dz

Removes the DynamicZoneInfo struct used for switch list window. This
data can be stored on DynamicZone and kept updated by its owning system

* Separate create compass packet method

Cleanup MarkSingleCompassLoc
2021-03-16 00:00:55 -05:00
splose b3fbe1b015 add quest::get_spell_level(uint16 spell_id, uint8 class_id) (#1295) 2021-03-15 23:59:09 -05:00
splose e9cd0b15a2 setting spawn2.version to -1 will now properly spawn mobs in all zone versions (#1299) 2021-03-15 23:57:54 -05:00
Alex cd08c96fa4 [Quest API] Add secondstotime(duration) to Perl and Lua. (#1281)
- Add quest::converttime(duration) to Perl.
- Add eq.convert_time(duration) to Lua.
2021-03-11 21:38:47 -05:00
Paul Coene ac4a993259 Remove unneeded calls to DoAnim() for spells/bardsong (#1290)
* Removed DoAnim() call from spells and bard song.  Tested on rof2 and titanium

Co-authored-by: Noudess <noudess@gmail.com>
2021-03-10 00:07:30 -05:00
Thalix 435bac5599 Update command.cpp (#1289)
Fixed typo in the command description.
2021-03-07 14:40:50 -05:00
Michael Cook (mackal) d5d6b911b0 Merge pull request #1286 from EQEmu/bug_fix/petonspawn_copypasteerror
Fix copy and paste error
2021-03-06 20:09:12 -05:00
Michael Cook (mackal) 29cdca380f Fix copy and paste error 2021-03-06 19:58:18 -05:00
Alex e5f5db69b4 Merge pull request #1280 from EQEmu/bug_fix/strcpy_overlap_GetGroupLeadershipInfo
[ASan] Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
2021-03-05 19:24:42 -08:00
Alex d635e69ee3 Merge pull request #1283 from EQEmu/cleanup/Wformat-overflow
[Cleanup] Make code -Wformat-overflow safe
2021-03-05 19:23:48 -08:00
Alex a1531aa057 Merge pull request #1282 from EQEmu/bug_fix/spawngroup_leak_repop
[Leak] Port SpawnGroup stuff to unique_ptr to fix leak
2021-03-05 19:23:00 -08:00
Alex b24ba221e9 Merge pull request #1279 from EQEmu/bug_fix/group_delete
[ASan] Fix heap-use-after-free issue with groups
2021-03-05 19:20:34 -08:00
Alex 253f0594e4 Merge pull request #1278 from EQEmu/akkadius/fix-skill-caps-loading-consistency
[Bugfix] Fix Skill Caps Loading References
2021-03-05 19:20:11 -08:00
Alex 02517bf6ab Merge pull request #1276 from EQEmu/cleanup/uv_handle_cast_deletes
[ASan] Use casts to silence ASan complaints
2021-03-05 19:19:42 -08:00
Alex 184128a79b Merge pull request #1275 from EQEmu/bug_fix/stack-buffer-overflow_StopLFP
[ASan] Fix stack-buffer-overflow thanks to StopLFP
2021-03-05 19:17:12 -08:00
Alex 93869dbef6 Merge pull request #1273 from EQEmu/hate_list_quest_api
[Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl and Lua.
2021-03-05 19:16:38 -08:00
Alex af82a6c5d5 Merge pull request #1272 from noudess/master
[Bug Fix] Do not summon pet or set new pet state when PC summoned by a mob
2021-03-05 19:16:03 -08:00
Alex fdca333280 Merge pull request #1271 from EQEmu/cleanup/world_client_clearance
[ASan] Make Client::Clearance less gross
2021-03-05 19:14:26 -08:00
Alex c954c08c07 Merge pull request #1267 from EQEmu/bug_fix/realodquest_encounter_crash
[Crash] Fix ReloadQuest on Shutdown crash related to encounters
2021-03-05 19:13:58 -08:00
Michael Cook (mackal) 0b8220be32 Clean up last name handling in NPC::PetOnSpawn
Same as last time
2021-03-05 15:51:59 -05:00
Michael Cook (mackal) f7d40ec88e Clean up Merc::LoadMerc lastname processing
This is still less than ideal, but client's name restrictions should
prevent this from being an actual problem
2021-03-05 15:43:06 -05:00
Michael Cook (mackal) 316336d1cf Nuke ZoneDatabase::GetEventLogs
This wasn't called anywhere and was throwing format-overflow warnings
2021-03-05 15:25:32 -05:00
Michael Cook (mackal) 224c26620e Clean up MOTD processing 2021-03-05 15:24:40 -05:00
Michael Cook (mackal) c6d5864aa9 Port SpawnGroup stuff to unique_ptr to fix leak
This was leaking on #repop, unsure of other cases, smart pointers should
cover us though.

Direct leak of 3600 byte(s) in 18 object(s) allocated from:
    #0 0x7f2b3dbe0d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x5645dc7c9dff in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:241
    #2 0x5645dc9db3f5 in Zone::Depop(bool) ../zone/zone.cpp:1746
    #3 0x5645dca1ba6b in Zone::Repop(unsigned int) ../zone/zone.cpp:1777
    #4 0x5645db4624b7 in command_repop(Client*, Seperator const*) ../zone/command.cpp:5683

Indirect leak of 6552 byte(s) in 273 object(s) allocated from:
    #0 0x7f26f2ff8d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x558d00490bc6 in __gnu_cxx::new_allocator<std::_List_node<SpawnEntry*> >::allocate(unsigned long, void const*) /usr/include/c++/8/ext/new_allocator.h:111
    #2 0x558d00490bc6 in std::allocator_traits<std::allocator<std::_List_node<SpawnEntry*> > >::allocate(std::allocator<std::_List_node<SpawnEntry*> >&, unsigned long) /usr/include/c++/8/bits/alloc_traits.h:436
    #3 0x558d00490bc6 in std::__cxx11::_List_base<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_get_node() /usr/include/c++/8/bits/stl_list.h:450
    #4 0x558d00490bc6 in std::_List_node<SpawnEntry*>* std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_create_node<SpawnEntry* const&>(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:642
    #5 0x558d00490bc6 in void std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_insert<SpawnEntry* const&>(std::_List_iterator<SpawnEntry*>, SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1903
    #6 0x558d00490bc6 in std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::push_back(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1220
    #7 0x558d00490bc6 in SpawnGroup::AddSpawnEntry(SpawnEntry*) ../zone/spawngroup.cpp:122
    #8 0x558d00490bc6 in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:291
    #9 0x558d006a1465 in Zone::Depop(bool) ../zone/zone.cpp:1746
    #10 0x558d006e1adb in Zone::Repop(unsigned int) ../zone/zone.cpp:1777
2021-03-02 12:39:04 -05:00
Michael Cook (mackal) c45395be95 Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
==1810==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffef04baf90,0x7ffef04baf98) and [0x7ffef04baf90, 0x7ffef04baf98) overlap
    #0 0x7f163bb9509e  (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
    #1 0x5652caed27b3 in Client::Handle_Connect_OP_ZoneEntry(EQApplicationPacket const*) ../zone/client_packet.cpp:1535

==1918==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffddc8057c0,0x7ffddc8057c8) and [0x7ffddc8057c0, 0x7ffddc8057c8) overlap
    #0 0x7fc61ee0e09e  (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
    #1 0x56023c149698 in WorldServer::HandleMessage(unsigned short, EQ::Net::Packet const&) ../zone/worldserver.cpp:1055
2021-02-28 21:42:51 -05:00
Michael Cook (mackal) 6d47351d15 Fix heap-use-after-free issue with groups
==2317==ERROR: AddressSanitizer: heap-use-after-free on address 0x6170000633c0 at pc 0x55ed1d8e8d8b bp 0x7ffda4bef580 sp 0x7ffda4bef578
WRITE of size 8 at 0x6170000633c0 thread T0
    #0 0x55ed1d8e8d8a in Group::SetLeader(Mob*) ../zone/groups.h:80
    #1 0x55ed1d8e8d8a in Group::DisbandGroup(bool) ../zone/groups.cpp:1016

ASan didn't like this
2021-02-28 21:40:50 -05:00
Akkadius 450c748299 Fix database connection pointer bucket consistency 2021-02-28 19:31:46 -06:00
Michael Cook (mackal) cafae9d8c6 Use casts to silence ASan complaints
I don't think these are actually causing any real problems, ASan
complains about them though since it's kind of a code smell I guess and
a potential source of problems. But our case is fine, so cast to silence
them.
2021-02-28 18:01:34 -05:00
Michael Cook (mackal) b82f376bfb Fix stack-buffer-overflow thanks to StopLFP
==1674==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffb47f3068 at pc 0x7f64ee1f531e bp 0x7fffb47f2f50 sp 0x7fffb47f2700
READ of size 432 at 0x7fffb47f3068 thread T0
    #0 0x7f64ee1f531d  (/lib/x86_64-linux-gnu/libasan.so.5+0x3f31d)
    #1 0x55c78e8d002e in WorldServer::UpdateLFP(unsigned int, unsigned char, unsigned char, unsigned int, unsigned int, unsigned int, char const*, GroupLFPMemberEntry*) ../zone/worldserver.cpp:3166
    #2 0x55c78e8d01d9 in WorldServer::StopLFP(unsigned int) ../zone/worldserver.cpp:3180
2021-02-28 17:50:07 -05:00
Michael Cook (mackal) 66f89416d5 Merge pull request #1270 from EQEmu/bug_fix/dbcore_wrong_delete
Fix deletes in DBcore::Open
2021-02-27 15:30:06 -05:00
Michael Cook (mackal) 11d0da9560 Merge pull request #1274 from EQEmu/bug_fix/zlibng-pathfix
Fix zlibng paths for appveyor
2021-02-27 14:09:51 -05:00
Michael Cook (mackal) 8de9e86fed Merge pull request #1266 from EQEmu/bug_fix/init_PhR
Initialize Mob::PhR
2021-02-27 12:29:54 -05:00
Michael Cook (mackal) 05c407fbb2 Fix zlibng paths for appveyor 2021-02-27 12:12:41 -05:00
Michael Cook (mackal) aaf41001f1 zlib-ng1.dll ends up in a different path (#1268) 2021-02-27 02:57:04 -06:00
Alex af517be184 Merge branch 'master' into hate_list_quest_api 2021-02-25 22:58:41 -05:00
Kinglykrab 1af1b7bbdc [Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl/Lua. 2021-02-25 22:53:33 -05:00
Noudess 1f3ce2b34d Remove pet move/follow on non-GM summon PCy 2021-02-25 12:12:25 -05:00
Noudess 2f239fd6a3 Don't take pet guard off when PC is summoned 2021-02-25 07:38:16 -05:00
Michael Cook (mackal) ab005e5950 [Cleanup] Make Client::Clearance less gross
It's still pretty gross, but the bits ASan really hated are less gross
2021-02-25 01:50:58 -05:00
Michael Cook (mackal) 7349f99ba2 Fix deletes in DBcore::Open
These are arrays!
2021-02-25 00:07:36 -05:00
Michael Cook (mackal) 3e7d4d1d6b We want GetEncounterName here instead 2021-02-24 02:52:15 -05:00
Michael Cook (mackal) 43fade82e5 Fix ReloadQuest on Shutdown crash related to encounters
Basically, EntityList::RemoveAllEncounters is called before ReloadQuests
resulting in stale pointers in the lua_encounters map.

We just have to remove the entry from the map.
2021-02-24 01:03:38 -05:00
Michael Cook (mackal) 3630f3ec38 Initialize Mob::PhR 2021-02-23 22:34:14 -05:00
Alex 66d24ff419 [Quest API] Add IsHorse() to Perl and Lua. (#1264) 2021-02-23 20:50:06 -06:00
Alex 2346b0f6ab Fix SQL for NPC Spells. (#1265)
* Fix SQL for NPC Spells.

* Update 2021_02_15_npc_spell_entries_unsigned.sql
2021-02-23 21:32:06 -05:00
Alex 2957f5084d [Library] Update zlibng (#1255)
* Update zlibng

* Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone

* I'm dumb, missing / in path

* Mackal helps with a dumb gitignore issue

* Adding all the files, not sure what's ignoring them and im tired of looking

* Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
2021-02-23 19:00:26 -06:00
Alex e6dee96266 Convert NPC Spell AI from int16 to uint16. (#1262) 2021-02-23 18:33:33 -06:00
Michael Cook (mackal) 86ce506956 [Cleanup] Nuke Make/AppendAnyLenString (#1251)
* Add a std::string overload for Database::SetMQDetectionFlag

* Replace calls to MakeAnyLenString in client_packet.cpp

At least the SetMQDetectionFlag ones

* Replace MakeAnyLenString calls in client_process

At least SetMQDectectionFlag ones

* Replace MakeAnyLenString in embparser

fmtlib actually is gross here, oh well.

* Replace MakeAnyLenString in merc

* Replace MakeAnyLenString in inventory

Also if'd out an unfinished implementation of Client::GetItemLinkHash

* Replace AppendAnyLenString in zonelist

* Replace AppendAnyLenString in zonelist

* Replace MakeAnyLenString in clientlist

* Nuke MakeAnyLenString/AppendAnyLenString

* Fix formatting string in zonelist
2021-02-23 18:32:19 -06:00
Michael Cook (mackal) 7a46a6595c [Cleanup] use std::make_unique (#1259)
* Convert common/eq_limits.cpp to use make_unique

* Convert common/net/console_server.cpp to use make_unique

* Convert common/net/servertalk_client_connection.cpp to use make_unique

* Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique

* Convert common/net/servertalk_server.cpp to use make_unique

* Convert common/net/websocket_server.cpp to use make_unique

* Convert common/net/websocket_server_connection.cpp to use make_unique

* Convert common/shareddb.cpp to use make_unique

* Convert eqlaunch/worldserver.cpp to use make_unique

* Convert loginserver/server_manager.cpp to use make_unique

* Convert loginserver/world_server.cpp to use make_unique

* Convert queryserv/worldserver.cpp to use make_unique

* Convert ucs/worldserver.cpp to use make_unique

* Convert world/clientlist.cpp to use make_unique

* Convert world/expedition.cpp to use make_unique

* Convert world/launcher_link.cpp to use make_unique

* Convert world/login_server.cpp to use make_unique

* Convert world/main.cpp to use make_unique

* Convert world/ucs.cpp to use make_unique

* Convert world/web_interface.cpp to use make_unique

* Convert world/zonelist.cpp to use make_unique

* Convert world/zoneserver.cpp to use make_unique

* Convert zone/client.cpp to use make_unique

* Convert zone/corpse.cpp to use make_unique

* Convert zone/dynamiczone.cpp to use make_unique

* Convert zone/expedition.cpp to use make_unique

* Convert zone/main.cpp to use make_unique

* Convert zone/mob_ai.cpp to use make_unique

* Convert zone/mob_movement_manager.cpp to use make_unique

* Convert zone/pathfinder_nav_mesh.cpp to use make_unique

* Convert zone/worldserver.cpp to use make_unique
2021-02-23 18:30:46 -06:00
TurmoilToad fa9478ac44 [Quest API] Perl Entity List Annotations (#1243)
Added category tag annotations for perl entity list methods.
2021-02-23 12:03:16 -06:00
TurmoilToad cc7904e1bc [Quest API] Perl Hate Entry Annotations (#1244)
Added category tag annotations for Hate Entry methods.
2021-02-23 12:02:51 -06:00
TurmoilToad dba69abefc [Quest API] Perl Door Annotations (#1241)
Add category type annotations to door methods.
2021-02-23 12:00:11 -06:00
TurmoilToad 041879c4e6 [Quest API] Perl NPC Annotations (#1245)
Added category tag annotations for NPC methods.
2021-02-23 11:59:57 -06:00
Michael Cook (mackal) 0887eb0976 Fix NPC Scale Manager leaking (#1254)
It should be fine to init further down after the early returns.

This wasn't really a leak that affected performance, but mainly moving
to shutup valgrind
2021-02-23 11:59:03 -06:00
TurmoilToad f8edde9587 [Quest API] Perl Mob Annotations (#1258)
Added category tag annotations for mob methods.
2021-02-23 11:54:01 -06:00
Michael Cook (mackal) 74ce20b256 Add string util search_deliminated_string (#1260)
This function takes a string of deliminated an see if another string is
one of those

This function also verifies it's not finding a substring
2021-02-23 11:52:34 -06:00
TurmoilToad 1cfdd7e4a2 [Quest API] Perl Group Annotations (#1261)
Added category tag annotations for group methods.
2021-02-23 11:51:51 -06:00
Alex bf3593a60d [Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252)
* Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content)

* Updated version.h
2021-02-23 11:50:38 -06:00
Alex 65704274cb [Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. (#1249) 2021-02-14 19:15:09 -05:00
Michael Cook (mackal) 1bc9e8aff2 Merge pull request #1239 from noudess/sneak-pull
[Game Play Mechanic] Very simple implementation of Sneak Pull
2021-02-14 18:04:30 -05:00
KimLS c23da55b95 Fix for issue in movement manager where a drop aggro can happen and processing continues. 2021-02-14 13:08:33 -08:00
Michael Cook (mackal) 2a37785a7c Merge pull request #1248 from EQEmu/remove_unused_files
[Cleanup] Remove unused files
2021-02-14 14:20:40 -05:00
Michael Cook (mackal) 0ef01165ea Fix some leaks of groups/raids (#1242)
These cases probably are exceedingly rare, but they still need to be
accounted for. (As in, I don't think anyone has run into these cases too
often to cause problems)
2021-02-12 02:07:58 -06:00
Michael Cook (mackal) f9923ffda0 Fix va_list leaks in MakeAnyLenString/AppendAnyLenString (#1240)
Slowly leaking memory for ages!

clang-tidy complained about it
2021-02-12 02:07:47 -06:00
Akkadius 6e765e7ddc Revert "[BUG] Fix for Group Leader Disband Issue"
This reverts commit f854137ca0.
2021-02-12 02:05:20 -06:00
Michael Cook (mackal) 8b4a886d01 Remove unused files
idk where these came from, NUKE EM!
2021-02-12 02:42:03 -05:00
Michael Cook (mackal) 507bbe83f3 LuaJIT calls it lua51.lib/dll on Windows ... (#1247) 2021-02-11 13:52:11 -06:00
Michael Cook (mackal) d33f806efa Add include to PATH_SUFFIXES for Windows builds (#1246) 2021-02-11 12:56:00 -06:00
Noudess d7d9c73e5e Add comment. 2021-02-09 11:32:13 -05:00
Noudess d90d680e8a More formatting 2021-02-09 11:24:25 -05:00
Noudess baa53e134a Fixed missing argument - oops 2021-02-09 10:00:17 -05:00
Noudess 3bafc5b3f4 Change modified sneak pull assist range to a rule. Fixed formatting on decls. 2021-02-09 09:50:22 -05:00
Noudess b2e4e91fbd Very simple implementation of Sneak Pull 2021-02-09 08:31:35 -05:00
Michael Cook (mackal) 10ffcf155d [Lua/Cmake] Prefer LuaJIT over normal Lua (#1235)
* Add a separate FindLuaJit.cmake

* Remove LuaJit from our modified FindLua51.cmake

* Make use of the new FindLuaJit

The reason for splitting them up like this is so we can have a
preference for LuaJIT that's not determined by the search order in
FindLua51.cmake as well as giving the server operators the choice to
prefer normal Lua with the EQEMU_PREFER_LUA cmake option
2021-02-08 23:10:16 -06:00
TurmoilToad ed71543dff Add category tags to new client methods. (#1233)
Add category tags to new client methods.
2021-02-08 23:09:42 -06:00
TurmoilToad 0dcaea1e4e Add category tags for Object methods. (#1232)
Add category tags for Object methods.
2021-02-08 23:09:16 -06:00
TurmoilToad 52a359180c Add category tags for corpse methods (#1234)
Add category tags for corpse methods.
2021-02-08 23:08:41 -06:00
Alex 8f89f38f5c Add ScaleNPC() to Perl and Lua. (#1238) 2021-02-08 23:08:07 -06:00
Alex f2b67ae969 [Quest API] Add Mob-based data bucket methods to Perl/Lua. (#1237)
* Add Mob-based data bucket methods to Perl/Lua.

* Update mob.cpp

* Update perl_mob.cpp
2021-02-08 23:06:33 -06:00
Akkadius ef0398ebd3 Move data aliases after null checks for safety [skip ci] 2021-02-08 21:50:28 -06:00
Akkadius dcc921efcb Update repo with latest template [skip ci] 2021-02-08 21:35:43 -06:00
Akkadius eedd5e2821 [Hotfix] Remove test branch fields from repo 2021-02-08 21:34:33 -06:00
Chris Miles 96b65b848b [Repositories] Insert repository improvements (#1236)
* Insert repository improvements

* Remove no longer necessary code, remove license banner since we have a license at the repo level

* Update template comments
2021-02-08 20:56:44 -06:00
Chris Miles 694d380e66 [Door Opening] Rule to let configure Animal Door Opening (#1231)
* Add rule configuration for letting animals open doors or not

* Handle one more spot

* Make adjustments and add mob property that serves as a check as to whether a mob entity can open doors or not

* Push attribute to mob window
2021-02-07 19:52:58 -06:00
Michael Cook (mackal) 672c09ee11 Provide more search paths for luajit (#1216)
The include folder on my system is /usr/include/luajit-2.0, added some
extra library names since mine was /usr/lib64/libluajit-5.1.so
2021-02-07 18:42:55 -06:00
TurmoilToad ca9756abc9 [Quest API] Perl Client Annotations (#1224)
* Update perl_client.cpp

Added category tags for client methods.

* Update perl_client.cpp

Now with less iis!  (Thanks KK)

* Update perl_client.cpp

Now with fewer slashes!

* Update perl_client.cpp

Now with fewer tabs!
2021-02-07 18:13:04 -06:00
TurmoilToad da7b5b3560 [Quest API] Perl Raid Annotations (#1226)
Added categories tags for raid methods.
2021-02-07 18:12:09 -06:00
TurmoilToad ecc1dd9475 Update perl_questitem.cpp (#1227)
Add category tags for quest_item methods.
2021-02-07 18:11:24 -06:00
Chris Miles 8f7702095b Merge pull request #1228 from EQEmu/anon_afk_client
[Quest API] Add Anon/AFK methods to Perl and Lua.
2021-02-07 18:09:49 -06:00
Chris Miles 13303a1e14 Merge pull request #1230 from EQEmu/bug_fix/name_enforcement
[Character Validation] Enforce some naming limits people were getting around
2021-02-07 18:09:22 -06:00
Chris Miles b184a5d013 Merge pull request #1229 from EQEmu/akkadius/task-code-cleanup
[Refactor and Cleanup] Task Code
2021-02-07 18:06:44 -06:00
Akkadius 9f5ce8e3c9 PR comments 2021-02-07 17:08:16 -06:00
Michael Cook (mackal) 6621338064 Enforce some naming limits people were getting around 2021-02-07 17:00:48 -05:00
Akkadius 00902d8a7e Private member prefixes for proximities and goal lists 2021-02-07 15:44:25 -06:00
Akkadius 01f69bcc51 Update task_client_state.cpp 2021-02-07 15:22:30 -06:00
Akkadius f429df39a9 Update CMakeLists.txt 2021-02-07 15:06:46 -06:00
Akkadius 0c533071d4 Yet more cleanup 2021-02-07 15:00:16 -06:00
Kinglykrab fac9c3469f Add Anon/AFK methods to Perl and Lua. 2021-02-07 00:40:08 -05:00
Akkadius 8414973077 Typo [skip ci] 2021-02-06 21:40:42 -06:00
Akkadius 5fba138a5a Improve GM command interface UI 2021-02-06 21:14:25 -06:00
Akkadius 053bdb8646 More cleanups 2021-02-06 19:19:20 -06:00
Akkadius ff5ea82e38 Split task classes into their own cpp/h files to speed up incremental compilation and make things easier to maintain 2021-02-06 18:52:14 -06:00
Akkadius 55d4865d36 Correct one missed repository pointer 2021-02-06 18:16:39 -06:00
Akkadius b01793081a More cleanup 2021-02-06 17:38:11 -06:00
Chris Miles 18e9c4dc95 Merge pull request #1225 from EQEmu/akkadius/repository-improvements
[Repositories] Explicitly pass database pointers to repository methods
2021-02-06 14:23:54 -06:00
Akkadius ed9f155f7c More logging 2021-02-06 04:37:16 -06:00
Akkadius d83dc339fc Logging cleanups 2021-02-06 04:27:41 -06:00
Akkadius 8d7fdd6549 More cleanups 2021-02-06 04:12:11 -06:00
Akkadius 65f2f823a8 More refactors 2021-02-06 03:57:46 -06:00
Akkadius fac75a3ae0 Move ClientTaskState::RemoveTaskByTaskID to repository methods 2021-02-06 03:46:03 -06:00
Akkadius 19e9c0bc22 Move ClientTaskState::RemoveTask to repository methods 2021-02-06 03:44:36 -06:00
Akkadius 9816608bba Another pass 2021-02-06 03:42:14 -06:00
Akkadius 83b279bac3 Migrate TaskManager::LoadClientState to repository methods 2021-02-06 03:00:14 -06:00
Akkadius 32aeb6197f Refactor and move TaskManager::LoadTasks to load from repositories 2021-02-06 02:33:07 -06:00
Akkadius 11eab9c284 Move TaskManager::LoadTaskSets() loading to repositories 2021-02-06 01:37:30 -06:00
Akkadius 8d863a507b Fourth pass 2021-02-06 01:25:03 -06:00
Akkadius c194e2ac9c Fix linux compile warnings 2021-02-06 01:22:22 -06:00
Akkadius aeb0dbc6ae Third pass 2021-02-06 01:14:32 -06:00
Akkadius 4039cb12ba Second pass 2021-02-06 01:05:34 -06:00
Akkadius b7983d4c20 First pass 2021-02-06 00:45:13 -06:00
Akkadius e8ab176d4a Explicitly pass database pointers to repository methods 2021-02-05 23:00:27 -06:00
Chris Miles b7f7c66a50 Merge pull request #1223 from EQEmu/akkadius/update-repositories-expeditions
[Repositories] Add expedition repositories
2021-02-05 22:45:38 -06:00
Chris Miles 3455863099 Merge pull request #1220 from EQEmu/perl_npc_formatting
Formatting NPC validation macro.
2021-02-05 22:14:34 -06:00
Akkadius 7fe0bbacd4 Add expedition repositories 2021-02-05 18:12:05 -06:00
Michael Cook (mackal) c8dfb72cd2 Merge pull request #1222 from EQEmu/feature/op_clearaa_tit
Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit
2021-02-05 16:18:19 -05:00
Michael Cook (mackal) 42b34bbf87 Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit 2021-02-05 14:17:13 -05:00
Kinglykrab 963b8fdd53 Formatting NPC validation macro. 2021-02-02 17:06:55 -05:00
Chris Miles 0923ff040f Merge pull request #1204 from EQEmu/perl_client_macro
[Quest API] Perl Client Validation Macro
2021-02-01 23:24:54 -06:00
Chris Miles 369461f9e1 Merge pull request #1205 from EQEmu/perl_doors_macro
[Quest API] Perl Doors Validation Macro
2021-02-01 23:24:26 -06:00
Chris Miles bb2dcdcb31 Merge pull request #1206 from EQEmu/perl_entity_macro
[Quest API] Perl Entity Validation Macro
2021-02-01 23:24:09 -06:00
Chris Miles e67b3dd6d4 Merge pull request #1207 from EQEmu/perl_group_macro
[Quest API] Perl Group Validation Macro
2021-02-01 23:23:46 -06:00
Chris Miles ddfc0dda42 Merge pull request #1208 from EQEmu/perl_hate_macro
[Quest API] Perl Hate Validation Macro
2021-02-01 23:23:21 -06:00
Chris Miles f7cc51c134 Merge pull request #1209 from EQEmu/perl_mob_macro
[Quest API] Perl Mob Validation Macro
2021-02-01 23:22:52 -06:00
Chris Miles 1b27d9dc9d Merge pull request #1210 from EQEmu/perl_npc_macro
[Quest API] Perl NPC Validation Macro
2021-02-01 23:19:09 -06:00
Chris Miles 8011c4afcc Merge pull request #1211 from EQEmu/perl_object_macro
[Quest API] Perl Object Validation Macro
2021-02-01 23:18:10 -06:00
Chris Miles 69de53c459 Merge pull request #1212 from EQEmu/perl_packet_macro
[Quest API] Perl Packet Validation Macro
2021-02-01 23:17:53 -06:00
Chris Miles 82b3cccc95 Merge pull request #1213 from EQEmu/perl_corpse_macro
[Quest API] Perl Corpse Validation Macro
2021-02-01 23:17:22 -06:00
Chris Miles 91d9a4f73c Merge pull request #1214 from EQEmu/perl_item_macro
[Quest API] Perl Item Validation Macro
2021-02-01 23:17:05 -06:00
Chris Miles 93f83923ce Merge pull request #1215 from EQEmu/perl_raid_macro
[Quest API] Perl Raid Validation Macro
2021-02-01 23:16:41 -06:00
Kinglykrab 9759208ed6 [Quest API] Perl Raid Validation Macro
Add validation macro to all raid methods.
2021-02-01 22:38:19 -05:00
Kinglykrab 9d3d9a97ff [Quest API] Perl Item Validation Macro
Add validation macro to all item methods.
2021-02-01 22:36:26 -05:00
Kinglykrab a29de5963f [Quest API] Perl Corpse Validation Macro
Add validation macro to all corpse methods.
2021-02-01 22:34:47 -05:00
Kinglykrab 381b029ffc [Quest API] Perl Packet Validation Macro
Add validation macro to all packet methods.
2021-02-01 22:32:43 -05:00
Kinglykrab 772c88d020 [Quest API] Perl Object Validation Macro
Add validation macro to all object methods.
2021-02-01 22:30:34 -05:00
Kinglykrab b69213abcc [Quest API] Perl NPC Validation Macro
Add validation macro to all NPC methods.
2021-02-01 22:28:15 -05:00
Kinglykrab 4338d657fc [Quest API] Perl Mob Validation Macro
Add validation macro to all mob methods.
2021-02-01 22:24:36 -05:00
Kinglykrab 2430b38406 [Quest API] Perl Hate Validation Macro
Add validation macro to all hate methods.
2021-02-01 22:16:44 -05:00
Kinglykrab 6cfe7853f5 [Quest API] Perl Group Validation Macro
Add validation macro to all group methods.
2021-02-01 22:10:50 -05:00
Kinglykrab 64c97a5283 [Quest API] Perl Entity Validation Macro
Add validation macro to all entitylist methods.
2021-02-01 22:06:41 -05:00
Kinglykrab f32f4346e7 [Quest API] Perl Doors Validation Macro
Add validation macro to all door methods.
2021-02-01 22:02:17 -05:00
Kinglykrab dcc2dcdb8d Convert perl_client.cpp to use validation macro. 2021-02-01 21:56:47 -05:00
Chris Miles 9b8845949e Merge pull request #1203 from EQEmu/perl_inventory
[Quest API] Add Inventory methods to Perl
2021-02-01 20:16:55 -06:00
Kinglykrab 36bfebfe6a Add Inventory methods to Perl.
- Add $client->GetInventory() to Perl.
- Export Lua Inventory methods to Perl.
 - Add quest::createitem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned) to Perl so you can return a ItemInstance for testing purposes.
2021-02-01 21:07:07 -05:00
Chris Miles 0c70004102 Merge pull request #1201 from splose/npcedit
[Command] Add raidtarget / respawntimer to #npcedit
2021-02-01 12:56:55 -06:00
Chris Miles 5238d30236 Merge pull request #1202 from regneq/master
RandomPath improvements
2021-02-01 12:56:06 -06:00
regneq 58e0ce6a4b fixed the references from previous commits. 2021-01-31 16:53:25 -08:00
regneq e4b437cb5f RandomPath grid type improvement
RandomPath has been changed to the following behavior:

* When stopped at a waypoint, it will now use the waypoint's pause timer if it is non-zero.  If it is zero, it will use the first waypoint's pause timer if that is non-zero.  If both are zero it will use 38 seconds.  Previously it would always use the first waypoint's pause timer if it was non-zero.  This new way is what it should have been from the start, really.

* If any waypoint is flagged as a centerpoint, then the NPCs will always return to that first randomly selected centerpoint waypoint after moving.  I.e. every other move will be to the first waypoint if the bool is set.

If any waypoint has a negative number (-1, -10, etc) in the pause timer. It will not be included in the waypoints to be random.  Instead the npc will just path through it everytime.  This is useful for a path to only select a small area to pause at before returning to it's centerpoints or another random waypoints in between it.
2021-01-31 15:11:45 -08:00
regneq 5a94e82db8 Merge pull request #7 from EQEmu/master
update
2021-01-31 14:01:54 -08:00
Alex 9713d62849 Merge pull request #1200 from hgtw/fix/empty-expedition-invite
Verify expedition is not empty on invites
2021-01-30 21:43:35 -05:00
Matthew Silvia a751339c99 add raidtarget / respawntimer to #npcedit 2021-01-30 19:43:37 -05:00
hg 62e480fed7 Verify expedition is not empty on invites
Fixes an edge case where a member could accept a pending invite into an
empty expedition before world could invalidate it
2021-01-30 18:58:39 -05:00
Chris Miles b74edd9dc2 Merge pull request #1196 from EQEmu/spell_lua_perl
Add new Spell methods to Perl and Lua.
2021-01-30 17:27:15 -06:00
Chris Miles 7eba9552e2 Merge pull request #1193 from noudess/gmmove
Use heading in GMMove and change FaceTarget not to turn boat
2021-01-30 15:29:05 -06:00
Chris Miles 396c300315 Merge pull request #1198 from EQEmu/akkadius/fix-mysqldump-buffer-allocation-edge-case
[Bugfix] Fix MySQL Dump Buffer Allocation
2021-01-29 23:51:19 -06:00
Akkadius c192590af6 Fix issue where sometimes under certain circumstances when issuing a database dump with large data over a network with extended inserts we hit a buffer threshold that kills a MySQL dump with Error 2013 2021-01-29 18:13:37 -06:00
JJ fb5fc935e7 Merge pull request #1197 from EQEmu/perl_target_ring
Fix GetTargetRingX(), GetTargetRingY(), and GetTargetRingZ() in Perl.
2021-01-28 23:34:00 -06:00
JJ 780c7a8476 Merge pull request #1195 from hgtw/feat/color-constants
Add missing chat color constants to Lua
2021-01-28 23:33:44 -06:00
JJ c72e18f082 Merge pull request #1194 from hgtw/fix/unescaped-fmt
Replace unescaped braces in format string
2021-01-28 23:33:31 -06:00
Kinglykrab a90d836bcd Fix GetTargetRingX(), GetTargetRingY(), and GetTargetRingZ() in Perl. 2021-01-28 20:29:50 -05:00
Kinglykrab c0129a6b8a Add new Spell methods to Perl and Lua. 2021-01-28 20:12:57 -05:00
hg a77d2408ac Add missing chat color constants to Lua 2021-01-28 20:10:26 -05:00
hg 6baf8412c6 Replace unescaped braces in format string
Fixes zone crash when this is logged
2021-01-28 19:42:02 -05:00
Noudess 9907984aca Use passed heading in GMMove and change FaceTarget not to turn if npc is boat. 2021-01-26 09:08:45 -05:00
Chris Miles f767a7c076 Merge pull request #1191 from EQEmu/immune_aggro
Add 4 new special attacks to Perl/Lua.
2021-01-25 19:14:28 -06:00
Chris Miles 445fcc2d40 Merge pull request #1188 from EQEmu/message_whisper
Add message(color, message) and whisper(message) to Perl/Lua.
2021-01-25 17:21:56 -06:00
Chris Miles f4ee11ac62 Merge pull request #1189 from EQEmu/popup2
Fix Popup2 Perl croak.
2021-01-25 17:21:40 -06:00
Kinglykrab d30593c35e Add 4 new special attacks to Perl/Lua.
- IMMUNE_DAMAGE_CLIENT (47)
Immune to all damage except NPC damage.

- IMMUNE_DAMAGE_NPC (48)
Immune to all damage except Client damage.

- IMMUNE_AGGRO_CLIENT (49)
Immune to aggro by a Client.

- IMMUNE_AGGRO_NPC (50)
Immune to aggro by an NPC, clients must attack directly to gain aggro, allows pet only boss mechanics and stuff.
2021-01-23 21:36:07 -05:00
Kinglykrab 102263f37d Fix Popup2 Perl croak.
Noticed the Gitbook documentation listed SendFullPopup not Popup2 due to parsing the Perl croaks in the files, causing people not to be able to find the proper way to send a full popup window.
2021-01-23 11:15:21 -05:00
Kinglykrab 19ae461e36 Add message(color, message) and whisper(message) to Perl/Lua.
- Add quest::message(color, message) to Perl.
- Add eq.message(color, message) to Lua.
- Add quest::whisper(message) to Perl.
- Add eq.whisper(message) to Lua.

These methods allow you to use implied client references. The whisper method also converts a widely used plugin in Perl to a Perl and Lua method that works on both Clients and NPCs.
2021-01-23 10:47:44 -05:00
Alex c481d52064 Add HasDisciplineLearned() to Perl/Lua. 2021-01-23 10:23:50 -05:00
Chris Miles 7c69400618 Merge pull request #1175 from EQEmu/akkadius/command-name-adjustment
[Command] Naming suggestions from https://github.com/EQEmu/Server/pull/1170
2021-01-21 18:26:35 -06:00
Chris Miles ca98ea9872 Merge pull request #1180 from noudess/boat
Allow boats flymode to be overridden by local db
2021-01-21 18:26:05 -06:00
Chris Miles 7d40e42cc2 Merge pull request #1177 from hgtw/fix/door-packets
[Bugfix] Don't respawn doors while clients are zoning
2021-01-21 18:22:53 -06:00
Chris Miles f1920f2132 Merge pull request #1178 from hgtw/fix/spawn-condition-crash
[Bugfix] Fix zone crash on spawn condition change
2021-01-21 18:22:27 -06:00
Chris Miles 30490abc50 Merge pull request #1179 from hgtw/fix/zonemap-crash
Fix zone startup crash if maps not installed
2021-01-21 18:22:04 -06:00
Chris Miles c5c0a3a73e Merge pull request #1181 from EQEmu/aa_message
Add AA gain messages.
2021-01-21 18:21:35 -06:00
Chris Miles 0551cfc013 Merge pull request #1182 from EQEmu/race_class
Add Race/Class Name and Bitmask Methods.
2021-01-21 18:19:56 -06:00
Chris Miles 1a2cec58f1 Merge pull request #1184 from EQEmu/finditem
#finditem Changes
2021-01-21 18:19:28 -06:00
Chris Miles a9b992a1b0 Merge pull request #1186 from hgtw/fix/expedition-max
Fix bug that could allow expeditions to exceed max members
2021-01-21 18:18:04 -06:00
hg d87ae839a2 Verify members in db on expedition invites
Fixes an exploit where multiple accepted cross zone invites could race
with cache updates and allow an expedition to exceed its max members
2021-01-21 19:02:00 -05:00
Kinglykrab 0f859a2a0f Preferential changes to #finditem, doesn't show stack options if item isn't stackable.
Only shows 1 or max stack size of item for summoning items. Also resolves the issues some people were having where this command would summon an item with 1 charge instead of max charges because 1 was supplied as charges. In my experience most people who summon items like this want either one item or a full stack of an item and the summon size here is relative to the current item's stack size. Also shows name first instead of ID so the formatting is better.
2021-01-19 18:34:19 -05:00
Kinglykrab 7e1e1651e4 Add GetClassBitmask(), GetClassName(), GetRaceBitmask(), and GetRaceName() to Perl/Lua. 2021-01-18 18:47:32 -05:00
Kinglykrab 1c00edb458 Add AA gain messages. 2021-01-15 19:54:44 -05:00
Noudess eb24e333d7 Allow boats flymode to be overridden by local db 2021-01-11 10:58:08 -05:00
hg 836210404c Fix zone crash on spawn condition change
The NPC pointer held by Spawn2 wasn't reset if the npc was depopped
without a respawn timer by #depop commands or depop(false) quest apis.
If the NPC was part of a spawn condition then the condition would try
to dereference that pointer (which gets deleted) on condition change.
2021-01-08 23:53:06 -05:00
hg 896dd48960 Fix zone startup crash if maps not installed 2021-01-08 20:55:56 -05:00
hg 312ee2b42c Don't respawn doors while clients are zoning
Fixes regression from b08dc02a (PR #1051)

The normal door list sent on zone entry caused unopenable double doors
on clients if an api respawned them while the client was zoning. This
waits until the client finishes zoning and has received the initial
door list before sending any despawn/respawn packets.
2021-01-07 20:05:55 -05:00
Akkadius 3fc1aea3ce Naming suggestions from https://github.com/EQEmu/Server/pull/1170 2021-01-04 11:44:23 -06:00
Chris Miles 0f5a7e1317 Merge pull request #1173 from EQEmu/akkadius/npc-guard-scan-fix
[Bugfix] Very edge case Guard awareness latency
2021-01-04 11:38:23 -06:00
Alex bebf95cfe3 Merge pull request #1170 from splose/ww
Add #wwcast command.
2021-01-03 19:19:56 -05:00
splose 02aa4302de Merge branch 'master' into ww 2021-01-03 18:58:00 -05:00
Chris Miles b7d002dd8b Merge pull request #1171 from KinglyKrab/client_fling
Add client->Fling() to Perl/Lua.
2021-01-03 17:20:04 -06:00
Chris Miles 480e3a89df Merge pull request #1172 from KinglyKrab/target_ring
Add GetTargetRingX(), GetTargetRingY(), and GetTargetRingZ() to Lua.
2021-01-03 17:19:02 -06:00
Chris Miles 427b4db2b3 Merge pull request #1166 from fryguy503/barter-bag-bug
[Bug] Barter was allowing the purchase of bags. Bags could contain…
2021-01-03 17:18:31 -06:00
Chris Miles 306328529e Merge pull request #1169 from splose/endurance
#endurance
2021-01-03 17:18:01 -06:00
Chris Miles 0396bada96 Merge pull request #1165 from fryguy503/instrument-autoequip
[Bug] Prevent Bards from auto equip loot when using instrument
2021-01-03 17:17:08 -06:00
Chris Miles e9be7146af Merge pull request #1164 from fryguy503/group-fixes
[Bug] Fix for Group Leader Disband Issue
2021-01-03 17:13:31 -06:00
Akkadius 53bbbbba1d Add comments around close mob system [skip ci] 2021-01-03 17:07:10 -06:00
Akkadius f5817677df Only add self to others when moving 2021-01-03 16:42:34 -06:00
Akkadius 7b9d88b70b Fix a situation where guards don't scan fast enough because they stand idle, moving mobs will add themselves to guards 2021-01-03 16:40:56 -06:00
Matthew Silvia 4750768e0f Merge branch 'ww' of https://github.com/splose/Server into ww
# Conflicts:
#	zone/command.cpp
2021-01-03 13:20:01 -05:00
Matthew Silvia 90295d8dec change name 2021-01-03 13:18:33 -05:00
Matthew Silvia 6fe05bbf5e change name 2021-01-03 13:16:01 -05:00
Matthew Silvia a4d8d2261a change name 2021-01-03 13:09:09 -05:00
Evan Alexander King c58ba2e6a5 Add GetTargetRingX(), GetTargetRingY(), and GetTargetRingZ() to Lua. 2021-01-03 03:21:54 -05:00
Evan Alexander King 3fa236c2bb Add client->Fling() to Perl/Lua.
- $client->Fling(value, target_x, target_y, target_z, ignore_los, clipping) in Perl.
- client:Fling(value, target_x, target_y, target_z, ignore_los, clipping) in Lua.
2021-01-03 03:12:01 -05:00
Matthew Silvia e13346560e #ww 2021-01-02 23:24:28 -05:00
Matthew Silvia d6e29810f1 #endurance 2021-01-02 23:17:47 -05:00
Trust 29e693d443 Also added LogGroupDetail 2021-01-02 22:57:57 -05:00
Trust 7fbf522aa3 Added LogGroup to logging aliases. 2021-01-02 22:54:26 -05:00
Chris Miles 0456bef903 Merge pull request #1167 from hgtw/fix/instance-corpses
Move player corpses on instance shutdown
2021-01-02 21:31:28 -06:00
hg 6c8c81f3db Move player corpses on instance shutdown
Moves corpses to graveyard when an expired instance shuts down.
Zones without a graveyard move them to non-instance version instead.

Fixes player corpses being left inside instances that expire
before graveyards process or in instances without a graveyard
2021-01-02 19:42:18 -05:00
Trust 538092d59e Fix for incorrect slot definition. 2020-12-31 11:33:04 -05:00
Trust 789cfb2490 [REBASE] Barter was allowing the purchase of bags. Bags could contain anything and it would be traded. 2020-12-31 00:44:55 -05:00
Trust 83928fa4d0 [REBASE] Prevent Bards from auto equip loot when using instrument 2020-12-31 00:22:54 -05:00
Trust f854137ca0 [BUG] Fix for Group Leader Disband Issue
Added public/private class for oldleadername so we can save the previous leader name when the entity is destroyed then allow us to transfer leadership.

Adjusted DelmemberOOZ and in zone functions to include removal of the old leader when disbanding.
2020-12-31 00:16:27 -05:00
Chris Miles de5b7f472d Merge pull request #1163 from hgtw/feat/dz-expeditions
[Expedition / DZ] HGTW DZ / Expedition System
2020-12-30 21:16:22 -06:00
hg 33e5bd0b67 Assign db version to expedition schema 2020-12-30 18:47:59 -05:00
hg a312cd6e1d Don't sync character lockout uuid
Fixes regression that caused loot event apis to stop working
2020-12-30 18:47:33 -05:00
hg 8b2b2db848 Move offline players to dz safereturn
This is an experimental change which allows members to log in at the
safe return if they were offline when the expedition was deleted.
Prior to this they would log in at bind instead

Partially reverts commit 32c69d235d
Removed expedition members are no longer hard deleted from db
2020-12-30 18:47:33 -05:00
hg 4f9eaf7574 Sync character lockouts when entering dz
This removes the is_pending column from character lockouts table

Synchronizing character lockout timers with the expedition's when zoning
into the dynamic zone simplifies adding missing lockouts to new members.
This also matches live behavior that replaces any character lockout
timers from another expedition with ones from the current expedition
2020-12-30 18:47:32 -05:00
hg fc7d8a82e5 Sort #dz list output by dz id
Sort #dz expedition list by expedition id
2020-12-30 18:47:32 -05:00
hg 81e4bd6040 Reduce expedition member status packet updates
Only send update for expedition member status if it changes

Avoids unnecessary packets when members zone
2020-12-30 18:47:32 -05:00
hg 54a175b3ef Cleanup unused arg in remove lockout method 2020-12-30 18:47:32 -05:00
hg 738fd48163 Use id not name in dz makeleader world msg 2020-12-30 18:47:32 -05:00
hg e5916c5c03 Add rule to enable "In Dynamic Zone" status
Live doesn't appear to ever update with this status
2020-12-30 18:47:32 -05:00
hg 1de590137f Verify new expedition leader in world
Cleanup makeleader methods

World now checks if character is expedition member instead of zone
2020-12-30 18:47:32 -05:00
hg 311042f06d Add ExpeditionMember::IsValid method 2020-12-30 18:47:32 -05:00
hg 6acfc41778 Let world handle expedition leader changes
This should eliminate race conditions caused by zones trying to set
a leader when members in different zones quit at the same time

Zone still detects when leader goes offline to trigger a change
since it's easier than having world process expedition member status
updates and perform expedition lookups
2020-12-30 18:47:32 -05:00
hg 955cbeb826 Revert "Don't set member offline before linkdead"
This reverts commit 8d27602aa0.

This doesn't work because a linkdead leader coming back online will
toggle to offline state anyway
2020-12-30 18:47:32 -05:00
hg 6e9f920931 Add saylinks to #dz list output 2020-12-30 18:47:32 -05:00
hg 4ae9904822 Use strlen for perl hash key size 2020-12-30 18:47:32 -05:00
hg c0b8bfde03 Fix invalid return in perl expedition api
This was returning an invalid (garbage) hash reference for
empty results when filtering on expedition name
2020-12-30 18:47:32 -05:00
hg c09ada67d6 Add expedition lock message constants to perl 2020-12-30 18:47:32 -05:00
hg cc5dd4cd82 Add missing expedition perl api declaration 2020-12-30 18:47:32 -05:00
hg 8708564889 Don't send info packet when new member added
It isn't necessary to send this packet to current members when a new
expedition member is added. The member list packet changes the current
player count on the window
2020-12-30 18:47:32 -05:00
hg f506ce9d58 Reduce packet updates when expedition member added
This fixes unnecessary packets and compass updates being sent for
invited members and better matches live's packet update pattern

This also fixes duplicate updates being sent to the added member

Live only sends a MemberListName update for members added through a
swap (player count doesn't change). For members added through an
invite it sends expedition info and a full member list update

A full member list update is sent for both cases in this patch. This
is because MemberListName currently always adds members with status
"unknown". This is either due to unknown packet fields or a change
in future clients
2020-12-30 18:47:32 -05:00
hg 074b7096df Use fmt join for simple query strings 2020-12-30 18:47:32 -05:00
hg b46eca4ec6 Store expeditions with dz id not instance id
This exposes dynamic zone ids for any future changes and will make it
easier to preserve historic dz and expedition data. This also cleans up
some dynamic zone creation for expedition requests

When purging instances the expedition table is no longer updated
since dynamic zone ids are not re-used like instance ids are

Update #dz list commands to show dz id

Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
2020-12-30 18:47:32 -05:00
hg 54500b0e72 Use column aliases for expedition request query 2020-12-30 18:47:31 -05:00
hg d2ad2ec078 Add comment to FormatName 2020-12-30 18:47:31 -05:00
hg b85feb5461 Rename expedition packet fields 2020-12-30 18:47:31 -05:00
hg 022f82291a Rename world expedition cache to state 2020-12-30 18:47:31 -05:00
hg 579c300cbc Rename expeditions table 2020-12-30 18:47:31 -05:00
hg 0f051b68ae Separate world expedition source files 2020-12-30 18:47:31 -05:00
hg 58b3708a47 Use named args in CreateExpedition lua api
This is a breaking api change

All expedition request parameters are now passed via a single table
containing hash keyed options to define values
2020-12-30 18:47:31 -05:00
hg b68994f25c Change all expedition tables to latin1
The lockout tables are latin1 to support older MySQL and MariaDB
versions that limit indexes
2020-12-30 18:47:31 -05:00
hg ad51de052c Cleanup expedition perl api croak messages 2020-12-30 18:47:31 -05:00
hg 77406d7322 Add AddReplayLockoutDuration api 2020-12-30 18:47:31 -05:00
hg 3ed7215a92 Rename character expedition lockouts table 2020-12-30 18:47:31 -05:00
hg 3a1eb51890 Send lockout times with client rounding offset
Add 60s to lockout times sent to clients. Lockout timers
are rounded down to the nearest minute when displayed

This replaces the lockout leeway rule with better behavior
2020-12-30 18:47:31 -05:00
hg ca113cdd85 Let world dispatch expedition expire warnings
This depends on C++14 remaining enabled for chrono literals
2020-12-30 18:47:31 -05:00
hg da5d4b9830 Send all members expedition expire warnings
All expedition members are notified not just those in dz

This will only work if the dz is running. It might make more sense to
move this to client or world processing so members are notified even if
the zone instance isn't running
2020-12-30 18:47:31 -05:00
hg 79287fc507 Require zone id to get expedition by instance id
This is a breaking api change
eq.get_expedition_by_instance_id(instance_id) is replaced with
eq.get_expedition_by_zone_instance(zone_id, instance_id)

This replaces the FindCachedExpeditionByInstanceID method of
obtaining expeditions via instance id with a new method that
requires the dz zone id as well
2020-12-30 18:47:31 -05:00
hg cd98b8bc6f Only send member updates after caching dz data
This fixes characters not receiving a compass if they're already
in the compass zone when an expedition is created from another zone
2020-12-30 18:47:31 -05:00
hg 18dd9e6637 Add #dz expedition unlock command
Add expedition name and zone to #dz expedition list

Adjust #dz list output
2020-12-30 18:47:31 -05:00
hg 6266aa86a4 Add perl expedition api 2020-12-30 18:47:31 -05:00
hg c26c6af356 Remove rule to verify expedition leader with db
This is a holdover from earlier system design and shouldn't be necessary
2020-12-30 18:47:11 -05:00
hg a3a6e55d22 Add lockout timer multiplier rule
This allows servers to adjust all new lockout durations added
during special events like live does
2020-12-30 18:47:11 -05:00
hg b965a165b1 Add api to update expedition expire time
Add SetSecondsRemaining method to set expire time on expedition
2020-12-30 18:47:11 -05:00
hg 2c2c2ac5ee Add api to get expedition's zone name 2020-12-30 18:47:11 -05:00
hg cbccd72050 Truncate members after conflict checks
This more accurately matches live for the new behavior introduced
in the September 16, 2020 patch. All members of a raid/group are
still checked for conflicts and the truncation is only allowed if
there are none.

It might make sense to add a rule for this since ignoring members
that would exceed the expedition max from the start makes it more
convenient to create expeditions. Members that wouldn't be added
anyway don't really need their conflicts checked.
2020-12-30 18:47:11 -05:00
hg 3db23e402c Add api to add lockout to all clients in zone 2020-12-30 18:47:11 -05:00
hg c45840173e Load dz from cache on client switchlist reply 2020-12-30 18:47:11 -05:00
hg 76b5803f83 Let MovePCDynamicZone filter on zone version
Add client GetDynamicZones method to provide a single method to get all
associated client dynamic zones

Refactor compass update and MovePCDynamicZone to use this method
instead of searching for client dzs separately

Add optional disable message arg to MovePCDynamicZone
2020-12-30 18:47:11 -05:00
hg b377fd183a Add api to add lockout duration
Also supports reducing lockout duration

Add Expedition::AddLockoutDuration

Add Client::AddExpeditionLockoutDuration

Some expeditions require adding to existing lockout durations
during progression. These add the specified seconds to individual
member lockout timers instead of setting a static duration based on
internal expedition lockout like UpdateLockoutDuration.
2020-12-30 18:47:11 -05:00
hg 8e52dd0579 Add expedition lock messages 2020-12-30 18:47:11 -05:00
hg b5db40cba6 Add GetZoneVersion to expedition api 2020-12-30 18:47:11 -05:00
hg ea34aa2030 Add group and raid api to check for lockout
Add Group and Raid method DoesAnyMemberHaveExpeditionLockout

This is required by some expeditions that perform a manual check for
custom dialogue (Ikkinz group expeditions)
2020-12-30 18:47:11 -05:00
hg 40717970ff Cleanup some expedition message formatting 2020-12-30 18:47:10 -05:00
hg 1d24432e47 Truncate expedition members to max on creation
This implements the new behavior from live's September 16, 2020
(test server's September 8, 2020) patch

Expeditions can be created even when the client's group or raid
exceeds the expedition's max player requirement. Members are added
until the max player count is reached and the rest are ignored.

Raid members are added ordered by their raid group number with
ungrouped members having the lowest priority

Rename expedition request method ValidateMembers to CanMembersJoin

Change some expedition messages to System color (live changes)
2020-12-30 18:47:10 -05:00
hg a597753bee Increase default early dz shutdown time
Increases default from 15 minutes to 25 minutes

This compensates for current default graveyard timer code. Otherwise
instances may shutdown before graveyards can process any corpses.

A better fix needs implemented later to deal with corpses inside
expired dynamic zone/instances. Zones without graveyards should move
corpses to the non-instance version and zones with graveyards should
somehow still be processed (maybe offloaded to world?)
2020-12-30 18:47:10 -05:00
hg 4d1abce084 Allow zone name in alt CreateExpedition api 2020-12-30 18:47:10 -05:00
hg f822798c63 Cleanup some vector emplacements in expeditions 2020-12-30 18:47:10 -05:00
hg 0c5bd9b338 Escape expedition and event names in queries
Fixes names that have apostrophes
2020-12-30 18:47:10 -05:00
hg 779fc6265e Load character lockouts without looping 2020-12-30 18:47:10 -05:00
hg d6ab87e2c4 Avoid world message on offline member invite
Expedition member status can be used to choose the message
2020-12-30 18:47:10 -05:00
hg 6e5ca19d18 Get dz safe return from cache not db
This was loading the dz from database to get safe return data every time
a client's dz removal timer triggered

Add the Zone::GetDynamicZone() method so zones that are dz instances can
find the data from the cache of any dz systems
2020-12-30 18:47:10 -05:00
hg fba078bbe9 Format name in expedition invite message
Live uses the original unformatted user input in invite messages, but
this doesn't seem necessary to emulate
2020-12-30 18:47:10 -05:00
hg ce19deb5d1 Add rule to always notify new expedition leader
On live, new expedition leaders are only notified if made leader from
the /dzmakeleader command (or from ui). This rule makes it so the new
leader is always messaged on a leader change for cases where previous
leader goes offline or quits
2020-12-30 18:47:10 -05:00
hg 1f3c5af996 Add #dz makeleader command 2020-12-30 18:47:10 -05:00
hg 9c4df6f026 Don't set member offline before linkdead
This prevents toggling to offline state before setting to and from
linkdead status. Without this change, a new expedition leader will be
chosen as soon as the current leader goes linkdead. On live an
expedition leader retains leadership while linkdead
2020-12-30 18:47:10 -05:00
hg d8b825f478 Fix linkdead expedition member offline update
This was leaving expedition members with linkdead status even after
the client was timed out by the server
2020-12-30 18:47:10 -05:00
hg ba9ce2335e Set new expedition leader on leader disconnect
Only choose an online member as new leader on leader changes

Keep leader online status updated in zone expedition caches

Currently this will also trigger a leader change if the leader goes
linkdead. On live the character retains leadership while linkdead
and a new one is only chosen once kicked offline
2020-12-30 18:47:10 -05:00
hg 15235d77f7 Fix regression deleting expedition from db
Set expedition's instance id NULL instead of deleting it from the
database when instances are deleted. Only expedition functions
should delete expeditions

This fixes a regression caused by removing foreign key constraints

The expedition_details row was being deleted and not the corresponding
expedition_members and expedition_lockouts rows. Any characters inside
the members table could no longer join expeditions
2020-12-30 18:47:10 -05:00
hg cb4a117503 Cleanup some expedition logging and formatting
Remove logging unsanitized input

Make unsigned comparison not compare < 0

Cleanup some FormatName and string usage. Some of these strings could
probably be moved instead

Remove unnecessary expedition lookup in a world message handler
2020-12-30 18:47:10 -05:00
hg d61879fd3c Add character id based expedition apis
Add static expedition methods to add or remove character lockouts

Add CreateLockout static helper to ExpeditionLockoutTimer

Refactor existing character lockout removal to allow removal of lockouts
for offline characters (was only used by #dz lockouts remove command)

Fix #dz list member count
2020-12-30 18:47:10 -05:00
hg 3e373210c5 Remove dz check in expedition invite reply
Characters can no longer be re-invited while inside a dz, these checks
aren't necessary
2020-12-30 18:47:10 -05:00
hg 5a826add92 Cleanup expedition headers and unused variables
Modify some expedition and dz logging

Remove unnecessary includes in expedition sources
2020-12-30 18:47:10 -05:00
hg 3843ed6540 Don't log expired lockouts in expedition request
Removes logging of lockouts with timer under leeway rule
2020-12-30 18:47:09 -05:00
hg 184ea679f2 Refactor client cross zone message helpers
Remove extra cross zone message server opcode and struct. Existing
function already exists for normal messages

Group CZClientMessageString struct with other CZ structs
2020-12-30 18:47:09 -05:00
hg e99528fe73 Change lockout packet variable to signed 2020-12-30 18:47:09 -05:00
hg 70161aecc4 Remove fk constraints in expedition tables
Add expedition tables to database schema lists
2020-12-30 18:47:09 -05:00
hg e8d250827d Add api to update lockout duration
Some live expeditions update a lockout's duration during progression

The current AddLockout method replaces lockout timers. This updates the
expiration of an existing lockout by modifying the original duration

Only members are updated and not the internal expedition timer by
default. This is so new members receive the original duration like live
2020-12-30 18:47:09 -05:00
hg f97cc7cdec Add expedition event loot api
Add SetLootEventByNPCTypeID and SetLootEventBySpawnID quest apis

These associate events with npcs or entities inside the dz to prevent
them from being looted by characters that didn't receive the event
lockout from the current expedition.

This fixes an exploit that allowed a player that already had a lockout
from another expedition being added to loot after the event is complete
2020-12-30 18:47:09 -05:00
hg 06d84b83de Remove member history from expeditions
Expedition uuids are now used to check if characters may re-join
2020-12-30 18:47:09 -05:00
hg da2a6205ed Use replay timer uuid to allow re-invite
Instead of allowing all previous members to bypass a replay timer
conflict, only allow if expedition uuid of the lockout matches

This fixes an exploit for expeditions that add delayed replay timers.
Members could be part of an expedition on creation and then quit to form
another expedition. They could then always be re-invited to the original
expedition even with a conflicting replay timer lockout.
2020-12-30 18:47:09 -05:00
hg fa21d835d9 Store lockouts with source expedition uuid
Add Client::GetLockoutExpeditionUUID quest api

Refactor lockout update methods to take ExpeditionLockoutTimer parameter

Fix updating expedition lockout cache for multiple AddLockout calls

Fix updating lockout duration when replacing a lockout in database

Replace lockout timer inherited flags with expedition uuid comparisons

Remove is_inherited column from expedition_lockouts table
2020-12-30 18:47:09 -05:00
hg 6a7980ec75 Assign expeditions a uuid 2020-12-30 18:47:09 -05:00
hg f23ca8055f Remove replay timer argument to CreateExpedition
Breaking change to the current API

has_replay_timer column removed from expedition_details table

This argument is unnecessary and just creates confusion. Expedition
replay timers use a hardcoded name precisely for this purpose and
those lockouts are already being checked on creation requests.
2020-12-30 18:47:09 -05:00
hg 892556e26d Fix replay timer assignment to new members
Ignore expired state of replay timers when assigning to new members

This fixes a regression from a previous change that stopped assigning
expired lockouts to new members. Only expired event timers should be
ignored for new members. Replay Timers should always be added with a
a fresh lockout
2020-12-30 18:47:09 -05:00
hg 75410e8886 Don't allow expedition re-invite inside dz
Live requires characters that quit an expedition to zone out before
being re-added. This is probably to avoid exploiting max player
requirements by constantly swapping players in and out
2020-12-30 18:47:09 -05:00
hg 4af5f79328 Remove logging of expedition query failures
This is redundant with sql error logging. Logging the operations is
enough to determine the source of any errors
2020-12-30 18:47:09 -05:00
hg ea0b37b7fc Store expedition duration and times as chrono
This simplifies comparisons and reduces conversions
2020-12-30 18:47:09 -05:00
hg 006f7bf9e9 Don't remove expedition lockouts from non-members
Clients still inside a dz after being removed from an expedition
should only ever have lockouts added
2020-12-30 18:47:09 -05:00
hg 17be2bf2f7 Clear stale pending expedition lockouts
Delete pending lockouts of members on expedition creation

Delete pending lockouts when all members removed from expedition

This fixes an edge case where members could incorrectly be assigned
pending lockouts that were never cleared from the database (from a
server crash or other situation) after entering another dz.
2020-12-30 18:47:09 -05:00
hg 6165550133 Copy instead of moving expedition request data 2020-12-30 18:47:09 -05:00
hg 59d10a9db3 Process character lockout results in db methods 2020-12-30 18:47:09 -05:00
hg f287e9318e Refactor member validation in expedition requests
Small cleanup of logic and unused variables

Rename LoadValidationData to LoadMembersForCreateRequest

Remove unnecessary early string building for members query

Remove unnecessary lockout expired check for leader messages
2020-12-30 18:47:09 -05:00
hg 402491b36b Refactor expedition member online status requests
This optimizes character status requests by only sending a single
bulk request to world for characters in all expeditions instead of
sending a separate request for each expedition on zone startup
2020-12-30 18:47:09 -05:00
hg 2c4f505309 Refactor zone expedition caching
This optimizes caching all expeditions by loading dynamic zone data and
expedition members in bulk instead of for each expedition separately.
This reduces the number of queries from 1+2n to 3 total.

Expedition members are now joined in the initial query since empty
expeditions aren't cached anyway. Optional internal lockouts for all
cached expeditions are loaded in a single bulk query afterwards.

Dynamic Zone data is also loaded as a single bulk query afterwards to
simplify processing and keep dz database logic separated. It might be
worth investigating if joining dz data in the initial expeditions load
query is worth refactoring for.
2020-12-30 18:47:08 -05:00
hg f9eafa52f9 Ignore expired lockouts on expedition invite
This fixes an edge case with client invites sometimes failing because
an expired lockout hasn't been removed from client yet

Clients no longer receive expired lockouts from expeditions when joining
2020-12-30 18:47:08 -05:00
hg 4284624096 Remove expedition includes from client header
Make quest compass a vec3 to remove include dependency

Quest compass location doesn't require a zone id since it can only be
set in the zone that it's drawn in. Drop the DynamicZoneLocation member
and forward declare to remove the dependency on header.

Move ExpeditionInvite struct to zone common header

Including expedition.h in client.h just to use the ExpeditionInvite struct
is an unnecessary header dependency that increases incremental build time.
This allows expedition classes to be forward declared in client header.
2020-12-30 18:47:08 -05:00
hg 9b82cf57e4 Add #dz lockouts remove by event name 2020-12-30 18:47:08 -05:00
hg 9164073d14 Let world shutdown dz early for empty expeditions
Since world now tracks empty expeditions it can determine when to
shutdown dynamic zone instances when the rule is enabled rather than
letting zones do it.
2020-12-30 18:47:08 -05:00
hg 148af3edfc Only delete empty expeditions when the dz is empty
Zones are no longer able to delete expeditions. World now tracks empty
expeditions in cache and only deletes them when it detects an
expedition's dynamic zone instance has no more clients inside.

This fixes an exploit where lockouts couldn't be applied to expeditions
after all members were removed because zones were deleting the expedition
immediately. Clients still inside the dz were able to complete events
before being kicked from the instance while not having an expedition.

Expeditions are no longer purged from database in the world purge
instance timer to avoid a possible race with this new system
2020-12-30 18:47:08 -05:00
hg dcbcc5a156 Implement world cache to monitor expeditions
This implements a small cache in world to track expedition states.

This fixes expired expeditions being left in zone caches unless the
expedition's dz instance was running to detect it (or unless an
expedition was deleted via a client using /kickplayers). This was also
leaving clients in a ghost expedition that no longer actually existed
2020-12-30 18:47:08 -05:00
hg 33f2336244 Only draw dynamic zone compasses in non-instances
This fixes compasses being drawn in instances that use the same zone as compass

Also adds RemoveCompass method to quest api
2020-12-30 18:47:08 -05:00
hg 3f4ea66ea1 Implement expedition locking
Disables the ability to add new members

Adds Expedition::SetLocked(bool) to quest api

Adds is_locked column to expedition_details db table
2020-12-30 18:47:08 -05:00
hg 5ddb62e275 Make adding replay timers to new members optional
Not all expeditions with a replay timer lockout add it to newly
added members automatically

This adds the Expedition::SetReplayLockoutOnMemberJoin(bool) method
to the quest api so it can be disabled
2020-12-30 18:47:08 -05:00
hg a7795eda5d Change expedition tables to latin1_swedish_ci
Fixes insertion in MySQL older than 5.7.7 and MariaDB older than 10.2.2
that limit indexes to 767 bytes. This may be a temporary fix until
future refactoring
2020-12-30 18:47:08 -05:00
hg aee3e1084c Fix missing invite failure messages 2020-12-30 18:47:08 -05:00
hg 39fad0c1a0 Remove unused ExpeditionMemberStatus Lua constants 2020-12-30 18:47:08 -05:00
hg 32cc2d66dd Use stl algorithms for expedition member searches 2020-12-30 18:47:08 -05:00
hg 780cf148fa Use built-in benchmarking for expedition caching 2020-12-30 18:47:08 -05:00
hg 8c1f556f29 Rename #dz cache to #dz expedition
Add expedition's remaining dz time to expedition list

Move #dz destroy to a #dz expedition subcommand

Add success or failure messages to destroy command
2020-12-30 18:47:08 -05:00
hg c9504452e1 Add #dzkickplayers command for pre-RoF clients
Performs "/kickplayers exp" for older clients without the command
2020-12-30 18:47:07 -05:00
hg 528b74109e Only update dz expire time if reducing
Add optional UpdateExpireTime parameter

This is currently only used when an expedition becomes empty to make
dynamic zone instances shutdown earlier. For that it should only update
if new time is less than remaining time
2020-12-30 18:47:07 -05:00
hg 89c6d1e258 Send expedition re-invite to clients that zone
Moves expedition message handling in world to Expedition method
for messages that need special handling
2020-12-30 18:47:07 -05:00
hg 50f9a49911 Check for empty expedition via database not cache
Checking the cache on member removal here isn't reliable due to race
with cross zone message

If a zone removes a member at the same time as another zone, neither zone
can know if the expedition will be empty via cache unless it processes the
world message from the other zone's member removal first.
2020-12-30 18:47:07 -05:00
hg cc0c5afd00 Add alternative CreateExpedition api
This allows expedition creation to be passed via Lua tables

This also allows for compass, safereturn, and/or zone in location data
of dynamic zones to be set on expedition creation from lua api

Usage example:
  local instance_info = {
    "anguish", 0, 21600,
    compass = { 300, 1353.15, 1712.19, 109.001 },
    safereturn = { 300, 1349.13, 1715.00, 123.81, 0 },
    zonein = { -9, -2466, -79, 0 }
  }
  local expedition_info = { "Anguish, the Fallen Palace", 6, 54, true }
  local dz = e.other:CreateExpedition(instance_info, expedition_info)
2020-12-30 18:47:07 -05:00
hg a1b5b210dd Send client lockout update in lockout methods
Add optional client update argument to client lockout methods

This is better than requiring callers to manually send the update
2020-12-30 18:47:07 -05:00
hg d92c0e330d Validate expedition invite response server side
Stores expedition invite data on client
2020-12-30 18:47:07 -05:00
hg 43963783db Add instance time remaining to #dz list output 2020-12-30 18:47:07 -05:00
hg 11181190ee Add expired lockouts leeway rule
Adds a rule for leeway with expired lockouts during creation requests

The client removes lockout timers with under 60s remaining from the
window. This allows a small leeway to compensate so players don't
request an expedition that has visually hidden lockouts.
2020-12-30 18:47:07 -05:00
hg af766dd323 Move LoadAllClientLockouts back to a client method 2020-12-30 18:47:07 -05:00
hg 158dad052c Clear client expedition info if removed inside dz
Clears client expedition info immediately if removed inside dynamic zone

Live clears expedition info from clients removed inside a dz on the same
timer used for removals, even if the client zones before it triggers.
This is problematic to mimic and not worth the effort
2020-12-30 18:47:07 -05:00
hg a9c65cd4b2 Filter out expired instances from #dz list
Add 'all' argument to #dz list to optionally show expired instances
2020-12-30 18:47:07 -05:00
hg ef77b28b3f Add #dz lockouts remove command
This allows clearing a character's lockouts

Adds client RemoveAllExpeditionLockouts methods and exposes to lua api
2020-12-30 18:47:07 -05:00
hg b116730885 Fix wrong group leader name in expedition requests
Get group leader name from Client if possible and ask database otherwise

Group::GetLeaderName() is unreliable and broken for groups formed across
zones. The correct leader name is needed here to avoid any possible
exploits with an invalid leader bypassing lockout checks.
2020-12-30 18:47:07 -05:00
hg 78eb3be127 Add option to disable expedition conflict messages
Add optional argument to CreateExpedition to disable conflict messages

Some live expeditions like anguish use a timeout to prevent excessive
leader conflict messages while still performing a creation request
2020-12-30 18:47:07 -05:00
hg 1819b7c23b Cache new expedition before sending client updates
Compass updates get data from the expedition cache so it needs to be
cached first.

Currently this doesn't affect anything because compass isn't sent to
CreateExpedition and has to be set post-creation. In the future this
will make the order of client messages more live accurate though
2020-12-30 18:47:07 -05:00
hg eccc79e4ce Let dz handle client removal timers
Remove all clients inside a dz, not just those assigned to instance
2020-12-30 18:47:07 -05:00
hg 9102bb1478 Assign lockouts to all clients inside dz
This is live like and prevents possible exploiting by dropping
expedition before a lockout. Clients will continue receiving lockouts
until they leave the zone or are kicked via timer
2020-12-30 18:47:07 -05:00
hg 8eef2ae089 Add DynamicZone class for expedition instancing
Add DynamicZone sql table schema

Add DynamicZones logging category

Modify CreateExpedition to take DynamicZone and ExpeditionRequest objects

Implement DynamicZone compass, safereturn, and zone-in coordinates.

Implement live-like DynamicZone instance kick timer for removed members

Implement updating multiple client compasses (supports existing quest compass)

fix: Send client compass update after entering zones to clear existing compass

Implement Client::MovePCDynamicZone to invoke DynamicZoneSwitchListWnd
when entering a zone where client has multiple dynamic zones assigned

Implement OP_DzChooseZoneReply handling

Add Lua api methods for expedition's associated dynamic zone

Add #dz list gm command to list current DynamicZone instances from database
2020-12-30 18:47:07 -05:00
hg f74605d339 Implement Lua quest api for expeditions 2020-12-30 18:47:06 -05:00
hg 7798504641 Add expeditions sql schema file 2020-12-30 18:47:06 -05:00
hg da067be2fa Implement initial expedition system
Add Expeditions logging category

Add handlers for all Dynamic Zone/Expedition related opcodes

Add FormatName string_util function to format character names

Add Zone::IsZone helper method

Add cross zone MessageString support with variable parameters

Add static Client method helpers for cross zone messaging

Add #dz gm command to debug expedition cache for current zone
2020-12-30 18:47:06 -05:00
hg a77f8b582e Update opcodes and packet structs for expeditions
Add and rename some opcodes

Add packet translations for expeditions

Fix OP_DzExpeditionEndsWarning opcode for RoF2

Add RoF2 OP_KickPlayers
2020-12-30 18:47:06 -05:00
Alex 51a74c23ef quest::getspellname() and quest::getclassname() fixes/additions. (#1158)
- Update GetSpellName() to uint16.
- Add more classes to GetClassIDName().
2020-12-30 14:47:27 -06:00
Alex c593ed6a05 Add SetRadiantCrystals() and SetEbonCrystals() to Perl/Lua. (#1159)
- Add $client->SetRadiantCrystals(value) to Perl.
- Add $client->SetEbonCrystals(value) to Perl.
- Add client:SetRadiantCrystals(value) to Lua.
- Add client:SetEbonCrystals(value) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2020-12-30 14:46:09 -06:00
Chris Miles c1d7a82307 [DevTools] Improve DevTools Toggling Options (#1161)
* Improve devtools toggling

* Cleanup a few more references
2020-12-30 14:43:33 -06:00
Alex a920d449ff Add removeitem(item_id, quantity) to Perl/Lua. (#1156)
- Perl: quest::removeitem(item_id, quantity);
- Lua: eq.remove_item(item_id, quantity);
2020-12-29 18:21:47 -06:00
Paul Coene 21a1a7bed7 Client tracks pet sit/stand - force new pets to stand rather than use client (#1155)
Co-authored-by: Noudess <noudess@gmail.com>
2020-12-22 18:05:02 -06:00
Paul Coene 8a0f242fc6 Added RACE_BOAT_533 to IsBoat() (#1154)
Co-authored-by: Noudess <noudess@gmail.com>
2020-12-22 14:45:17 -06:00
Michael Cook (mackal) 4ec9ccae98 Merge pull request #1153 from thalix1337/master
Fix for Feature/underworld, typo in SQL
2020-12-22 12:56:09 -05:00
thalix1337 cc344ac98a Fix for Feature/underworld, typo in SQL 2020-12-22 18:06:26 +01:00
Michael Cook (mackal) 69a8507908 Feature/underworld (#1146)
* Update NewZone_Structs

* Update packet translators for NewZone_Struct

* Add OP_UnderWorld OPcodes

These aren't implemented yet, but I thought it would be good to document
them. This sends up just entity ID and location when you fall
underworld. This could possibly be used to check for someone screwing
with zone data locally to warp or something I guess.

* Add database fields
2020-12-21 17:08:04 -06:00
Thalic f87662f676 Minor ortographic corrections of ruletypes.h (#1147)
* Update ruletypes.h

* Update ruletypes.h
2020-12-21 17:07:45 -06:00
Paul Coene 1eb5e4a0c1 Remove the extra erroneous message (DoT landing message) at mob death if mob dies of DoT. (#1138)
* Removed the erroneous message of a DoT "landing" when a mob dies from that DoT

* Set spell=-1 on Death struct for NPCs.  It was causing extra DoT msg.

* Remove whitespace

Co-authored-by: Noudess <noudess@gmail.com>
2020-12-21 17:07:15 -06:00
neckkola a1cc68d214 Added new Perl/LUA GetSpellIDByBookSlot (#1151)
Added a new questAPI GetSpellIDByBookSlot to allow for sorting spellbooks by various attributes (level, type, etc).  Allows to determine which spell is in what book slot.
2020-12-21 17:06:48 -06:00
Alex c6d4d8f291 Merge pull request #1148 from noudess/waterroam
Destination check needed to be actual ground z at loc.  -15 wasnt enough
2020-12-13 16:38:55 -08:00
Noudess fff53fc465 Destination check needed to be actual ground z at loc. -15 wasnt enough 2020-12-13 10:17:04 -05:00
Chris Miles 5a4c651d6b Drone Build Pipeline (#1144)
* Create drone config

* Tweak config

* Update .drone.yml

* Garbage commit to run another build

* Bring cores down

* Fix formatting from https://github.com/EQEmu/Server/pull/1142

* Add tests line

* Change directory to build before running the unit tests

* Remove tests dir

* Avoid double build on PR's

* Testing build settings
2020-12-07 22:36:59 -06:00
Alex ff4c9e1e70 Merge pull request #1142 from noudess/waterroam
Allow water based roamboxes again.
2020-12-07 14:07:59 -08:00
Noudess 8bc60acd77 Fix so roamboxes allow water boxes again. 2020-12-07 11:10:59 -05:00
E Spause f26b3195c9 Add safeguard for issue with mobs pathing to 0,0,0 on teleport nodes with values 0,0,0 (#1140)
* IP limit and account session limit refactor - uses responses built into loginserver

* Fix an issue where teleport nodes with 0.0f as a value were added to routes when pathing.
2020-12-05 15:15:53 -06:00
Michael Cook (mackal) 31019b8832 Merge pull request #1137 from EQEmu/bug_fix/rest_timer
Save the rest_timer sooner to prevent issues
2020-11-22 14:35:24 -05:00
Michael Cook (mackal) df4ccaf970 Merge pull request #1136 from EQEmu/bug_fix/quest_reward_charges
Update the SummonItem call to default charges for QuestRewards
2020-11-22 14:08:33 -05:00
Michael Cook (mackal) eb0d12f220 Save the rest_timer sooner to prevent issues
We need to save the remaining time sooner to prevent circumstances
described here:

http://www.projecteq.net/forums/index.php?threads/raid-out-of-combat-regen-timers-resetting-on-non-raid-mobs.16114/
2020-11-17 15:47:12 -05:00
Michael Cook (mackal) 60254105f1 Update the SummonItem call to default charges for QuestRewards
This should summon the item at max charges, if it has charges
2020-11-05 19:40:04 -05:00
Akkadius 1fc4073a05 Garbage commit to push a build 2020-11-03 19:46:47 -05:00
Chris Miles be12cad7bd Fix for quest::GetZoneLongName(zone_short_name) garbled output (#1134) 2020-10-31 18:47:43 -05:00
Akkadius 25c596656c Merge branch 'master' of https://github.com/EQEmu/Server 2020-10-25 23:49:08 -05:00
Akkadius ee7ef97506 Revert "Spell Fizzle for < LDON expansions via lua_mod (#1118)"
This reverts commit e9d312fa86.
2020-10-25 23:48:57 -05:00
Chris Miles 80ce499f67 Scanning Optimizations (#1133)
* Scanning optimizations this more properly applies idle / moving scanning algorithms and applies update_others when a client is moving

* Fix bots

* Perform a self and other scan when npc's pop
2020-10-25 23:01:30 -05:00
Chris Miles 62efae2e00 SendIllusion Update Internal Values (#1130)
* Fix scenarios where quest calls to SendIllusion also update internal values so that new clients that zone in see the correct appearance

* Typo [skip ci]
2020-10-25 21:48:29 -05:00
Ali Al-Khalifa e9d312fa86 Spell Fizzle for < LDON expansions via lua_mod (#1118)
* [expansions] Create a Lua mod hook into Client::CheckFizzle()

* Added expansions_combat.lua mod stub

* Spell  Fizzle as per TAKP formula
2020-10-24 19:49:43 -05:00
Chris Miles c1c010bc8d Merge pull request #1128 from EQEmu/editmassrespawn_upd
Fix for command '#editmassrespawn'
2020-10-10 20:19:14 -05:00
Uleat f03669b8f4 Fix for command '#editmassrespawn' 2020-10-10 21:13:13 -04:00
Paul Coene b996f40016 Merge pull request #22 from EQEmu/master
Merge base back into my fork
2020-10-09 11:30:38 -04:00
Chris Miles a4a4a2266b Merge pull request #1122 from EQEmu/bug/item_loss_message
Only UF and earlier have the CORPSE_ITEM_LOST string
2020-10-06 02:30:26 -05:00
Chris Miles 82512899b2 Merge pull request #1126 from snail23/master
Compile fix on linux
2020-10-06 02:30:01 -05:00
JJ 4ac62a2ddc Merge pull request #1123 from noudess/amphibious
Allow amphibious mobs underwater to follow los and not fall to water bottom when pathing
2020-10-05 20:17:37 -04:00
Snail 1d4bea21c1 compile fix on linux (glm is using c++14 code), update CXX_STANDARD 2020-10-04 18:50:19 -04:00
regneq ed351fb4cb Merge pull request #6 from EQEmu/master
update
2020-10-01 08:02:43 -07:00
Noudess d507222d21 Allow amphibious creatures to swim to next node of pathing. 2020-09-21 10:36:00 -04:00
Paul Coene 27e19900ae Merge pull request #21 from EQEmu/master
Merge from base.
2020-09-21 10:27:18 -04:00
Michael Cook (mackal) 32f4722c0f Only UF and earlier have the CORPSE_ITEM_LOST string
Let's not confuse players with missing messages I guess
2020-09-20 13:55:45 -04:00
Chris Miles 5e93746e8c Merge pull request #1119 from noudess/master
Fix bugged pet sit button and taunt.
2020-09-19 18:48:13 -05:00
Michael Cook (mackal) 1106e404c7 Merge pull request #1121 from EQEmu/bug_fix/pet_affinity_solo_fix
Fix issue where a group buff was casted on a solo player
2020-09-10 14:25:37 -04:00
KimLS 0e2c918479 Added alias to lua skills that don't start with a number so i can use them with typescript which don't allow identifiers starting with 0-9 2020-09-09 21:29:29 -07:00
Noudess 05dfe748d3 Use aabonuses.PetCommands instead of checking AA level 2020-09-08 19:10:48 -04:00
Noudess cd2b2c3c19 Fix indentation. 2020-09-08 16:48:09 -04:00
Michael Cook (mackal) 6f2b39792a Fix issue where a group buff was casted on a solo player
The pet affinity in this case was checking the caster's AAs not the
target's like it should
2020-09-08 15:57:17 -04:00
Noudess ff6de1938b Change older clients to default to taunting=true only for taunt eligble pets. 2020-09-03 15:38:35 -04:00
Noudess d5451c5d77 Remove left over logging. 2020-09-02 14:56:12 -04:00
Noudess 96fb156c47 Change Older clients to not use persistant taunt button & default to taunt on. 2020-09-02 14:50:51 -04:00
Noudess 56afa0404b Updates to fix taunt button on PET UI to match live behavior. 2020-09-02 12:50:11 -04:00
Noudess 29f7bc7a9c Fix bugged pet window sit button and pet sit based regen. 2020-08-31 13:39:42 -04:00
Paul Coene ad74af7797 Merge pull request #20 from EQEmu/master
Merge from base
2020-08-28 18:59:13 -04:00
Chris Miles 3fe0f59deb Merge pull request #1117 from EQEmu/xackery/vscode-update
changed build dir to /bin, updated peq db dump
2020-08-24 08:03:53 -05:00
Xackery Xtal ebf1cc2bc6 changed build dir to /bin, updated peq db dump 2020-08-23 18:17:23 -07:00
Akkadius 32407dbb56 Add rule Character:FinalExpMultiplier - Added on top of everything else, easy for setting EXP events 2020-08-21 01:04:18 -05:00
Chris Miles 482816058f Merge pull request #1113 from EQEmu/fix/ZonePoint_memleak
Fix memory leak for virtual zone line branch
2020-08-21 00:25:27 -05:00
Chris Miles 8ed2ea5cfe Merge pull request #1114 from noudess/patch-1
Removed duplicate code for pruning merhantlist_temp
2020-08-21 00:24:59 -05:00
Chris Miles 5d4a78fb3f Merge pull request #1112 from noudess/untargettable
Add check so that the 'u' key does not open a trade window with an untargettable mob.
2020-08-21 00:24:28 -05:00
Chris Miles ebea77e8ea Merge pull request #1115 from EQEmu/bugfix/command_task
Fix missing arg to client message in #task
2020-08-21 00:24:03 -05:00
Akkadius 51356610b2 Fix overflow issue with character corpse creation using the wrong struct in allocation 2020-08-21 00:23:13 -05:00
Michael Cook (mackal) 84a75f2a77 Fix missing arg to client message in #task 2020-08-19 17:13:28 -04:00
Paul Coene 9be5ac4ca6 Update main.cpp 2020-08-19 14:58:04 -04:00
Paul Coene b8586bf9cb Update main.cpp 2020-08-19 14:57:21 -04:00
Paul Coene 7cc23fcbeb Removed duplicate code for pruning merhantlist_temp
The code already exists, guarded by a rule.
2020-08-19 14:48:28 -04:00
Michael Cook (mackal) 539de20a11 Fix memory leak for virtual zone line branch 2020-08-18 23:32:45 -04:00
Chris Miles b57bcced40 Merge pull request #1111 from EQEmu/bug_fix/aepcv1_mobai_distance
Fix NPC AI casting of ST_AEClientV1
2020-08-18 13:21:53 -05:00
Noudess 9ab61d4ed4 Fix so an untargettable mob is not opened for trade when client pressed the 'u'
key.  Discovered this on untargettable mobs at doors.
2020-08-18 11:15:33 -04:00
Paul Coene 09e0b09649 Merge pull request #19 from EQEmu/master
merge from base
2020-08-18 10:55:21 -04:00
Michael Cook (mackal) b9f01e0d1c Merge pull request #1107 from fryguy503/percentheal_aggro
[Aggro] PercentalHeal should be included in aggro generation
2020-08-17 21:17:40 -04:00
Michael Cook (mackal) f7e997fba1 Fix NPC AI casting of ST_AEClientV1
As noted, I think we do this check incorrectly, but this should work
fine and matches other similar spells, let's get it good enough first.
2020-08-17 18:04:52 -04:00
Akkadius 78776df107 Update world content service API's to consider all expansions enabled 2020-08-16 20:04:49 -05:00
Trust bd4810351d [Aggro] PercentalHeal should be included in aggro generation
Per January 15th 2003 Patch Notes:
"NPCs will now notice Druid and Shaman Percentage Heal spells in a manner similar to traditional healing spells."

Added SE_PercetalHeal to the same CheckHealAggroAmount as SE_CurrentHP to be similar to traditional healing spells.
2020-08-16 18:32:26 -04:00
Chris Miles 0506c01103 Merge pull request #1102 from fryguy503/AERamp
[Combat] AE Ramp now allows Max Melee Range
2020-08-16 02:03:54 -05:00
Chris Miles 24a8ca39d3 Merge pull request #1100 from noudess/empty_processing
Allow quests to turn on mob processing in empty zones
2020-08-16 02:03:22 -05:00
Chris Miles ecf47a0bbb Merge pull request #1097 from SecretsOTheP/null_ptr_fixes
Null ptr fixes
2020-08-16 02:02:46 -05:00
Chris Miles 6a4a4de31c Merge pull request #1106 from EQEmu/feature/virtual-zonepoints
Add support for virtual zonepoints
2020-08-16 01:42:33 -05:00
Akkadius efdead0b0a Add expansion info 2020-08-16 01:12:30 -05:00
Akkadius e319746ca9 Typos 2020-08-16 00:16:50 -05:00
Akkadius f78828216d Add support for virtual zonepoints 2020-08-16 00:06:20 -05:00
Akkadius 9d0f7781b4 Fix compiler warnings 2020-08-15 19:03:25 -05:00
Akkadius f6e544a2e6 Merge branch 'master' of https://github.com/EQEmu/Server 2020-08-15 18:49:24 -05:00
Akkadius 3ffb5299a8 Update repositories 2020-08-15 18:28:34 -05:00
Chris Miles aeb1ce0fbe Merge pull request #1105 from EQEmu/feature/lootdrop-changes
Lootdrop Filtering Adjustments
2020-08-15 17:55:18 -05:00
Akkadius 4b764e2cc5 Set loot default log [skip ci] 2020-08-15 17:48:10 -05:00
Akkadius 45f08b4645 Cleanup some logic 2020-08-15 17:43:20 -05:00
Akkadius 0e31302a7d Add an easy way to pull item saylinks 2020-08-15 17:25:09 -05:00
Akkadius 94d87584aa Lootdrop level filtering adjustments 2020-08-15 16:37:38 -05:00
Trust 3245fa6123 [Combat] AE Ramp now allows Max Melee Range
RuleR AERampageSafeZone - Reduce AE Ramp range by this amount to allow for a small safe zone on AE Ramp.
2020-08-09 14:04:03 -04:00
Akkadius bda13383ef Revert "Merge pull request #1101 from KinglyKrab/custom"
This reverts commit 43108acae1, reversing
changes made to daa1db65b9.
2020-08-03 22:21:51 -05:00
Alex 43108acae1 Merge pull request #1101 from KinglyKrab/custom
Custom changes.
2020-08-03 23:17:37 -04:00
Alex ff7c3aff92 Custom changes. 2020-08-03 23:14:39 -04:00
Chris Miles daa1db65b9 Merge pull request #1094 from EQEmu/integration/multi-tenancy-expansions-repository
Integration/multi tenancy expansions repository
2020-07-30 22:27:58 -05:00
Chris Miles fd48912bd2 Merge pull request #1098 from EQEmu/lua_update_zone_header
Add Lua eq.update_zone_header export to lua_general.cpp.
2020-07-30 22:07:47 -05:00
Akkadius cfa3e88bb2 Add command #gearup as a fairly decent start to a expansion specific way of gearing up a GM test character 2020-07-30 21:10:15 -05:00
Noudess 8e7591cd4b Added support for quests to enable and then redisable processing of movement. 2020-07-27 10:43:24 -04:00
Paul Coene 44a1256eb9 Merge pull request #18 from EQEmu/master
Merge mainline into my fork
2020-07-27 09:53:56 -04:00
Akkadius a307636962 Fix object update spam issue (terrible code) 2020-07-20 22:53:58 -05:00
Akkadius a617fc5034 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-07-19 20:40:00 -05:00
Alex 63ad92090a Add Lua eq.update_zone_header export to lua_general.cpp. 2020-07-19 18:01:06 -04:00
E Spause 147916ce2e Set group info to null in various places
When the group is disbanded, set the leader to null.

When setting a new raid leader, make sure we have a new raid leader. If we don't, avoid a crash and disband the raid. It's better than zones falling apart, and will resolve itself on the next VerifyRaid call.

If a member zones, set the leader pointer to nullptr. This fixes an issue where the leader pointer is freed later (MemberZoned normally cleans up the Client object), but referenced by other entities, allowing the leader to be used in the same server process tick, post-cleanup - as the leader won't exist.
2020-07-19 02:34:59 -04:00
Akkadius 98340751b0 Sanity check on adding self to other lists 2020-07-19 01:34:25 -05:00
E Spause 42781036a8 Fix issue where npc_types could become null in the cache but remain referenced, causing a crash due to invalid memory accessed 2020-07-19 02:31:22 -04:00
E Spause eacd2c2cde Fix null pointers in group/raid pointer removal 2020-07-19 02:30:50 -04:00
Akkadius 2e0c892b07 Add cli character:copy-character and #copycharacter 2020-07-18 21:07:22 -05:00
Akkadius 880b19cc7f Hit the zone cache first so we're not hitting the database every time someone attempts to zone 2020-07-18 13:16:27 -05:00
Chris Miles fc6689ec09 Merge pull request #1096 from noudess/master
Added Rule to enable AA Ding()
2020-07-18 11:50:37 -05:00
Noudess db4f113129 Added rule to allow the Ding sound when AA is earned. 2020-07-13 08:12:02 -04:00
Akkadius 30e0bbb912 More conversion changes to reduce warnings [skip ci] 2020-07-12 17:33:17 -05:00
Akkadius 6a7a78af29 Static cast floats in atof usages where the datatype is actually float to avoid windows compiler warnings 2020-07-12 17:25:50 -05:00
Akkadius 758a30a080 Fix merge 2020-07-12 16:57:36 -05:00
Akkadius 3016f9409b Fix merge 2020-07-12 16:57:04 -05:00
Chris Miles 7ba55759c5 Merge pull request #1095 from EQEmu/world_wide_lua_overrides
Add Lua overrides to worldwide methods to make additional parameters optional.
2020-07-12 16:53:47 -05:00
Akkadius 8647bd73ce Merge remote-tracking branch 'origin' into integration/multi-tenancy-expansions-repository 2020-07-12 16:51:36 -05:00
Alex e033d89a32 Add Lua overrides to worldwide methods to make additional parameters optional. 2020-07-08 18:16:20 -04:00
Paul Coene a8928d4a39 Merge pull request #17 from EQEmu/master
Merge master into our fork
2020-07-08 15:48:20 -04:00
Chris Miles b801f8dfe5 Merge pull request #1092 from EQEmu/cross_zone_overhaul
Completely overhaul cross zone and world wide methods in quest API.
2020-07-07 14:15:29 -05:00
Chris Miles b0b63cc64c Merge pull request #1093 from EQEmu/hot_reload_adjustments
Add hot reload saylinks as well as a rule to determine if you bypass the saylinks.
2020-07-07 14:13:15 -05:00
Alex c8389bc674 Completely overhaul cross zone and world wide methods in quest API. 2020-07-07 08:02:56 -04:00
Alex f1929c4f45 Add hot reload saylinks as well as a rule to determine if you bypass the saylinks. 2020-07-07 07:20:08 -04:00
Akkadius f6b5bbef00 Add world api get_database_schema 2020-07-07 02:21:44 -05:00
Akkadius bdf55403cf Add manifest criteria 2020-07-07 02:10:00 -05:00
Akkadius 084e9b7a35 Fix command exit codes 2020-07-07 02:09:39 -05:00
Akkadius a54d92d078 Cleanup content flag loading logic 2020-07-07 02:06:16 -05:00
Akkadius 331eb51126 Add connection label to MySQL connects 2020-07-07 02:06:00 -05:00
Akkadius b7e2261e16 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-07-07 01:32:17 -05:00
Akkadius 4e6c3b524f Add fix for scenario where a client traveled far distance quickly and mob scanning is too slow; this takes care of all scenarios 2020-07-07 01:19:02 -05:00
Chris Miles 520ac3ae46 Merge pull request #1091 from EQEmu/feature/windows-shared-memory-hotfix-fix
Windows #hotfix Fix
2020-07-04 02:27:17 -05:00
Akkadius 15a70c7aa9 Fix for windows hotfix [skip ci] 2020-07-04 02:24:53 -05:00
Akkadius 9e960b90bd Adjust path quote [skip ci] 2020-07-04 02:01:35 -05:00
Akkadius 8e96232690 Add explicit file extension to file check [skip ci] 2020-07-04 01:58:02 -05:00
Akkadius 6aad062e9a Add logging [skip ci] 2020-07-04 01:50:29 -05:00
Chris Miles 818fd53dd0 Merge pull request #1090 from xevianindustries/titanium_start_zone_fix
Issue 743 - WorldDatabase::GetStartZone now checks isTitanium when creating the SQL
2020-07-02 21:34:52 -05:00
Akkadius 36e064a7b3 Fix issue where #hotfix doesn't work properly in new Windows installations 2020-07-02 21:31:50 -05:00
Erick Christgau 12a0e3e226 Issue 743 - WorldDatabase::GetStartZone now checks isTitanium when creating the SQL 2020-07-02 10:16:04 -05:00
Chris Miles a78c3b9800 Merge pull request #1086 from EQEmu/cross_zone_move
Optimize cross-zone utilities and add cross-zone player move utilities to Perl/Lua.
2020-06-30 14:48:16 -05:00
Chris Miles 62439fe8ee Merge pull request #1088 from EQEmu/move_zone_instance
Add MoveZoneInstance methods to Perl/Lua.
2020-06-30 14:47:16 -05:00
Chris Miles 4b1ea13c32 Merge pull request #1089 from EQEmu/dye_armor
Add DyeArmorBySlot(slot, red, green, blue, use_tint) to Perl/Lua.
2020-06-30 14:46:43 -05:00
Chris Miles 7a5a0915e5 Merge pull request #1085 from EQEmu/display_ac
Add GetDisplayAC() to Perl/Lua.
2020-06-30 14:46:08 -05:00
Paul Coene 0202a2ad23 Merge pull request #16 from EQEmu/master
Merge master into main
2020-06-30 07:56:00 -04:00
Alex eed1fd8a43 Add DyeArmorBySlot(slot, red, green, blue, use_tint) to Perl/Lua. 2020-06-29 20:55:30 -04:00
Alex 1b2c2a1dd0 Add MoveZoneInstance methods to Perl/Lua. 2020-06-29 19:49:37 -04:00
Alex f514dd5b55 Optimize cross-zone utilities and add cross-zone player move utilities to Perl/Lua. 2020-06-29 17:54:30 -04:00
Alex eb039d176c Add GetDisplayAC() to Perl/Lua. 2020-06-29 15:49:24 -04:00
Akkadius 954b0c5106 Post merge fixes 2020-06-29 00:55:53 -05:00
Akkadius e03ca7f65e Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-06-29 00:40:27 -05:00
Akkadius f32126faac Fix issue where when a client first enters a zone, a mob may not be aware of their distance to a client immediately so when the client does their scan we also add ourselves to their lists 2020-06-28 23:10:30 -05:00
Akkadius e11868eb65 Merge branch 'master' of https://github.com/EQEmu/Server 2020-06-28 22:56:35 -05:00
Akkadius 05113aab7d Lower animation throttle frequency 2020-06-28 22:56:33 -05:00
Chris Miles ba62d0bdd3 Merge pull request #1074 from thalix1337/master
Improvement of rule descriptions
2020-06-28 22:03:31 -05:00
Chris Miles 53eb28c5c6 Merge pull request #1079 from KinglyKrab/disc_timer
Add GetDisciplineTimer() and ResetDisciplineTimer() to Perl/Lua.
2020-06-28 22:00:45 -05:00
Chris Miles f6d415410d Merge pull request #1080 from KinglyKrab/assign_tasks
Add cross-zone task assign methods to Perl/Lua.
2020-06-28 21:54:52 -05:00
Chris Miles f143cddc97 Merge pull request #1082 from KinglyKrab/move_zone
Add MoveZone methods to Perl/Lua.
2020-06-28 20:05:16 -05:00
Chris Miles 2a19ad0197 Merge pull request #1083 from EQEmu/recalculate_skills
Fix $npc->RecalculateSkills() in Perl.
2020-06-28 20:04:41 -05:00
Akkadius 30067f9b6d Fix UCS connection bug 2020-06-28 19:14:36 -05:00
Alex 1292e1c9c0 Fix $npc->RecalculateSkills() in Perl. 2020-06-28 10:08:21 -04:00
Alex 9a2294774e Add client-based MoveZone methods. 2020-06-27 21:35:52 -04:00
Alex 2c7d227f4a Merge pull request #1 from EQEmu/master
Update.
2020-06-27 20:41:58 -04:00
Alex 25c3d3803f Add cross-zone task assign methods to Perl/Lua. 2020-06-27 20:03:06 -04:00
Alex 736c345a45 Add GetDisciplineTimer() and ResetDisciplineTimer() to Perl/Lua. 2020-06-27 16:37:24 -04:00
thalix1337 c3e7cd65e8 Corrected duplicate descriptions
Corrected descriptions for the rules UseOldConSystem and UseLiveBlockedMessage
2020-06-27 03:18:40 +02:00
freyonsecurity 9bbef1d79a Missing descriptions added
All missing descriptions added. Made corrections to existing descriptions.
2020-06-26 22:05:35 +02:00
Chris Miles 6bdc1ffffb Merge pull request #1067 from noudess/CallForHelp
Prevent mob from moving from point of aggro until after calls for help are issued.
2020-06-23 14:20:40 -05:00
Chris Miles a9c2e35bc7 Merge pull request #1075 from KinglyKrab/findzone
Add zone ID to #findzone.
2020-06-23 14:18:47 -05:00
Chris Miles 10f54313a5 Merge pull request #1076 from KinglyKrab/zone
Add new zone methods to Perl/Lua.
2020-06-23 14:18:33 -05:00
Chris Miles 2fd149469d Merge pull request #1073 from noudess/gridshow
Repair #grid show command
2020-06-23 14:15:48 -05:00
Chris Miles 08e5176c0c Merge pull request #1077 from KinglyKrab/findrace
Add #findrace command.
2020-06-23 14:10:36 -05:00
Alex 0daadde415 Add #findrace command. 2020-06-21 16:10:55 -04:00
Alex 1ae077ea8f Add new zone methods to Perl/Lua. 2020-06-21 01:15:29 -04:00
Alex 0d28f0c083 Add zone ID to #findzone 2020-06-21 00:26:13 -04:00
Thalix 01698ae989 Incorrectly deleted rules inserted again 2020-06-21 04:03:03 +02:00
Thalix ab73fd7938 Improvement of rule descriptions
Incomplete descriptions added as far as the function was clear to me. Tried to standardize the words used in the descriptions. Corrected a few orthographic problems. Added some words to existing descriptions to make them more understandable. Some rules which were not used anymore are deleted.
2020-06-21 03:19:38 +02:00
Noudess 06f3d40c28 Replaced expensive IsPet() with GetOwnerID(). 2020-06-19 07:59:08 -04:00
Noudess efc3832f52 Fix some formatting and change visual label for stacked node names. 2020-06-19 07:43:06 -04:00
Chris Miles 64b56bd746 Merge pull request #1071 from noudess/master
SQL to add faction mods for guktan and drakkin races, and Agnostic mods
2020-05-30 08:09:20 -05:00
Chris Miles 577fbdac01 Merge pull request #1072 from alimalkhalifa/cmake_mariadb
Updated CMakeLists to default to MariaDB instead of MySQL
2020-05-30 08:08:34 -05:00
Noudess fa2caf8f83 Comment movement code and make target required in all cases again 2020-05-28 13:30:34 -04:00
Noudess 4ad38d4c49 Fix for pets, mercs, bot that don't set combat state. 2020-05-28 13:17:31 -04:00
Noudess 4a23086183 Fixes to #grid show. Added new string utilities. 2020-05-28 08:41:10 -04:00
Paul Coene 9195e5e961 Merge pull request #15 from EQEmu/master
Merge master into my branch
2020-05-28 08:19:35 -04:00
Ali 42352359ad [ci skip] Updated CMakeLists to default to MariaDB instead of MySQL 2020-05-28 15:18:25 +03:00
KimLS 88b405edee Merge branch 'master' of https://github.com/EQEmu/Server 2020-05-26 22:30:24 -07:00
KimLS 8a0d4e37bd Remove optimization off of quest::ChooseRandom on msvc to solve a crash on x64 in release mode 2020-05-26 22:30:19 -07:00
Chris Miles c10a9cb620 Update README.md 2020-05-26 00:32:45 -05:00
Akkadius 01d326ef83 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-25 23:06:14 -05:00
Akkadius 2ec9a2addd Zone point logging 2020-05-25 23:05:05 -05:00
KimLS 6a416a78a8 Merge branch 'master' of https://github.com/EQEmu/Server 2020-05-25 20:56:54 -07:00
KimLS 5e9bf3b044 Make ChooseRandom more idiomatic, the fact that the code can return a SV of anytype makes it a bit dangerous, good canidate for rewriting as a plugin 2020-05-25 20:56:49 -07:00
Chris Miles a3874b5252 Merge pull request #1070 from alimalkhalifa/installer/support_powershell2
Updated installer to support powershell older than 3.0
2020-05-25 18:38:14 -05:00
Paul Coene 0e04e42bea Added two missing agnostic mods 2020-05-25 16:48:03 -04:00
Paul Coene 40e690f8e3 SQL to add the needed guktan and drakkin faction fixes missed by faction_conversion. 2020-05-25 16:25:55 -04:00
Ali 6896ef650e [ci skip] Updated installer to support powershell older than 3.0 2020-05-25 16:19:33 +03:00
Akkadius cfe3b2b071 Reconile a post merge issue [skip ci] 2020-05-25 01:35:39 -05:00
Akkadius a9790e2779 Update lua_general.cpp 2020-05-24 21:57:09 -05:00
Akkadius a4b027db58 Export quest::is_content_flag_enabled and quest::set_content_flag 2020-05-24 20:45:44 -05:00
Akkadius 50c266982f Remove string quotes from integers in mysql queries for faction and rules [skip ci] 2020-05-24 19:21:26 -05:00
Akkadius 905baa71b2 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 04:24:01 -05:00
Akkadius db072e767a Bulk instance deletion instead of tons of individual statements [skip ci] 2020-05-24 04:23:52 -05:00
Akkadius 02fa823736 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 04:07:38 -05:00
Akkadius 0d2d6a2c6b More resilient fix to killing instances for now [skip ci] 2020-05-24 04:07:29 -05:00
Akkadius 12d10bbc50 Slight adjustment to filter criteria [skip ci] 2020-05-24 03:08:52 -05:00
Akkadius d98e69ae5d Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 02:56:13 -05:00
Chris Miles 26831d5ad4 Fix a copy paste error 2020-05-24 02:56:04 -05:00
Akkadius e82f0254b0 Add content_flags_disabled field for additional filtering 2020-05-24 02:24:38 -05:00
Akkadius 630ab5e69d Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 01:37:10 -05:00
Akkadius e474df2b12 Tweak content flag filtering [skip ci] 2020-05-24 01:36:17 -05:00
Chris Miles e8a05ec680 Fixes instance deletion issue https://github.com/EQEmu/Server/issues/1069 2020-05-24 01:32:50 -05:00
KimLS 712df6c35a Fix compile issue for latest vc compiler 2020-05-23 23:19:54 -07:00
Akkadius 56c4eb280f Fix post merge issues 2020-05-23 22:41:59 -05:00
Akkadius 03a4254397 Post merge fix [skip ci] 2020-05-23 22:34:32 -05:00
Akkadius 3f62da4573 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-23 22:33:34 -05:00
Akkadius 86ef1b12e2 Strawberry Perl OOB has issue with getstore so lets use something else [skip ci] 2020-05-23 16:50:09 -05:00
Akkadius b585d9b062 Use wget again for windows [skip ci] 2020-05-23 16:29:04 -05:00
Chris Miles 4603fa2ef8 Merge pull request #1068 from alimalkhalifa/reintroduce_wget_to_windows_installer
Revert back to using wget.exe for windows installs
2020-05-23 16:23:57 -05:00
Ali 2c2c09531f [ci skip] Revert back to using wget.exe for windows installs 2020-05-21 15:16:50 +03:00
Noudess 4e8764b6b9 Repair aggro so CallsForHelp are completed before mob charges. 2020-05-20 16:08:42 -04:00
Paul Coene 3ebbcd84d4 Merge pull request #14 from EQEmu/master
Merge Mainline into my base
2020-05-20 15:52:59 -04:00
Alex d7c5a45cc2 Merge pull request #1064 from EQEmu/getskill
Remove duplicate GetSkill() definition.
2020-05-19 19:35:08 -04:00
Alex 5964bcc3c4 Merge branch 'master' into getskill 2020-05-19 18:50:32 -04:00
Chris Miles 0c531e976b Merge pull request #1065 from EQEmu/signalclient
Remove duplicate SignalClient() definition.
2020-05-19 02:38:44 -05:00
Chris Miles a64c0dfd92 Merge pull request #1063 from EQEmu/maketemppet
Remove duplicate MakeTempPet() definition.
2020-05-19 02:37:46 -05:00
Chris Miles 19107e5ace Merge pull request #1037 from alimalkhalifa/win64
Win64 eqemu_server.pl
2020-05-19 01:24:30 -05:00
Chris Miles 852a8e1617 Update eqemu_server.pl [skip ci] 2020-05-19 01:17:02 -05:00
Chris Miles 4180ef58ef Update eqemu_server.pl [skip ci] 2020-05-19 00:58:19 -05:00
Alex 6a817fdce5 Merge pull request #1051 from hgtw/fix/missing-doors
Fix edge case with door packets that can cause missing doors on clients
2020-05-17 20:36:04 -07:00
KimLS c330904695 Fix for broken tests 2020-05-17 19:10:12 -07:00
KimLS 2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Alex 5bdc9c6c60 Remove duplicate SignalClient() definition. 2020-05-16 14:42:38 -04:00
Alex ceff8b8674 Remove duplicate GetSkill() definition. 2020-05-16 14:40:36 -04:00
Alex 968efe8831 Remove duplicate MakeTempPet definition. 2020-05-16 14:30:35 -04:00
Michael Cook (mackal) 06104b624a Merge pull request #1062 from EQEmu/istaunting
Add IsTaunting() to Perl/Lua.
2020-05-15 17:44:59 -04:00
Alex ee55755c85 Add IsTaunting() to Perl/Lua. 2020-05-14 23:55:55 -04:00
Michael Cook (mackal) d042b0831a Merge pull request #1061 from noudess/NewFishing
New fishing
2020-05-12 13:31:52 -04:00
Alex 5f0d3e9026 Add several cross zone methods to Perl/Lua. 2020-05-11 20:10:52 -04:00
Noudess ea48acbf0b Added check for GetItem() failure on Pole 2020-05-11 15:39:28 -04:00
Noudess b37c75630b Fix subtype logic 2020-05-11 14:56:38 -04:00
Noudess fb1228946a Add code to patchers to put support for Expendable flag on breakable fishing 2020-05-11 14:50:17 -04:00
Noudess 94606504af Add check for fishing pole expendable using new subtype field. 2020-05-11 10:07:29 -04:00
Paul Coene c799267c86 Merge pull request #13 from EQEmu/master
Merge from master
2020-05-11 08:37:28 -04:00
Chris Miles 5dbd2c38ed Update script [skip ci] 2020-05-11 04:51:59 -05:00
Chris Miles f785dc232b More tweaks [skip ci] 2020-05-11 03:37:09 -05:00
Chris Miles d534d345d5 More tweaks [skip ci] 2020-05-11 03:35:16 -05:00
Chris Miles 51b98ec724 Lots of tweaks for overhauls [skip ci] 2020-05-11 03:21:46 -05:00
Chris Miles 2c13f2e928 Update server script [skip ci] 2020-05-11 01:13:59 -05:00
Chris Miles 496a958def Update eqemu_server.pl 2020-05-11 00:28:24 -05:00
Chris Miles 39cd5bb9a8 Fix issue where powershell progress output was dramatically slowing down requests [skip ci] 2020-05-10 23:07:48 -05:00
Chris Miles 5e0ab3e37c Merge pull request #1054 from EQEmu/feature/item_subtype
Add Item SubType to data structures and DB
2020-05-10 20:04:43 -05:00
Chris Miles e64526920c Merge pull request #1053 from KinglyKrab/crosszonesignalplayerbygroupid
Add CrossZoneSignalPlayerByGroupID() to Perl/Lua.
2020-05-10 20:01:51 -05:00
Alex dc9bd031ff Merge branch 'master' into crosszonesignalplayerbygroupid 2020-05-10 21:00:43 -04:00
Chris Miles 7113c9236e Merge pull request #1057 from KinglyKrab/crosszonesignalclientbyname
Fix typo in crosszonesignalclientbyname Perl_croak.
2020-05-10 20:00:42 -05:00
Chris Miles 13d4bbcae2 Merge pull request #1060 from KinglyKrab/crosszonemessageplayerbyguildid
Add CrossZoneMessagePlayerByGuildID() to Perl/Lua.
2020-05-10 19:59:49 -05:00
Alex 857b24727c Add CrossZoneMessagePlayerByGuildID() to Perl/Lua. 2020-05-10 16:52:33 -04:00
Alex 4d93406176 Fix typo in crosszonesignalclientbyname Perl_croak. 2020-05-10 09:16:58 -04:00
Michael Cook (mackal) 0e6a0b5a70 Add Item SubType to data structures and DB 2020-05-09 22:37:35 -04:00
Alex 12c4b20169 Add CrossZoneSignalPlayerByGroupID() to Perl/Lua. 2020-05-09 21:15:34 -04:00
Chris Miles 90e6bb8a8a Merge pull request #1052 from KinglyKrab/master
Fix #findzone to allow you to search using part of a zone's short name.
2020-05-09 17:15:50 -05:00
Alex 518bcb58d3 Fix #findzone to allow you to search using part of a zone's short name. 2020-05-09 18:14:22 -04:00
hg b08dc02a0a Fix edge case with door packets that can cause missing doors on clients
Send OP_RemoveAllDoors packets with default CLIENT_CONNECTINGALL flag
to match flag used for OP_SpawnDoor
2020-05-09 16:26:55 -04:00
Chris Miles 0aa8d90e9e Merge pull request #1049 from noudess/NotifyNewTitles
Notify new titles
2020-05-09 14:54:24 -05:00
Chris Miles e453f3e6ed Merge pull request #1048 from KinglyKrab/master
Add GetNPCBySpawnID() to Perl/Lua.
2020-05-09 14:53:47 -05:00
Chris Miles e719992267 Merge pull request #1042 from noudess/master
Fix for static zone issue with mobs congregating after last player zones
2020-05-09 14:52:54 -05:00
Chris Miles e2a7d4f33f Merge pull request #1046 from noudess/flying
Flying
2020-05-09 14:45:15 -05:00
Chris Miles 8b999a63a4 Merge pull request #1047 from isenior/ScaleFix
Don't scale 0 values
2020-05-09 14:42:30 -05:00
Jose123456 914ea27406 Compile on Freebsd (#1044)
* Compile on Freebsd

Small changes needed for compilation on Freebsd. Note that you'll have
to pass -DEQEMU_BUILD_ZLIB=OFF on the cmake command line. The bundled
zlib-ng does not build on Freebsd even though mainline zlib-ng does.

* Fix build errors: typo
2020-05-09 14:40:33 -05:00
Michael Cook (mackal) 7f3e4e3438 Merge pull request #1050 from EQEmu/feature/subtype_to_structs
Identify SubType in Item structs in some clients
2020-05-09 15:22:06 -04:00
Noudess 5471774b4c Repair prototype 2020-05-08 18:24:25 -04:00
Michael Cook (mackal) 572ad1b6ab Identify SubType in Item structs in some clients
This maybe in older clients as well, but I couldn't verify it and those
clients never did anything with this field so it doesn't matter.

MQ2 calls this SubClass, but we call the field it's a "sub" of Type so I
figured we'd call it SubType.

We still need to rename the DB field and handle it server side etc
2020-05-08 12:56:10 -04:00
Noudess 0a42ded33f Expose client method NotifyNewTitlesAvailable for perl and lua 2020-05-08 09:58:53 -04:00
Paul Coene ca50013334 Merge pull request #12 from EQEmu/master
Merge base
2020-05-08 09:54:23 -04:00
Alex 0b03f27660 Add GetNPCBySpawnID() to Perl/Lua. 2020-05-07 23:11:36 -04:00
= 263ed3913b Don't scale 0 values 2020-05-06 02:44:17 +00:00
regneq 7bea9a7273 Merge pull request #5 from EQEmu/master
eqemu merge update
2020-05-04 08:30:48 -07:00
Noudess 2bcaf2a476 Extended Movement Manager to have a FlyTo 2020-04-30 11:35:09 -04:00
Paul Coene 855e592d22 Merge pull request #10 from EQEmu/master
Merge from master
2020-04-30 11:33:13 -04:00
Akkadius d8b9c3e3de Fix bad object Z data automatically using Z calcs, works fairly reliably 2020-04-25 04:24:22 -05:00
Akkadius 206761d5e8 Force str_tolower on zone name lookups 2020-04-24 20:09:59 -05:00
Akkadius bf0322f8f6 Not sure why we are trying to detete id 0 objects [skip ci] 2020-04-24 18:15:07 -05:00
Akkadius 5dc351e5d5 Remove cross boundary dependency in command_who [skip ci] 2020-04-24 02:22:33 -05:00
Akkadius 22180d4bac Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-24 02:11:44 -05:00
Akkadius 954247956e Adjust syntax 2020-04-24 02:11:06 -05:00
Akkadius 43ff59d7db Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-24 01:27:17 -05:00
Akkadius 387e1668a5 Remove hard delete from DeleteInstance so that the purge timer can pick it up later 2020-04-24 01:25:09 -05:00
Noudess 5989edb6ec Fix for static zone issue with mobs congregating after last player zones 2020-04-21 09:09:30 -04:00
Akkadius 2159b5db2d Add damageshieldtypes to content tables 2020-04-21 02:10:52 -05:00
Paul Coene 54d494da36 Fix errant merchant full messages and add logging for later use (#1035)
* Fix errant merchant full issues, add logging for later use

* Rename merchant list dump more clearly

* spaces around '='

* Added line spacing,

Co-authored-by: Noudess <noudess@gmail.com>
2020-04-20 23:40:18 -05:00
Alex d6af1b566f Merge pull request #1041 from peterigz/master
Add missing break for OP_AppCombined switch statement
2020-04-19 19:23:40 -07:00
Akkadius b6b008e74a Add tenancy support to the dump service 2020-04-19 19:52:19 -05:00
Michael Cook (mackal) 89f5b0b71e Merge pull request #1040 from alimalkhalifa/redundant-check-during-enter-world
Removed redundant check during enter world
2020-04-19 15:22:18 -04:00
Akkadius 6409e02aed Update base repositories to use int as a base to avoid atoi overflow 2020-04-19 04:49:28 -05:00
Akkadius 373fb3f0e7 Decouple zone calls, cleanup logic 2020-04-19 04:36:39 -05:00
Akkadius ebda1cf601 Add zone store 2020-04-19 03:05:15 -05:00
Akkadius 6a51bcf8fd Fix null reference issue [skip ci] 2020-04-19 01:02:35 -05:00
Akkadius caa0ffda00 Add Truncate repository method and purge player sold items on world bootup 2020-04-18 23:53:52 -05:00
Akkadius 85daee85b8 Move spawn events from content table to server 2020-04-18 23:26:53 -05:00
Akkadius e4748a01e0 Fix tradeskill combine logic [skip ci] 2020-04-18 21:50:00 -05:00
Akkadius 472c0cd196 More tweaks [skip ci] 2020-04-18 20:03:34 -05:00
Akkadius df43a23d98 Another adjustment [skip ci] 2020-04-18 19:52:56 -05:00
Akkadius 74c878a481 Fix [skip ci] 2020-04-18 19:49:20 -05:00
Akkadius 093509baa9 Few adjustments [skip ci[ 2020-04-18 19:46:19 -05:00
Akkadius b8c44ee41b Fix container interaction [skip ci] 2020-04-18 18:19:59 -05:00
Akkadius bcd62b76c4 Fix all expansion enabled filtering [skip ci] 2020-04-18 18:12:25 -05:00
Akkadius a0f8bbb3b9 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-18 02:31:43 -05:00
Akkadius 4db646db94 Revert "Merge pull request #1007 from EQEmu/feature/improved-name-generator"
This reverts commit 3c71e2c91d, reversing
changes made to 80d1601754.
2020-04-18 01:44:43 -05:00
Michael Cook (mackal) 5ce1fef9ec Merge pull request #1039 from alimalkhalifa/gitignore-win-64
Added a VS ignore for x64 compiles
2020-04-17 19:58:20 -04:00
Michael Cook (mackal) 874ca053f7 Merge pull request #1038 from alimalkhalifa/fix_charm_break_during_cast_lifetap_nuke
Fix edge case with NPC pet owners charming PCs
2020-04-17 14:19:13 -04:00
peterigz 21ed02ca52 Add missing break for OP_AppCombined switch statement 2020-04-17 18:27:45 +01:00
Ali 6c3ae4580f [skip ci] Win64 eqemu_server.pl
Changed binaries to x64 and got rid of wget.exe for windows, switched to
native WebClient
2020-04-17 18:53:35 +03:00
Ali 5d4e53bb25 Removed redundant check during enter world 2020-04-17 18:48:43 +03:00
Ali b8e7e5bb0d [skip ci] Added a VS ignore for x64 compiles 2020-04-17 18:46:07 +03:00
Ali 15f3697df1 Fix edge case with NPC pet owners charming PCs
* Addresses #1036
* Cleaned up if statement formatting
* Using Mob::GetOwnerOrSelf() now, which accounts for the edge case

NB: The Mob::SpellOnTarget() and Mob::CommonDamage() methods really
should be looked at and spell logic combined somehow.  Both have if
statements that dodge around the other's conditions to decide which
method sends the CombatDamage_Struct packet
2020-04-17 10:56:43 +03:00
Chris Miles 16cfad1966 UCS / Raid / Zone Fixes (#1033)
* Cache EntityList::GetRaidByClient

* Adjustments [skip ci]

* Update entity [skip ci]

* More cleanup [skip ci]

* More tweaks [skip ci]

* Cleanup [skip ci]

* Fix bugs with UCS reconnection on crash / exit, not adding soft deleted characters, put main loop on UV lib

* Reduce log spam that should be debugging; send keepalives to clients so that they properly prune from the connection list

* Shutdown the eventloop to properly shutdown the zone versus calling a hard exit
2020-04-14 23:28:43 -05:00
JJ bffeee8d1a Merge pull request #1034 from TurmoilToad/patch-1
Update README.md
2020-04-13 09:37:07 -05:00
TurmoilToad d29c0fc332 Update README.md
Updated wiki link.
2020-04-13 10:01:22 -04:00
Chris Miles a031c20e7e Update peq-dump.sh [skip ci] 2020-04-11 16:44:19 -05:00
Akkadius 3daf03c796 Remove errant cout [skip ci] 2020-04-11 05:57:31 -05:00
Akkadius 5b4c4bfd66 Implement content flags 2020-04-11 05:48:41 -05:00
Akkadius 47b8aa3f18 Export quest calls 2020-04-11 04:38:42 -05:00
Akkadius 287fc5d313 Create 2020_04_11_expansions_content_filters.sql 2020-04-11 03:13:03 -05:00
Akkadius 77cacf5cd1 Add std::string WorldContentService::GetCurrentExpansionName() [skip ci] 2020-04-11 03:11:09 -05:00
Akkadius e0363a8fe1 Repository tweaks [skip ci] 2020-04-11 02:47:54 -05:00
Akkadius 5c7eb0707f Bulk load goallists 2020-04-11 02:19:58 -05:00
Akkadius 423bb7f0b3 Adjust content bootstrapping in zone [skip ci] 2020-04-11 01:58:35 -05:00
Chris Miles 67d3cab80b Merge pull request #1030 from EQEmu/feature/send-to-guild-hall-instance-fixes
Implement SendToGuildHall and Improve Instance ID Cycling
2020-04-11 01:33:12 -05:00
Akkadius b41f2dac66 Clamp value for max reserved instance id [skip ci] 2020-04-10 03:26:09 -05:00
Akkadius b5b473f25d Update peq dump [skip ci] 2020-04-10 03:21:33 -05:00
Akkadius 0dc3e5ba35 Add jank permanent reference pass back in [skip ci] 2020-04-10 03:20:41 -05:00
Akkadius 499fe153ab Tweak peq dump [skip ci] 2020-04-10 02:56:45 -05:00
Akkadius d1349e5ac9 Oops, math 2020-04-10 02:30:46 -05:00
Akkadius bd8e94ff17 Use version 1 for GH 2020-04-10 02:20:56 -05:00
Akkadius d89b2f11b5 Get time remaining directly from database for now, this needs to be cached better at the zone state level, I'll refactor this when repositories are merged in 2020-04-10 02:03:30 -05:00
Akkadius 88ff56b2f2 Add client->SendToGuildHall - have instances properly cycle out IDs 2020-04-10 01:43:00 -05:00
Akkadius 1728923bbb Revert "Merge pull request #1007 from EQEmu/feature/improved-name-generator"
This reverts commit 3c71e2c91d, reversing
changes made to 80d1601754.
2020-04-08 16:00:27 -05:00
Alex cbd1f42a08 Merge conflict fixes... 2020-04-06 18:57:13 -04:00
Alex f8735cf9ba Update lua_general.cpp 2020-04-06 18:06:18 -04:00
Chris Miles eb00667eab Merge pull request #1027 from noudess/patch-15
Propose change in location of Stun check as possible resolution to crash
2020-04-06 15:40:39 -05:00
Chris Miles cbc0ada454 Merge pull request #1017 from noudess/master
Fix Issue #849.
2020-04-06 15:39:43 -05:00
Alex 54b33f959e Merge pull request #1026 from KinglyKrab/getclassname
Add getclassname(class_id, level) to Perl/Lua.
2020-04-06 16:25:39 -04:00
Alex c6e4b5647f Merge branch 'master' into getclassname 2020-04-06 16:25:29 -04:00
Alex 928070e994 Merge pull request #1023 from KinglyKrab/getcurrencyitemid
Add getcurrencyitemid(currency_id) to Perl/Lua.
2020-04-06 16:22:50 -04:00
Alex 40ef4c799b Update embparser_api.cpp 2020-04-06 16:22:08 -04:00
Alex 8ba7ddd054 Merge branch 'master' into getcurrencyitemid 2020-04-06 16:21:29 -04:00
Paul Coene 973fd376e5 Propose change in location of Stun check as possible resolution to crash 2020-04-06 08:23:57 -04:00
Paul Coene b5575133cd Put in braces in my new function as well as the source function.
The entire file has implied braces...  I'd change them all but fear making a mistake.
2020-04-06 08:10:15 -04:00
Akkadius 2b1b786f02 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-06 02:55:46 -05:00
Chris Miles b23bc83f0f Merge pull request #1018 from EQEmu/feature/generated-repositories
Code Generated Repositories
2020-04-06 02:24:43 -05:00
Chris Miles 6f846dc4ff Merge pull request #1025 from KinglyKrab/getracename
Add getracename(race_id) to Perl/Lua.
2020-04-06 01:57:54 -05:00
Chris Miles 0461fc1789 Merge pull request #1024 from KinglyKrab/getskillname
Add getskillname(skill_id) to Perl/Lua.
2020-04-06 01:57:12 -05:00
Chris Miles aa6264266e Merge pull request #1022 from KinglyKrab/getcurrencyid
Add getcurrencyid(item_id) to Perl/Lua.
2020-04-06 01:56:25 -05:00
Chris Miles c3cbe90575 Merge pull request #1021 from KinglyKrab/getnpcnamebyid
Add getnpcnamebyid(npc_id) to Perl/Lua.
2020-04-06 01:56:01 -05:00
Akkadius 700d062606 Fix windows compile 2020-04-06 01:51:58 -05:00
Alex c2c6282cc7 Add getclassname(class_id, level) to Perl/Lua. 2020-04-06 02:26:58 -04:00
Alex fab071d9da Add getracename(race_id) to Perl/Lua. 2020-04-06 02:02:20 -04:00
Alex 358bd60716 Add getskillname(skill_id) to Perl/Lua. 2020-04-06 01:36:46 -04:00
Akkadius 867ff3dcfa Add constructor to world content service 2020-04-06 00:22:52 -05:00
Alex 03ca345b37 Add getcurrencyitemid(currency_id) to Perl/Lua. 2020-04-06 01:07:59 -04:00
Alex 6ddcc2bb8a Add getcurrencyid(item_id) to Perl/Lua. 2020-04-06 00:49:57 -04:00
Akkadius a19bb7b544 Merge branch 'feature/peq-expansions' of https://github.com/EQEmu/Server into feature/generated-repositories 2020-04-05 23:21:21 -05:00
Akkadius 723a3aa18e Update cmake lists [skip ci] 2020-04-05 23:18:32 -05:00
Akkadius be57c57029 More adjustments [skip ci[ 2020-04-05 23:11:25 -05:00
Alex 02cac686b6 Add getnpcnamebyid(npc_id) to Perl/Lua. 2020-04-06 00:10:58 -04:00
Akkadius 725ad9ddf5 Fix comment formatting [skip ci] 2020-04-05 22:23:29 -05:00
Akkadius c978ca65a4 Split repositories out between a base immutable repository (that does not change) and an extended repository of which developers can add more custom methods to 2020-04-05 22:19:36 -05:00
Alex 4c348baabd Merge pull request #1020 from KinglyKrab/getcharnamebyid
Added getcharnamebyid(char_id) to Perl/Lua.
2020-04-05 21:26:31 -04:00
Alex 035bac1044 Update embparser_api.cpp 2020-04-05 21:22:23 -04:00
Alex 5a8d467d25 Merge branch 'master' into getcharnamebyid 2020-04-05 21:21:15 -04:00
Alex ae959be5ac Added getcharnamebyid(char_id) to Perl/Lua. 2020-04-05 21:18:05 -04:00
Chris Miles 4157a03f32 Merge pull request #1019 from KinglyKrab/getcharidbyname
Add getcharidbyname(name) to Perl/Lua.
2020-04-05 20:14:00 -05:00
Akkadius 0cce61e85d Filter GetZoneCFG [skip ci] 2020-04-05 20:11:05 -05:00
Akkadius c8722ea789 Filter start_zones [skip ci] 2020-04-05 19:58:04 -05:00
Akkadius 2f4a217f7a Filter zone_points [skip ci] 2020-04-05 19:49:04 -05:00
Akkadius 9aac84a405 filter traps [skip ci] 2020-04-05 19:45:45 -05:00
Akkadius 91c874a310 Filter starting_items [skip ci] 2020-04-05 19:43:09 -05:00
Alex 41d0b1a947 Add getcharidbyname(name) to Perl/Lua. 2020-04-05 20:41:49 -04:00
Akkadius 9fbcd99be2 Filter ground spawns [skip ci] 2020-04-05 19:40:40 -05:00
Akkadius 68a2af1bce Filter forage [skip ci] 2020-04-05 19:37:00 -05:00
Akkadius dadd674b63 Filter fishing [skip ci] 2020-04-05 19:30:02 -05:00
Akkadius f7d4e51da9 Filter global_loot [skip ci] 2020-04-05 19:20:50 -05:00
Akkadius 152d985821 Filter loot tables and drops [skip ci] 2020-04-05 19:01:45 -05:00
Akkadius 6e3922b7cc Filter merchants [skip ci] 2020-04-05 18:50:30 -05:00
Akkadius 9a90bdf91a Filter tradeskills [skip ci] 2020-04-05 18:40:19 -05:00
Akkadius 17e9198a58 Another typo fix [skip ci] 2020-04-04 21:38:05 -05:00
Akkadius e17bd303b8 Fix typos to stop triggering Secrets [skip ci] 2020-04-04 18:00:48 -05:00
Akkadius be8a6b6af4 Add spawn expansion filtering 2020-04-04 06:08:56 -05:00
Akkadius 80baf1b9ed Filter objects by expansion 2020-04-04 05:59:20 -05:00
Akkadius 8a711f3c64 Expansion filtering for doors 2020-04-04 05:51:21 -05:00
Akkadius c1e58673b2 Add expansion gating for zoning 2020-04-04 05:36:18 -05:00
Akkadius fe7e850a04 Return blank string values for string entries that return back null 2020-04-04 04:48:46 -05:00
Akkadius 15c9b64120 Add GetWhere and DeleteWhere repository methods 2020-04-04 04:44:39 -05:00
Akkadius cc8aa354f1 Add string_id define [skip ci] 2020-04-04 04:15:43 -05:00
Akkadius 33bf20a037 Merge branch 'feature/multi-tenancy' of https://github.com/EQEmu/Server into feature/peq-expansions 2020-04-04 03:56:44 -05:00
Akkadius bcef171cf9 Fix for tradeskill query [skip ci] 2020-04-04 03:55:53 -05:00
Akkadius 9faae00d15 Update cmake lists [skip ci] 2020-04-04 02:59:48 -05:00
Akkadius 0552582274 Use double quotes in strings [skip ci] 2020-04-04 02:56:14 -05:00
Akkadius 376c123fa1 More table exclusions [skip ci] 2020-04-04 02:39:15 -05:00
Akkadius 80fb204f39 More repository comb-throughs [skip ci] 2020-04-04 02:34:34 -05:00
Akkadius 826f0418f7 More float fixes [skip ci] 2020-04-04 02:27:27 -05:00
Akkadius a824ddec44 Fix float types, remove some errant table repositories [skip ci] 2020-04-04 02:26:30 -05:00
Akkadius 9e27ffacff Add tables to ignore list that do not follow typical table conventions 2020-04-04 02:13:47 -05:00
Akkadius 3aaa5020b1 Fix repository struct defaults for varchar | text 2020-04-04 02:04:48 -05:00
Akkadius d691db6621 Add repositories to cmakelists [skip ci] 2020-04-03 03:31:38 -05:00
Chris Miles 3c71e2c91d Merge pull request #1007 from EQEmu/feature/improved-name-generator
Improved Random Name Generator
2020-04-03 03:23:08 -05:00
Chris Miles 80d1601754 Merge pull request #1009 from noudess/patch-13
Hack to fix RoF2 perma IVU/IVA bug after zoning.
2020-04-03 03:22:50 -05:00
Chris Miles cfcbfea3ab Merge pull request #1010 from EQEmu/feared_proximity
Added proximity check for feared clients
2020-04-03 03:22:29 -05:00
Akkadius 82b017887d Upload generated repositories 2020-04-03 02:49:40 -05:00
Akkadius 494811c04b Update repository-generator.pl 2020-04-03 02:41:44 -05:00
Akkadius cbd2336442 Update repository generator to check for schema [skip ci] 2020-04-03 02:38:37 -05:00
Akkadius 3c9fe45af5 Update repository generator 2020-04-03 01:58:06 -05:00
Akkadius f984bd2faf Update instance list repository with auto generated code 2020-04-03 01:34:54 -05:00
Akkadius fe718a6a1d Create repository.template 2020-04-03 01:34:43 -05:00
Akkadius 9e910ad90a Create repository-generator.pl 2020-04-03 01:34:37 -05:00
Akkadius c0c1b5e678 Move doc parser scripts to new generator folder 2020-04-03 01:34:31 -05:00
Akkadius 94ab6499c8 Create account_repository.h 2020-04-03 01:17:09 -05:00
Akkadius 1650a466a1 Add instance list repository; split repository cmake config 2020-04-02 19:38:26 -05:00
Akkadius 459303c0fe Hide test: command from the help output (Developer testing) [skip ci] 2020-04-02 15:58:37 -05:00
Michael Cook (mackal) 7aa8db76f4 Merge pull request #1016 from noudess/patch-14
Update ruletypes.h
2020-04-02 14:44:52 -04:00
Paul Coene 561433902e Removed heal per @mackal 2020-04-02 13:08:05 -04:00
Paul Coene abeb93f1e6 Update entity.h 2020-04-02 12:04:16 -04:00
Paul Coene ef0b29dc8e Update entity.cpp 2020-04-02 12:03:45 -04:00
Paul Coene 42f959329d Update client.h 2020-04-02 11:56:06 -04:00
Paul Coene a898a1d07b Update aggro.cpp 2020-04-02 11:55:05 -04:00
Paul Coene 803c3aabe4 Update client.cpp 2020-04-02 11:54:19 -04:00
Paul Coene 15dde4778a Update aggro.cpp 2020-04-02 11:52:27 -04:00
Paul Coene f2b68e6783 Merge pull request #5 from EQEmu/master
Update from master
2020-04-02 11:50:50 -04:00
Paul Coene 8193b04627 Update ruletypes.h 2020-04-01 08:41:40 -04:00
Akkadius 72b1e58edb Groundwork for world content service and content filtering 2020-04-01 06:07:44 -05:00
Akkadius 58534dea16 Some cleanup [skip ci] 2020-04-01 00:57:34 -05:00
Chris Miles 47e56f9381 Merge pull request #1015 from EQEmu/checkinstancebycharid
Add CheckInstanceByCharID(instance_id, char_id) to Perl/Lua.
2020-03-31 22:21:08 -05:00
Chris Miles 58b9b719f4 Merge pull request #1014 from EQEmu/gettaskname
Add gettaskname(task_id) to Perl/Lua.
2020-03-31 22:20:58 -05:00
Alex a4bf484c74 Add CheckInstanceByCharID(instance_id, char_id) to Perl/Lua. 2020-03-31 23:19:32 -04:00
Alex 4712b56078 Add gettaskname(task_id) to Perl/Lua. 2020-03-31 23:17:25 -04:00
Chris Miles 9362890d26 Merge pull request #1013 from EQEmu/unusedtaskcode
Remove unused variables in resettaskactivity.
2020-03-31 22:11:37 -05:00
KimLS 6d3848b2c7 Removed make_unique from namegen, was conflicting with real make_unique on windows and we're set to cxx11 still 2020-03-31 19:55:27 -07:00
Alex 8974059577 Remove unused variables in resettaskactivity. 2020-03-31 20:01:47 -04:00
Chris Miles 963735e7dd Merge pull request #1012 from EQEmu/getspellname
Add getspellname(spell_id) to Perl/Lua.
2020-03-31 18:53:20 -05:00
Chris Miles c94a2496ca Merge pull request #1011 from EQEmu/getitemname
Add getitemname(item_id) to Perl/Lua.
2020-03-31 18:51:40 -05:00
Alex ceb8b31bc0 Add getspellname(spell_id) to Perl/Lua. 2020-03-31 19:48:44 -04:00
Alex 51b31b5e53 Add getitemname(item_id) to Perl/Lua. 2020-03-31 19:31:04 -04:00
Paul Coene 6fb6d8891d Hack to fix RoF2 perma IVU/IVA bug after zoning.
This fixes the problem, but I believe someone with better knowledge of the client than I can find a more "correct" solution.

Posted as a PR per @joligario  to solve it for now.  Was also asked to put SE_Invisibility in there so that this "hack" is a catch all.
2020-03-31 09:22:16 -04:00
Akkadius 7d8347a556 Update world item instance references [skip ci] 2020-03-31 03:28:35 -05:00
Akkadius 3b9016f503 More faction calls [skip ci] 2020-03-31 02:56:48 -05:00
Akkadius 63eca22aac Get factions fully moved over [skip ci] 2020-03-31 02:49:42 -05:00
Akkadius d4ea9bbee0 Use a better name generator 2020-03-31 02:00:09 -05:00
Akkadius dae20afcba Fix character creation tenancy operations 2020-03-31 01:49:42 -05:00
Akkadius 019735c654 Keeps spawns from doing individual loads and prefer bulk loading [skip ci] 2020-03-30 23:25:32 -05:00
Akkadius 0c3dd7dc93 Update zone.cpp [skip ci] 2020-03-30 21:33:11 -05:00
Akkadius 79dbddd56e Decouple temporary merchant list call [skip ci] 2020-03-30 21:32:59 -05:00
Uleat 3a7908b1de Fix for bots database updates not running when invoked from world.exe [skip ci] 2020-03-30 16:45:50 -04:00
Uleat 99c1c826a8 Fix for bots guild-related view query issue 2020-03-30 08:02:45 -04:00
Akkadius 43716332aa Bulk load grids at repop and zone init instead of 2 costly individual selects per NPC, create repositories to decouple database logic from business logic 2020-03-30 05:49:43 -05:00
Akkadius 128cc458fd Separate tradeskill queries to not be cross-boundary, clean up logic 2020-03-30 04:29:52 -05:00
Akkadius e9b361445f Add give item saylinks to #fi #itemsearch 2020-03-30 04:28:54 -05:00
Akkadius 6127baf12a Update schema [skip ci] 2020-03-29 20:16:17 -05:00
Chris Miles 1b888784eb Merge pull request #1001 from alimalkhalifa/fix_double_spell_msg
Fix double damaging spell messages to non-attacked and non-attacker
2020-03-29 19:23:49 -05:00
Chris Miles 52a25c3b78 Merge pull request #1005 from EQEmu/editmassrespawn
Added command 'editmassrespawn' for mass editing of respawn times
2020-03-29 19:22:36 -05:00
Uleat 4b08ce1237 Merge branch 'master' of https://github.com/EQEmu/Server into editmassrespawn 2020-03-29 18:02:39 -04:00
Uleat b94fdda429 Updated command 'editmassrespawn' queries to use resolved names over aliases 2020-03-29 18:02:27 -04:00
Ali Al-Khalifa a48153baa1 Fix errant formatting
Mistakenly had a variable in camelCase
2020-03-30 00:26:56 +03:00
Chris Miles e26b159efe Merge pull request #1002 from alimalkhalifa/gitignore-enhancements
Enhanced .gitignore
2020-03-29 16:08:20 -05:00
Uleat a2b381bc9e Added command 'editmassrespawn' for mass editing of respawn times 2020-03-29 16:34:07 -04:00
Ali 60e194e32b Fix double damaging spell messages to non-attacked and non-attacker
With handling for client attacker and pets thanks to @noudess
2020-03-25 15:41:09 +03:00
Ali 1cdf507b9f [ci skip] Enhanced .gitignore
* Removes the generated files from both CMake and VS
2020-03-24 12:48:04 +03:00
Akkadius 8effd671c5 Second pass through tables [skip ci] 2020-03-22 03:27:44 -05:00
Chris Miles 3e98e60877 Merge pull request #996 from KinglyKrab/master
Add countitem(item_id) to Perl/Lua.
2020-03-21 21:33:07 -05:00
Chris Miles af5022b3db Merge pull request #999 from EQEmu/PortFindLoopless
Rewrite how zone finds ports
2020-03-21 21:30:11 -05:00
KimLS 52d2469da2 Rewrite how zone finds ports 2020-03-21 17:05:28 -07:00
Akkadius e431c56f7c Remove tables that no longer exist 2020-03-21 18:41:36 -05:00
Alex 0ab7291625 Add countitem(item_id) to Perl/Lua. 2020-03-19 22:33:07 -04:00
KimLS e384cf6149 Replace hard coded 12 with EFFECT_COUNT in the two spots I see it used. 2020-03-18 20:42:27 -07:00
Uleat 463c0d9e0e Added proximity check for feared clients 2020-03-18 16:12:25 -04:00
Chris Miles 0f92287c02 Merge pull request #993 from EQEmu/7z_tweak
Tweaked compression arguments for 7-Zip cli command invocation
2020-03-12 22:22:55 -05:00
Uleat 6a61fd5df9 Tweaked compression arguments for 7-Zip cli command invocation 2020-03-12 23:12:44 -04:00
Akkadius 06a51f555e Fix some stragglers 2020-03-12 03:15:14 -05:00
Akkadius 3dc227e8cc Update schema [skip ci] 2020-03-12 02:53:19 -05:00
Akkadius 4375e51431 Push up schema notes [skip ci] 2020-03-12 02:42:04 -05:00
Akkadius d360c60289 Migrate ldon traps and #hotfix [skip ci] 2020-03-12 02:40:04 -05:00
Akkadius 951a77716c Migrate NPC spells, emotes, merchantlist [skip ci] 2020-03-12 02:34:02 -05:00
Akkadius ca49f3902f Migrate getZoneX calls and npc types calls [skip ci] 2020-03-12 02:27:09 -05:00
Akkadius b22d8f6148 Migrate objects and pets [skip ci] 2020-03-12 01:47:40 -05:00
Akkadius a37260fec5 Port import and eport client files to use content database connection [skip ci] 2020-03-12 01:32:25 -05:00
Akkadius ea98a71f22 client_files/export main formatting [skip ci] 2020-03-12 01:24:35 -05:00
Akkadius 7ee28d6361 Migrate shared memory to use content database source; add logic in DB::core to prevent double freeing [skip ci] 2020-03-12 01:23:06 -05:00
Akkadius 49d835165c Shared memory formatting main.cpp [skip ci] 2020-03-12 00:01:30 -05:00
Akkadius 286c08b8d5 Migrate spawn tables [skip ci] 2020-03-12 00:00:39 -05:00
Akkadius 9048265283 Migrate horses [skip ci] 2020-03-11 23:29:54 -05:00
Akkadius 4b55438b3a Migrate ground_spawns [skip ci] 2020-03-11 23:29:24 -05:00
Alex dac7541d89 Update README.md
Change the badges to the updated builds we have for appveyor.
2020-03-11 20:43:53 -07:00
Chris Miles e7266943e2 Merge pull request #990 from alimalkhalifa/master
Modified eqemu_server.pl to pull latest PEQ
2020-03-11 21:20:27 -05:00
Ali 7f25f8a235 Modified eqemu_server.pl to pull latest PEQ
* Also added an escape to skip pulling Maps (tighter feedback loop if
developing)
2020-03-11 17:28:56 +03:00
Akkadius 26b24c02f1 Simplify connection logic 2020-03-11 04:23:44 -05:00
Akkadius 6af1ae32ae Migrate grids [skip ci] 2020-03-11 04:10:21 -05:00
Akkadius 262432f504 Migrate start_zones [skip ci] 2020-03-11 03:58:30 -05:00
Akkadius 3a09197d77 Migrate zone [skip ci] 2020-03-11 03:55:44 -05:00
Akkadius 8d21225eb3 Migrate veteran_reward_templates [skip ci] 2020-03-11 03:43:16 -05:00
Akkadius 4b2fe732d2 Migrate tributes [skip ci] 2020-03-11 03:41:58 -05:00
Akkadius f5cba5ecab Migrate tradeskills and traps [skip ci] 2020-03-11 03:41:09 -05:00
Akkadius df66c75df2 Migrate global_loot [skip ci] 2020-03-11 03:31:20 -05:00
Akkadius b3e4d90e4f Migrate tasks [skip ci] 2020-03-11 03:31:06 -05:00
Akkadius 0d270fdac7 Migrate forage [skip ci] 2020-03-11 03:30:52 -05:00
Akkadius ed06129f9d Migrate fishing [skip ci] 2020-03-11 03:24:21 -05:00
Akkadius ec5be4985e Migrate factions [skip ci] 2020-03-11 03:22:36 -05:00
Akkadius c98d2743c5 Migrate doors [skip ci] 2020-03-11 03:20:38 -05:00
Akkadius 7c2a3f602c Migrate char_create_combinations [skip ci] 2020-03-11 03:12:53 -05:00
Akkadius 13e8199298 Migrate books [skip ci] 2020-03-11 03:10:40 -05:00
Akkadius 1737ef605c Migrate blocked_spells [skip ci] 2020-03-11 03:09:59 -05:00
Akkadius 8e441f006e Migrate auras [skip ci] 2020-03-11 03:06:40 -05:00
Akkadius 91ca5dcade Migrate alternate_currency [skip ci] 2020-03-11 03:02:41 -05:00
Akkadius 7cf52d467e Migrate adventure database calls [skip ci] 2020-03-11 03:00:08 -05:00
Akkadius dde9b98e4f Beginning of multi-tenancy work 2020-03-11 02:43:21 -05:00
Akkadius 240d5c2a66 Add LOS check with NPC::AICheckCloseBeneficialSpells [skip ci] 2020-03-11 01:39:08 -05:00
Akkadius 785804a936 Move tables around in schema [skip ci] 2020-03-10 19:54:26 -05:00
Akkadius e451dad94e Dump tweaks [skip ci] 2020-03-10 19:42:52 -05:00
Akkadius 08414bda55 Fix 7zip availability check [skip ci] 2020-03-10 19:18:18 -05:00
Chris Miles c39978d3d8 Merge pull request #989 from EQEmu/feature/database-dump-service
Database Dump Service
2020-03-10 18:02:30 -05:00
Akkadius f3d8271066 Slightly adjust manifest criteria [skip ci] 2020-03-10 13:41:53 -05:00
Akkadius 431a325414 Update manifest [skip ci] 2020-03-10 00:22:39 -05:00
Akkadius c42d6dcd1b Add 7zip compression; tweak dump settings 2020-03-10 00:14:28 -05:00
Akkadius fa12b146a3 Add "all" .sql files [skip ci] 2020-03-09 23:05:01 -05:00
Akkadius e7fab67d8a Finalize peq-dump.sh script [skip ci] 2020-03-09 22:57:27 -05:00
Akkadius 6438a37fb5 Split up state table dump 2020-03-09 16:31:43 -05:00
Akkadius 899e2d3397 Add innodb conversion script; will hook up in manifest later 2020-03-09 16:31:30 -05:00
Akkadius 53be04c39c Don't lock tables by default; move tables around in schema; add peq-dump.sh script 2020-03-09 15:51:11 -05:00
Akkadius bfecd6ad14 Add query-serv table dump option, add option to dump directly to console, add initializers for dump settings 2020-03-09 14:08:17 -05:00
Akkadius dd1470892d Update database_dump_service.cpp 2020-03-09 03:20:43 -05:00
Akkadius d4a1ea82dc Create database_dump_service.cpp 2020-03-09 03:01:59 -05:00
Chris Miles 8d252dfd9a Implement database dump service 2020-03-09 03:00:07 -05:00
Alex 1577f2823b Merge pull request #988 from KinglyKrab/master
Add GetRaidIDByCharID to Perl/Lua.
2020-03-08 22:42:17 -04:00
Alex cede38f562 Add GetRaidIDByCharID to Perl/Lua. 2020-03-08 21:11:56 -04:00
Alex 201757567c Merge pull request #987 from KinglyKrab/master
Add GetGroupIDByCharID and GetGuildIDByCharID to Perl/Lua.
2020-03-08 20:50:07 -04:00
Alex 2a9248697e Add GetGroupIDByCharID and GetGuildIDByCharID to Perl/Lua. 2020-03-08 20:49:01 -04:00
Michael Cook (mackal) 3708efd8df Merge pull request #984 from EQEmu/bug_fix/split_in_raid
Fix /split while in a raid
2020-03-08 01:03:16 -05:00
Michael Cook (mackal) 1d907564e9 Merge pull request #986 from regneq/master
Faction conning indifferent regardless of faction level in no-combat zones.
2020-03-07 22:01:26 -05:00
regneq 1b15ee141d Faction always conned indifferent in no combat zone such as PoK, Nexus, etc regardless of faction level as evident with Planar Traveler's Manual (faction modifier) and restocking high quality ore (faction reward) in Bazaar and PoK. 2020-03-07 18:38:38 -08:00
Chris Miles d838ac9582 Merge pull request #985 from KinglyKrab/master
Deleted characters will no longer show in the guild window.
2020-03-07 20:32:34 -06:00
regneq dce5dea609 Merge pull request #4 from EQEmu/master
Update
2020-03-07 18:21:25 -08:00
Alex 581d5b1289 Deleted characters will no longer show in the guild window. 2020-03-07 18:58:12 -05:00
JJ 4915e86aba Slight tweak (field name) to #983 "Override LEVEL and INT aggro blocking".
If you already ran the previous SQL, use this instead:
ALTER TABLE `npc_types` CHANGE `always_aggros_foes` `always_aggro` TINYINT(1) NOT NULL DEFAULT '0';
2020-03-05 22:31:54 -05:00
JJ 09e9c0b504 Merge branch 'master' of https://github.com/EQEmu/Server 2020-03-05 21:40:33 -05:00
Michael Cook (mackal) a3eb74b855 Fix /split while in a raid
This still doesn't add support for /autosplit in a raid, how should that
work?

This changes the Raid::SplitMoney to take a group ID and fails when
provided with RAID_GROUPLESS. This does change behavior, but I'm not
sure if it was ever used so ...
2020-03-05 14:37:43 -05:00
Alex fb396e9f60 Merge pull request #983 from noudess/master
Update version for always_aggros_foes db change.
2020-03-05 13:06:10 -05:00
Noudess d85469dff9 Update version for always_aggros_foes db change. 2020-03-05 13:04:21 -05:00
Alex 3f7ce5df72 Merge pull request #982 from noudess/master
Add flag which can enable a mob to always aggro a foe regardless of int or level
2020-03-05 12:31:59 -05:00
Noudess d5b3dc7c0a Merge remote-tracking branch 'refs/remotes/origin/master' 2020-03-05 10:48:40 -05:00
Noudess ac3b4ade10 Implement new always_aggro_foes field and functionality for mobs. 2020-03-05 10:44:01 -05:00
Paul Coene 482584f95a Merge pull request #4 from EQEmu/master
Update to master
2020-03-05 10:37:41 -05:00
Alex 57e7b4a2b8 Merge pull request #981 from xackery/dev-container
Improved vscode devcontainer setup
2020-03-05 09:40:14 -05:00
Uleat 7f6414d685 Some bot-related changes (Master Wu's Technique, Tiger Claw timer) 2020-03-02 12:09:55 -05:00
Xackery Xtal 81e91d7956 Improved vscode devcontainer setup 2020-02-29 21:34:38 -08:00
JJ 3875485567 Merge branch 'master' of https://github.com/EQEmu/Server 2020-02-28 21:41:52 -05:00
JJ eb104e40de Update link [skip ci] 2020-02-28 21:39:46 -05:00
Michael bec33e22da Update Readme [skip ci]
Updated Windows Installer Link
2020-02-28 21:38:39 -05:00
Chris Miles ac104ed4e0 Merge pull request #977 from prestanneth/master
CheckIncreaseSkill() for Throwing within combat abilities
2020-02-27 17:29:54 -06:00
Alex 0ffb5c46a5 Missing bracket 2020-02-24 15:00:12 -08:00
Alex 92638504db Merge pull request #980 from noudess/patch-11
restore some code unintentionally removed
2020-02-24 13:53:33 -08:00
Paul Coene 08002eacea restore some code unintentionally removed
Checked with @KimLS.
2020-02-24 16:51:05 -05:00
KentaiVZ 79248cffec Merge branch 'master' of https://github.com/prestanneth/Server 2020-02-23 12:23:02 +11:00
Chris Miles 8787f51b58 Merge pull request #979 from hgtw/fix/zlib-deflate-size
Send packet uncompressed if zlib deflates to a larger size than input
2020-02-22 16:24:27 -06:00
Chris Miles 69f4d90737 Merge pull request #976 from xackery/master
Added NPC::RecalculateSkills
2020-02-22 16:20:59 -06:00
Chris Miles 1371e1e7ed Merge pull request #978 from xackery/vscode
Added vscode environment files
2020-02-22 16:19:22 -06:00
Chris Miles 81ff7f5d57 Merge pull request #964 from EQEmu/feature/hot-reload
Feature - Hot Reload
2020-02-22 16:18:47 -06:00
Akkadius 8376ed5d3f PR adjustments 2020-02-22 16:17:18 -06:00
Xackery Xtal fe4a0cfdba Added vscode environment files 2020-02-20 16:50:34 -08:00
kentai 0043f56984 ... 2020-02-20 14:37:26 +11:00
kentai 6ddc5ea8e8 CheckIncreaseSkill() from Client::ThrowingAttack() to DoThrowingAttackDmg() so it gets called during combat abilities(zerker volley), as well as regular throws(monk ranged). 2020-02-20 14:23:06 +11:00
Uleat be38a62d70 Merge pull request #971 from EQEmu/eqemu_server_db_updates
Eqemu server db updates [skip ci]
2020-02-19 13:10:36 -05:00
Uleat fdc38315d3 Updated eqemu_server.pl console messages for Applying/Has update messages [skip ci] 2020-02-19 07:52:10 -05:00
Uleat e7c000813f Merge branch 'master' of https://github.com/EQEmu/Server into eqemu_server_db_updates 2020-02-19 02:08:11 -05:00
Michael Cook (mackal) 6fb0042e3f Add packet struct and ops for AdvancedLoreText
Just stuff if people want to start working on it
2020-02-18 15:50:01 -05:00
Xackery Xtal 0a4429c0c0 Added NPC::RecalculateSkills 2020-02-18 09:21:18 -08:00
Michael Cook (mackal) a63dc7d5e0 Merge pull request #974 from noudess/master
Added a rule to disallow click training of tomes and fall back to handins.
2020-02-16 14:37:56 -05:00
Michael Cook (mackal) 67449de27e Merge pull request #973 from TheGrandPackard/Character-PetsUseReagents-Fix-Necro-Spells
Add Necromancer pet spell effect id to pet spell reagent check
2020-02-16 14:37:26 -05:00
Paul Coene 10e5f0e949 Update ruletypes.h 2020-02-16 12:28:18 -05:00
Joshua Packard 141ecca2bc Add necromancer pet spell check to other reagent logic 2020-02-16 09:23:26 -08:00
Paul Coene bd4fa4fb6b Implement RuleB(Skills, RequireTomeHandin) 2020-02-16 11:42:55 -05:00
Paul Coene 5901df4485 Added Skills, RequireTomeHandin rule
Default behavior will remain the same as current code.

If set to true, tomes will need to be turned in to Guild Masters to learn, like in older times.
2020-02-16 11:41:08 -05:00
Paul Coene 8cda4257b4 Merge pull request #3 from EQEmu/master
Update to Master
2020-02-16 11:38:20 -05:00
Joshua Packard 709a25ba9e Add necro pet spell effect id to pet spell reagent check 2020-02-15 16:55:18 -08:00
hg ed09d4ae54 Send packet uncompressed if zlib deflates to a larger size than input
It's not guaranteed that deflate output will be smaller than the input.

In some cases zlib-ng (Z_BEST_SPEED) compression is causing packets to
increase in size and exceed m_max_packet_size. This results in the
packets never being fully received by the client.

Currently this is most reproducible in the spell_book section of the
OP_PlayerProfile message. After using #scribespells this portion of the
player profile has a lot of incrementing spellids which may be affecting
the compression algorithm. The client never processes the player profile
(MSG_SEND_PC) message and times out on zone entry.

This isn't necessarily a bug with zlib-ng since it inflates back to the
original input and normal zlib could do this too, but the current netcode
doesn't handle this.
2020-02-14 10:06:47 -05:00
Alex 952fd43301 Merge pull request #970 from xackery/master
Added EnableFoodRequirement Rule
2020-02-08 22:07:41 -05:00
Xackery Xtal 5f8d193d6a Added EnableFoodRequirement 2020-02-08 18:01:46 -08:00
Michael Cook (mackal) a4a70cf225 Merge pull request #969 from EQEmu/bug_fix/loh_skill_death_reset
LoH skill needs to be reset on death
2020-02-06 19:50:30 -05:00
Michael Cook (mackal) 29fccd9239 LoH skill needs to be reset on death 2020-02-06 16:44:46 -05:00
Michael Cook (mackal) cdc82f0ba7 Merge pull request #968 from EQEmu/feature/aa_timer_reset_on_death
Implement AA timers reset on death
2020-02-06 16:30:10 -05:00
Uleat 78756f27b6 Merge branch 'master' of https://github.com/EQEmu/Server into eqemu_server_db_updates 2020-02-06 16:23:25 -05:00
Michael Cook (mackal) 2f5909d4cb Implement AA timers reset on death
This is a field in the packet, live only uses this for Lay on Hands

Currently I didn't add this to the packet since it has 0 effect on the
client.

We could move this field to aa_ranks which would give more flexibility
for custom servers, but no one said they wanted it there.
2020-02-06 14:20:18 -05:00
Michael Cook (mackal) 13c2df7eb1 Merge pull request #967 from EQEmu/feature/global_loot_hot_zone
Add hot_zone filtering for global loot
2020-02-06 12:56:20 -05:00
Michael Cook (mackal) 16ac6f624b Remove extra whitespace 2020-02-06 01:59:18 -05:00
Michael Cook (mackal) 501204a4d2 Add hot_zone filtering for global loot
We do this in GlobalLootEntry::PassesRules since we want to check if the
hot zone status changes during run time

Value can be null, if null it's not checked. If the value is 0 the zone
must not be a hot zone (I guess one might want that) and if it's not 0,
the zone must be a hot zone
2020-02-06 01:52:35 -05:00
Michael Cook (mackal) 8bcef6c2e7 Fix BodyType bug in GlobalLoot 2020-02-06 01:08:53 -05:00
Michael Cook (mackal) 2db47adf7b Merge pull request #966 from noudess/master
Idle NPC mana regen
2020-02-05 21:17:23 -05:00
Uleat 916c88939c Added missing 'return' 2020-02-05 21:05:51 -05:00
Paul Coene 1528e7cb09 Update npc.cpp 2020-02-05 16:28:07 -05:00
Paul Coene 8dacadb4f9 Update ruletypes.h 2020-02-05 16:26:46 -05:00
Paul Coene e19db3b7f4 Update npc.cpp 2020-02-05 16:25:24 -05:00
Paul Coene e1adffc4be Update npc.cpp 2020-02-05 15:32:07 -05:00
Chris Miles 7eb71c5902 Merge pull request #953 from noudess/patch-5
_GetRunSpeed did not correctly report aa mods for Clients.
2020-02-05 14:10:47 -06:00
Chris Miles da397606b6 Merge pull request #965 from noudess/master
Added RuleI(Combat, LevelToStopACTwinkControl)
2020-02-05 14:10:25 -06:00
Paul Coene 6b27e88315 Update attack.cpp 2020-02-05 14:42:37 -05:00
Paul Coene 4accb4ea2a Update ruletypes.h 2020-02-05 14:41:36 -05:00
Paul Coene c419df52ff Merge pull request #2 from EQEmu/master
Get up to date
2020-02-05 14:40:12 -05:00
Alex 46ff09f438 Merge pull request #962 from noudess/patch-8
Implement DefaultGuild Rule
2020-02-05 13:05:07 -05:00
Paul Coene b4f42c150f Update database.cpp
Change variable_name and use LastInsertedID() to remove unneeded call.
2020-02-05 12:31:29 -05:00
Akkadius 49134644bc Update dbcore logging to use aliases 2020-02-05 01:56:39 -06:00
Akkadius 861b879a94 Add GetCharacterTables() with table - key pair. Use in character hard deletes https://gist.github.com/Akkadius/f10e3757a0b52b971076643eccf9c5d0 2020-02-05 01:34:29 -06:00
Akkadius 929e4c1317 Adjust verbiage [skip ci] 2020-02-04 23:52:18 -06:00
Chris Miles 138cb80b19 Merge pull request #958 from hgtw/feat/autoconsent
Implement consent for group/raid/guild and add Auto Consent support
2020-02-04 18:22:05 -06:00
Uleat 86b6f543b9 Reworked the update cycle of eqemu_server.pl to process each update cumulatively [skip ci] 2020-02-04 19:07:55 -05:00
hg d7138e84c0 Make consent variable names more descriptive and replace char pointer parameters with std::string
Use fmt::format for SQL statement when updating corpse guild id
2020-02-04 18:54:43 -05:00
Michael Cook (mackal) 2d24cdf5e4 Merge pull request #963 from noudess/patch-10
Update command.cpp
2020-02-04 13:24:49 -05:00
Akkadius 4416e774c2 Merge branch 'master' of https://github.com/EQEmu/Server into feature/hot-reload 2020-02-04 00:25:23 -06:00
Akkadius 342012c4f4 Fix compile issue 2020-02-04 00:24:43 -06:00
Akkadius 34005cd2ed Merge branch 'master' of https://github.com/EQEmu/Server into feature/hot-reload 2020-02-04 00:12:51 -06:00
KimLS 6bc6b659d5 Merge branch 'master' of github.com:EQEmu/Server 2020-02-03 17:17:26 -08:00
Paul Coene ad1f18306b Update command.cpp
Fix #size command to be useful for anyone using the model field in npc_types.

All will remain the same for everyone else.
2020-02-03 13:47:16 -05:00
Paul Coene 6a984a53b5 Merge pull request #1 from noudess/patch-9
Implement DefaultGuild rule
2020-02-03 13:02:55 -05:00
Paul Coene f9b3b7aecf Implement DefaultGuild rule 2020-02-03 12:54:26 -05:00
Paul Coene 5fefdfcc17 Added new DefaultGuild rule to Character 2020-02-03 12:50:05 -05:00
Uleat 00f118cfb4 Removed bot rule and command update code from setup because of auto-injection/removal feature added to server code [skip ci] 2020-02-03 08:36:14 -05:00
Uleat a7633f4ddf Massaged database update code [skip ci] 2020-02-03 08:18:55 -05:00
regneq f742d6427b Merge pull request #3 from EQEmu/master
Update
2020-02-02 20:48:05 -08:00
KimLS d65a97e556 Rule for setting max navmesh nodes, default set higher than current to improve accuracy 2020-02-02 20:19:37 -08:00
hg b8229c8459 Update CURRENT_BINARY_DATABASE_VERSION for consent sql update 2020-02-02 22:57:59 -05:00
Michael Cook (mackal) 424b669cbb Target not required for newer clients in QuestReward 2020-02-02 16:39:46 -05:00
hg e09b0ae1e9 Let client handle consent confirmation messages to corpse owner 2020-02-02 14:37:12 -05:00
KimLS c2300d514c Packet warnings 2020-02-01 20:49:04 -08:00
Michael Cook (mackal) f195820854 Merge pull request #959 from hgtw/fix/raid-invite-crash
Fix zone crash when a group member raid invites own group leader
2020-02-01 22:59:33 -05:00
Michael Cook (mackal) 59903313e4 Expand Lua's Client QuestReward function
You can now use it to summon up to 8 items ex:
`e.other:QuestReward(e.self, {items = {28745, 28092}, exp = 250})`

This expands the version that takes a table. The new item is a table (in
the main table) called items, which needs to be auto keyed like the
example above. If you also provide the old itemid key, it will be
ignored if the items is there.
2020-02-01 22:48:39 -05:00
Michael Cook (mackal) b351d3718a Merge pull request #961 from noudess/patch-7
Fix FixZ regarding the use of model in npc_types
2020-02-01 21:55:53 -05:00
Paul Coene ab3d65b2ea Fix FixZ regarding the use of model in npc_types
This fix only impacts those that use the model field in npc_types to override race on the client.

GetModel() returns model if set, otherwise race.

As a refresher, the model field is there so the server can still see a mob as its base race for things like bane, while the client can use a new model.

FixZ needs to know about this.
2020-02-01 20:29:48 -05:00
Michael Cook (mackal) b02e87cce7 Fix Client::QuestReward for struct adjustment 2020-02-01 19:54:26 -05:00
Michael Cook (mackal) 50a39057e4 Update QuestReward_Struct 2020-02-01 19:27:15 -05:00
Akkadius c8e6d031cf Add more rule-driven behavior 2020-01-31 21:51:05 -06:00
Akkadius 158d8a011f Beginning of hot reload work 2020-01-31 20:25:06 -06:00
hg 14c070f845 Use strn0cpy instead of strcpy when copying consent name buffers
Add nullptr checks to consent functions that accept char pointers
2020-01-30 20:19:54 -05:00
Michael Cook (mackal) 6dee837f67 Merge pull request #960 from noudess/patch-6
Further refine monk weight checks for floating point
2020-01-30 15:41:25 -05:00
Paul Coene 83ad9c86db Update attack.cpp 2020-01-30 15:19:02 -05:00
Paul Coene bcb08f99f0 Update attack.cpp 2020-01-30 15:05:41 -05:00
Paul Coene f968d0df4c Reduce changes to those suggested by @mackal 2020-01-30 15:04:06 -05:00
Paul Coene 712366293d Further refine monk weight checks for floating point 2020-01-30 11:10:57 -05:00
hg 9689787e56 Remove assignments in conditions 2020-01-29 18:34:33 -05:00
Uleat 92d32feb0d Fix for player hp updates not matching between client and server 2020-01-28 21:24:14 -05:00
hg 371265d143 Make guild consent persistent for summoned corpses
Live drops group/raid consent but not guild when moving corpse to another zone
Store guild consent id in db for character corpses and keep it updated
2020-01-28 19:41:27 -05:00
hg 43da07fb55 Fix zone crash when a group member raid invites own group leader 2020-01-28 19:37:36 -05:00
regneq f880663528 Merge pull request #2 from EQEmu/master
Update
2020-01-28 15:36:23 -08:00
hg 63b8df72b2 Implement consent for group/raid/guild and add Auto Consent support
Refactors consent to be more live accurate

Message sent to owner and receiver for each zone a corpse is in
Corpses now store consent list instead of clients holding corpse list
Consent throttling added
Message strings and colors updated
Removed reporting invalid consent targets
2020-01-27 00:17:15 -05:00
Akkadius c82d08cf11 Make sure character soft deletes do not reserve name once deleted, add optional retro script to run for servers who had soft deletes running prior to this commit 2020-01-26 16:31:15 -06:00
Akkadius c6ba29f2e5 Revert commit until further testing [skip ci] 2020-01-25 18:41:15 -06:00
Akkadius 6514ccc41c Bot updates are killing running regular updates afterwards [skip ci] 2020-01-25 18:30:52 -06:00
Akkadius 2f49266d08 Fix bots db updates when bins are in bin folder [skip ci] 2020-01-25 18:26:59 -06:00
Michael Cook (mackal) ff897dc90a Update CURRENT_BINARY_DATABASE_VERSION 2020-01-24 20:36:33 -05:00
Michael Cook (mackal) f73f72b2b2 Merge pull request #956 from regneq/master
New pathgrid types.  fixed an issue where npc would face north when pause and heading were set at -1.
2020-01-24 20:31:10 -05:00
regneq c2b3e85272 Added new pathgrid type 7 (GridCenterPoint). This grid causes a NPC to alternate between the first waypoint in their grid (Number 1 in the editor) and a random waypoint. (1 - 7 - 1 - 4 - 1 - 11 - 1 - 5 - 1, etc)
Changed the wandertype IDs to an enum so we know what we're looking at.
Added new pathgrid type 8 (GridRandomCenterPoint).  (SQL required) This new type causes a NPC to alternate between a random waypoint in grid_entries and a random waypoint marked with the new centerpoint column set to true. If no waypoints are marked as a centerpoint, this wandertype will not work. There is no numbering requirement or limit for centerpoints. You can have as many as you need.
New spawngroup field: wp_spawns (SQL required). Added a new spawngroup field, which is a boolean that if true changes the behavior of spawngroups this way: If the spawnpoint in the spawngroup has a grid, the NPC will spawn at a random waypoint location taken from its grid instead of the spawnpoint location.
New randompath behavior: The randompath grid type will now use the closest waypoint as its current waypoint on spawning.  This allows multiple spawn locations to use the same grid without having the undesirable behavior of walking to the first waypoint through walls and ignoring waypoint nodes. NPC::GetClosestWaypoint() was renamed to NPC::GetClosestWaypoints() as it was filling a list of multiple waypoints. a new method NPC::GetClosestWaypoint() returns a single waypoint in the form of an integer.
2020-01-24 15:11:08 -08:00
Michael Cook (mackal) c590cf7c35 Let's try updating travis to bionic 2020-01-23 23:36:13 -05:00
regneq 453bee511a Merge pull request #1 from EQEmu/master
update
2020-01-22 16:22:35 -08:00
Alex 1baeb01e65 Merge pull request #955 from KinglyKrab/master
New Corpse Methods.
2020-01-20 21:15:41 -05:00
Kinglykrab 8b37ef5e67 Formatting 2020-01-20 21:14:28 -05:00
Kinglykrab caceae1028 Implement Corpse counting methods for global/zone-specific counting.
Global:
- Perl: quest::getplayercorpsecount(uint32 char_id);
- Lua: eq.get_player_corpse_count(uint32 char_id);

Zone-specific:
- Perl: quest::getplayercorpsecountbyzoneid(uint32 char_id, uint32 zone_id);
- Lua: eq.get_player_corpse_count_by_zone_id(uint32 char_id, uint32 zone_id);
2020-01-20 20:23:11 -05:00
Kinglykrab 8e6dd638ff Implement SE_SummonCorpseZone (SPA 388).
- This SPA summons all of a targeted group or raid group member's corpses from anywhere in the world.
- Example Spell 16247 (Summon Remains)
2020-01-20 20:20:06 -05:00
Paul Coene 51fb7d8b77 _GetRunSpeed did not correctly report aa mods for Clients.
I actually believe this was some old cut-n-paste error.  aa_mod was being set to a total of all (3) caps - like the previous line.
2020-01-20 15:38:07 -05:00
Michael Cook (mackal) f6ed4bb888 Merge pull request #952 from noudess/patch-4
Fix formula for mana
2020-01-20 14:49:23 -05:00
Paul Coene 9cc73f2b4a Fix formula for mana
There were errors in the old formula for wis/int values over 201.
2020-01-20 14:24:29 -05:00
Akkadius 6f73278cf8 Fix annoying aura crash that has been around for a year and a half, add aura logging, utilize close lists 2020-01-19 21:57:28 -06:00
Michael Cook (mackal) 6c91786cfb Merge pull request #950 from noudess/patch-3
Update attack.cpp
2020-01-19 16:11:20 -05:00
Paul Coene 8eb60302a2 Update attack.cpp
Fix to Monk Mitigation.  Divided weight by 10 to convert to stones.
2020-01-19 16:03:09 -05:00
Michael Cook (mackal) 43df845233 Fix issue with overflow in Mob::SendHPUpdate 2020-01-18 21:42:51 -05:00
Michael Cook (mackal) feefd7a23b Update default NPC:NPCGatePercent value to something more live like 2020-01-17 17:30:38 -05:00
Michael Cook (mackal) 5a1eac010b Merge pull request #945 from noudess/patch-2
Update waypoints.cpp
2020-01-17 14:52:31 -05:00
Paul Coene d47bf6a73b Update waypoints.cpp
Fixed log message to be correct.
2020-01-17 14:35:32 -05:00
Uleat daa9c04e89 Merge branch 'master' of https://github.com/EQEmu/Server 2020-01-16 20:49:12 -05:00
Uleat a9ef2474d4 Updated eqemu_server.pl to use the appveyor archive when setting up bots [skip ci] 2020-01-16 20:49:03 -05:00
Michael Cook (mackal) e1408ede6b Remove AdventureManager::Load since it doesn't do anything 2020-01-16 19:22:17 -05:00
Michael Cook (mackal) 4241fba7e2 Forgot 2 exceptions 2020-01-16 19:10:04 -05:00
Michael Cook (mackal) 139b6c34e5 Change things -Wcatch-value complains about to references 2020-01-16 19:03:36 -05:00
Michael Cook (mackal) baf4cc62eb Fix format truncation in RoF2 OP_Trader 2020-01-16 18:04:20 -05:00
Michael Cook (mackal) 14402c9c41 Fix unreachable switch statements in console_server_connection.cpp 2020-01-16 17:44:46 -05:00
Michael Cook (mackal) e4c4e5edb2 References shouldn't be null 2020-01-16 17:17:31 -05:00
Michael Cook (mackal) e6a14beb2e Remove another unnecessary this == null check 2020-01-16 17:06:11 -05:00
Michael Cook (mackal) 945ca1278c Remove some unnecessary this == null checks 2020-01-16 17:02:35 -05:00
Michael Cook (mackal) a307747c29 Nuke unused command_itemtest 2020-01-16 16:51:24 -05:00
Michael Cook (mackal) 099da513ff Remove some unused misc.cpp functions (encode/decode)
These were unused and throwing warnings, so throw them away!
2020-01-16 16:18:08 -05:00
Michael Cook (mackal) 607379110b Add some focus effects bots were missing 2020-01-16 16:00:38 -05:00
Michael Cook (mackal) 7ce88b30ad Remove Bot::BotfocusType
This was just a maintenance burden keeping it in sync with focusType
(and it wasn't!)
2020-01-16 15:47:25 -05:00
Michael Cook (mackal) 28b0526857 Change NPCType::deity to uint32 to match client data type
Fixes overflow warning in bot.cpp
Shouldn't need DeityAgnostic_LB anymore either
2020-01-16 15:16:21 -05:00
Michael Cook (mackal) d5067c4c3a Treat bots like PCs for pcnpc_only_flag 2020-01-15 19:30:47 -05:00
Uleat 79db824a3c Fix for bots update reporting errors on server start-up after newer update applied [skip ci] 2020-01-15 02:56:00 -05:00
Akkadius 331032f4f4 Push a scan when mobs first construct [skip ci] 2020-01-14 16:14:19 -06:00
Uleat 61790ef195 Wasn't quite dead... (Removed substring call from silent saylink parsing) 2020-01-13 19:01:42 -05:00
Uleat 9bdb70b2f0 Fatality! (Fix for event_say parse events not observing the correct parser for their situation) 2020-01-13 01:47:39 -05:00
Uleat c438819ed6 Fix for command redirect of '#bot' using EVENT_COMMAND invocation 2020-01-12 22:40:05 -05:00
Uleat 7a791dda3c Merge branch 'master' of https://github.com/EQEmu/Server 2020-01-12 21:11:51 -05:00
Uleat 6366a3fa38 Fix for silent saylinks and EVENT_COMMAND calls 2020-01-12 21:11:43 -05:00
Akkadius 306a08b9ac Unify / streamline scanning logic calls, do a manual scan on enter and cleanup logging 2020-01-12 19:37:53 -06:00
Uleat 467f8d7867 Merge branch 'master' of https://github.com/EQEmu/Server 2020-01-12 01:33:17 -05:00
Uleat 6c2100a650 Fix for perl EVENT_COMMAND not exporting single arguments 2020-01-12 01:32:51 -05:00
Akkadius 9dacd0bd7a Remove aa_timers from character tables [skip ci] 2020-01-11 18:19:27 -06:00
Akkadius 3c6cdd0905 Update character_table_list.txt for now until replaced [skip ci] 2020-01-11 18:02:01 -06:00
Akkadius d1fb74ff5f Fix bot table 2020-01-10 02:59:52 -06:00
Akkadius f81b9d8244 Update worlddb.cpp 2020-01-10 02:54:34 -06:00
Akkadius b9e87abb3c Implement Character Soft Deletes 2020-01-10 02:54:29 -06:00
Uleat 451b0180c9 Merge pull request #943 from EQEmu/script_commands
Reworked EVENT_COMMAND handling and addressed script commands not present during help use
2020-01-07 21:43:32 -05:00
Akkadius 77ae4f0c3f Update missing aliases for when log compilation flag is turned off [skip ci] 2020-01-07 16:09:14 -06:00
Uleat 852d951b65 Reworked EVENT_COMMAND handling and addressed script commands not present during help use 2020-01-06 15:41:05 -05:00
Uleat 4e8aec136e Merge pull request #942 from noudess/patch-1
Added addition usage message for #grid for #grid show. (noudess)
2020-01-04 20:17:07 -05:00
Paul Coene eed4a648b4 Added addition usage message for #grid for #grid show. 2020-01-04 16:17:25 -05:00
Uleat 720d314bb8 Merge branch 'master' of https://github.com/EQEmu/Server 2020-01-04 01:56:45 -05:00
Uleat e5ec277b5e Temporary bot impl until further work can be done 2020-01-04 01:56:38 -05:00
Chris Miles 47aa23e21e Merge pull request #941 from KinglyKrab/master
Fix #reloadworld message.
2020-01-03 23:30:21 -06:00
Kinglykrab 8ad11d0f85 Fix #reloadworld message. 2020-01-03 22:31:13 -05:00
KimLS 6243a31644 Added ability to use default looping behavior of libuv, in use in zone now 2020-01-03 19:12:55 -08:00
Akkadius 958a6d939e Have MySQL log timing display correctly 2020-01-03 18:10:30 -06:00
Akkadius e27c4f4f7c Lets fix some overflows [skip ci] 2020-01-03 17:48:41 -06:00
Akkadius 662048cedc Make the logs even better! [skip ci] 2020-01-03 17:25:53 -06:00
Akkadius 9dda9098a0 Add logging for flee 2020-01-03 17:23:51 -06:00
Michael Cook (mackal) 3a10131a00 Add missing currently_fleeing flag to sanity check 2020-01-03 15:50:10 -05:00
Michael Cook (mackal) a94072e3ea Fix CheckFlee logic
This /should/ be correct. But it doesn't explain other issues we've seen
on some servers
2020-01-03 15:49:20 -05:00
Akkadius 40595de46b Fix fmt bindings 2020-01-02 22:27:53 -06:00
Akkadius d6d361f5eb Adjust logging in legacy_combat.lua [skip ci] 2020-01-02 20:10:14 -06:00
Akkadius c48e8d8823 Tweak logging code 2020-01-02 20:04:37 -06:00
Akkadius 61d1c2d75c Update legacy_combat.lua to be more accurate, better logging 2020-01-02 01:08:36 -06:00
Akkadius 69d887b421 Use something a little more compatibility friendly 2020-01-01 20:47:58 -06:00
Uleat e7ad57a37e Resistance is futile! 2020-01-01 21:12:09 -05:00
Uleat d50e5855c4 There, there windows..it'll be ok... 2020-01-01 20:57:42 -05:00
Akkadius 689493610f Make windows happy? 2020-01-01 19:16:33 -06:00
Akkadius 406b193206 Cleanup Perl logging and streamline formatting, tie errors to main Quests logging category live output, add string utils 2020-01-01 19:04:11 -06:00
Akkadius 6e4d9a915d Fix database update condition loop [skip ci] 2020-01-01 14:56:15 -06:00
Chris Miles 3e0ded6c39 Merge pull request #940 from EQEmu/feature/ae-scanning-optimizations
Mob Scanning and Loop Optimizations
2019-12-31 03:13:04 -06:00
Akkadius 9a08b1be93 Flip [skip ci] 2019-12-30 20:18:44 -06:00
Akkadius d71afda954 Optimize cleanup QueueCloseClients [skip ci] 2019-12-30 20:15:33 -06:00
Akkadius a9e4d1212e Update download URL for weekly dump [skip ci] 2019-12-30 05:48:42 -06:00
Michael Cook (mackal) a7479a628c Use CastTime == 0 on clickies to prevent reagent consumption
This /may/ not be correct, but we think it is
2019-12-29 23:00:42 -05:00
Akkadius 67562e3e42 Unify scanning rules [skip ci] 2019-12-29 20:46:40 -06:00
Michael Cook (mackal) 53a289a6bc Refactor Mob::CastedSpellFinished
We now only call GetInv().GetItem() once
2019-12-29 21:40:36 -05:00
Akkadius a5d41b02b7 More tweaks [skip ci] 2019-12-29 17:34:50 -06:00
Akkadius 0232a8a188 More tweaks [skip ci] 2019-12-29 17:20:39 -06:00
Akkadius 78d63165cb Tweaks [skip ci] 2019-12-29 17:10:53 -06:00
Akkadius ccce630cb2 Adjustments [skip ci] 2019-12-29 13:30:05 -06:00
Akkadius 59b2d18a95 Adjust pointer 2019-12-29 03:37:01 -06:00
Akkadius 54f73d7420 Port MassGroupBuff 2019-12-29 03:33:07 -06:00
Akkadius 0f9c34cf3c Port more AE functions to use flexible GetCloseMobList call 2019-12-29 03:28:48 -06:00
Akkadius e531e68b6d Port AEBardPulse to use GetCloseMobList logic 2019-12-29 03:22:14 -06:00
Akkadius 233f26996b Add GetCloseMobList into other calls 2019-12-29 03:15:42 -06:00
Akkadius ec5faea9b1 Use GetSmartMobList in AESpell 2019-12-29 02:42:52 -06:00
Akkadius 6b465c576d More scanning work to unify data structures 2019-12-29 02:01:48 -06:00
Akkadius 9481e9eb2d More scanning changes around AE cast 2019-12-28 23:58:18 -06:00
Akkadius b11528fbcc Merge branch 'master' of https://github.com/EQEmu/Server into feature/ae-scanning-optimizations 2019-12-29 04:47:04 +00:00
Akkadius 2f564d9651 Merge branch 'master' of https://github.com/EQEmu/Server 2019-12-28 22:45:39 -06:00
Akkadius 4b6a1242f5 Fix water map loading case sensitivity issues when using lowercase water maps like the rest of the map code 2019-12-28 22:45:35 -06:00
Uleat 5fee9b2b3e Fix for Client::SendStatsWindow(...) based zone crashes 2019-12-28 23:17:38 -05:00
Akkadius f9e822072f AE Scanning adjustments, testing 2019-12-28 17:08:34 -06:00
Uleat 0643df3dbe Tweaked client-referenced _GetWalkspeed() and _GetRunSpeed() functions to avoid external calls when HorseID is null 2019-12-25 19:02:35 -05:00
Akkadius 8cb51eb253 Scanning optimization work from over a year ago from EZ - cleaned up a bit 2019-12-25 03:16:14 -06:00
Akkadius 07fd803d41 Fix db updates for binaries in ./bin/ path 2019-12-25 02:21:10 -06:00
Chris Miles 255c755169 Merge pull request #939 from EQEmu/feature/world-cli-handler
World CLI Handler - Database Schema
2019-12-25 00:24:04 -06:00
Akkadius 77feaa9ac1 Adjust description [skip ci] 2019-12-25 00:19:59 -06:00
Akkadius fe18033b5d Only add a loginserver if it has a non-empty value 2019-12-24 23:57:54 -06:00
Akkadius 995fb6914e Adjust order of operations 2019-12-24 23:57:36 -06:00
Uleat 6c35611cd0 Exported Entity::IsBot() (as Mob) to the perl api 2019-12-24 16:24:25 -05:00
Uleat 8a038e17e5 Merge branch 'master' of https://github.com/EQEmu/Server 2019-12-24 14:58:06 -05:00
Uleat 7678a905c8 Modified bot command 'pull' to ignore engaged targets 2019-12-24 14:57:58 -05:00
Akkadius 80d8736276 Merge branch 'master' of https://github.com/EQEmu/Server into feature/world-cli-handler 2019-12-24 03:00:48 -06:00
Akkadius 20538e91a1 Adjust usages for banned_ips table to reflect Uleat's changes 2019-12-24 02:59:58 -06:00
Uleat 72f4f10dbb Rename table Banned_IPs to banned_ips [skip ci] 2019-12-24 02:36:00 -05:00
Akkadius c173936e32 Add banned IP's 😠 2019-12-24 00:27:04 -06:00
Akkadius 71a1142f6b Move data buckets to player tables 2019-12-23 23:31:54 -06:00
Akkadius f542913041 Update database_schema.h 2019-12-23 17:54:36 -06:00
Akkadius 4695aa30ad Add more DatabaseSchema entries 2019-12-23 04:11:45 -06:00
Akkadius b222a619d7 Initial schema fetch with world command "database:schema" 2019-12-23 03:04:02 -06:00
Akkadius d23dccec82 Add "world:version" command 2019-12-23 02:16:43 -06:00
Akkadius 25bd285be5 World entrypoint rename 2019-12-23 02:08:51 -06:00
Akkadius af80b51bd3 Adjust newline in handler 2019-12-23 02:00:32 -06:00
Akkadius 4fa14e44aa Update loginserver commands to use the new and more proper argument format 2019-12-23 01:57:34 -06:00
Akkadius 4b69f56a65 Update command handler to use actual real arguments 2019-12-23 01:31:39 -06:00
Akkadius 2ab0ce19a7 Add console helpers to EQEmu::LogSys cleanup world main 2019-12-23 00:39:39 -06:00
Akkadius 8ef6feac9f Change JsonPP default indent to two spaces 2019-12-23 00:39:09 -06:00
Akkadius bc4e09cea4 Code cleanup 2019-12-23 00:38:58 -06:00
Akkadius 81acd797b4 Add initial world server CLI handler interface 2019-12-23 00:38:50 -06:00
Uleat c87b4f2ad4 Added rule_bool 'Character:UseNoJunkFishing' 2019-12-22 21:36:13 -05:00
Uleat e050534378 Added BARD to available class Bot stop_melee_level criteria 2019-12-17 21:02:36 -05:00
Uleat 2c8b51fcda Delete 'staged_updates' after updating quests [skip ci] 2019-12-15 23:40:20 -05:00
Uleat 0cb425b6dd Tweaked bot title and suffix code a little 2019-12-13 20:59:10 -05:00
Uleat bd6e06aadb Few tweaks to bot ai 2019-12-13 16:50:42 -05:00
Uleat ed67b461ea Added 'skip mez' ability to certain entity functions 2019-12-12 20:38:28 -05:00
Uleat 4e6018e3e8 Fix for pets breaking mez after initial aggro 2019-12-10 22:06:51 -05:00
Uleat 1196abfda8 Fix for bot classes having skills they shouldn't. Please report any abnormalities.
Tweaked bot command 'itemuse' to exclude invalid dual-wield reporting
2019-12-10 20:19:43 -05:00
Uleat efd710855e Added bot command 'itemuse' 2019-12-10 02:02:42 -05:00
Uleat ab35c3ed90 Tweaked a few bot things... 2019-12-09 22:01:50 -05:00
Uleat e306e9ad0c Added bot command option 'follow chain' to allow linear assignment of follow ids to eligible bots 2019-12-08 23:54:51 -05:00
Uleat 08b8deaa4b Merge pull request #937 from noudess/master
Fix for client position while on boat
2019-12-08 16:51:41 -05:00
Uleat 326e1be09f Added Mob::m_RelativePosition in preparation for more boat work 2019-12-05 18:53:07 -05:00
Uleat 7e724568a6 Update to boat-related opcode handlers 2019-12-05 18:24:29 -05:00
Uleat 9910b07a4e Changed Bots:AAExpansion to Bots:BotExpansionSettings and converted it bitmask use; Fix for bots not honoring aa expansion setting 2019-12-03 23:39:46 -05:00
Uleat 35fe27eb5d Added bot commands 'applypoison' and 'applypotion' .. new bot owner option 'buffcounter' 2019-12-03 22:01:13 -05:00
Uleat 86593798a9 Added safety check for zone dereference in ServerOP_ReloadRules handler 2019-12-01 17:59:38 -05:00
Uleat b8623bf6df Added command 'nudge' 2019-11-25 19:56:29 -05:00
Michael Cook (mackal) c90326f585 Merge pull request #933 from fryguy503/no_trade_combat
Mobs will not trade anymore if they are currently in combat.
2019-11-18 21:59:24 -05:00
Uleat a0de61a781 Merge pull request #936 from EQEmu/event_combine_validate
Added EVENT_COMBINE_VALIDATE to facilitate special case tradeskill co…
2019-11-18 21:21:06 -05:00
Uleat a325a9978b Added EVENT_COMBINE_VALIDATE to facilitate special case tradeskill combines 2019-11-18 19:39:03 -05:00
Noudess 40747ae5a3 Repair client updates when client is on (does not have to have control) a boat 2019-11-18 14:58:45 -05:00
Uleat 598204d75c Merge pull request #935 from EQEmu/position_packet_update
Brought Actor Position Update packets up to RoF2 standard in preparat…
2019-11-17 00:23:55 -05:00
Uleat 5fbda48c54 Brought Actor Position Update packets up to RoF2 standard in preparation for boat control modifications. Tested on all 6 supported clients - please report any anomalies 2019-11-16 17:10:40 -05:00
Uleat b56bc29388 Fix for #npceditmass saylink apply missing 'exact match' token 2019-11-14 19:56:12 -05:00
Trust b567e57971 Fixed incorrect logic 2019-11-14 02:15:35 +00:00
Uleat 9ced3270a0 Added 'exact match' option to command npceditmass search criteria 2019-11-13 20:04:50 -05:00
Trust 0fcaf82038 Per comment, removing message and simplified. 2019-11-13 23:46:36 +00:00
Trust 05b3c89729 Mobs will not trade anymore if they are currently in combat. 2019-11-13 22:51:33 +00:00
Uleat e46fcdd48a Added ClientMaxLevel accessors to the perl api 2019-11-12 23:46:17 -05:00
Uleat ea414a279e Fix for unix compile failure 2019-11-12 22:13:53 -05:00
Uleat 1553e44efb Added ClientMaxLevel accessors to the lua api 2019-11-12 21:51:48 -05:00
Akkadius 4437eef957 Added option to disable logging to speed up development feedback loop if desired by the developer (Shaves off over a minute if doing project refactorings) [skip ci] 2019-11-09 21:13:33 -06:00
Uleat 6b201fcbef One-time update to log_category_descriptions to fix naming discrepancies. Additions added after the auto-inject code (including future additions) are not affected 2019-11-09 19:28:21 -05:00
Uleat 8f3689e023 Revert "Added auto-correcting code to logsys category descriptions (thanks kentaiVZ!)"
This reverts commit 7de655ba76.
2019-11-09 19:08:57 -05:00
Akkadius c646942ed1 Make sure we check if the NPC is flagged as auto scaled before applying hp regen scaling instead of assuming from 0 on the stat alone [skip ci] 2019-11-09 16:19:45 -06:00
Uleat 7de655ba76 Added auto-correcting code to logsys category descriptions (thanks kentaiVZ!) 2019-11-08 22:36:40 -05:00
Uleat 6f83a39765 Merge pull request #931 from prestanneth/master
Doh %%
2019-11-08 21:59:27 -05:00
kentai 0bbf9d518e Doh %% 2019-11-08 19:49:05 +11:00
Uleat 06ca5b009d Merge pull request #926 from prestanneth/master
#Faction command
2019-11-07 20:26:03 -05:00
Uleat e788779be0 Merge pull request #928 from noudess/patch-1
This allows for merchants to drop corpses
2019-11-07 19:47:43 -05:00
Uleat 5f3d3a3539 Fix for mis-named logsys category [skip ci] 2019-11-07 19:22:45 -05:00
Uleat f402e96b96 Merge pull request #923 from noudess/spawn2
Eye of Zomm needed support in OP_ClientUpdate.
2019-11-07 19:08:41 -05:00
Noudess f012d13f0c Some quick additions of sanity checks for pointers and variables 2019-11-07 09:31:50 -05:00
Uleat 147be47088 Added a few more inventory slot look-ups to perl and lua apis 2019-11-06 14:50:20 -05:00
Uleat 397619e2f9 Added safety check to [tar] dereference 2019-11-05 18:58:46 -05:00
Uleat cd7584f512 Fix for Merc::CheckAETaunt() server crash 2019-11-05 18:31:21 -05:00
Akkadius ed7ce38fe0 Add some pointer safety checks to underlying data service call [skip ci] 2019-11-03 14:34:07 -06:00
Michael Cook (mackal) dff23793c6 Merge pull request #930 from noudess/patch-2
Fix damage done by poison proc changes
2019-11-02 15:54:09 -04:00
Paul Coene 10c383fd86 Update attack.cpp 2019-11-02 15:24:17 -04:00
Paul Coene 2a8ab28551 Fix damage done by poison proc changes
spell procs were not firing due to bad conditional.
2019-11-02 15:19:15 -04:00
Akkadius 769df9ce7b Allow hotfix to be ran in bin paths [skip ci] 2019-11-02 00:18:54 -05:00
Akkadius b1704377da Fix for pointer crash [skip ci] 2019-11-01 22:36:04 -05:00
Akkadius c90bed9f69 Fix regression from build work changes https://github.com/EQEmu/Server/issues/929 2019-11-01 16:14:56 -05:00
Kinglykrab 40c835c576 Merge branch 'master' of https://github.com/EQEmu/Server 2019-10-31 23:39:07 -04:00
Kinglykrab 15609ab1e8 Added optional 'ignore_mods' parameter to AddLevelBasedExp() in Perl and Lua. 2019-10-31 23:38:09 -04:00
kentai 316507adaf reworked valid target
reworked reset portion to catch feigning as impacts faction map
2019-10-31 11:55:07 +11:00
Uleat 384b1b89c7 Merge branch 'master' of https://github.com/EQEmu/Server 2019-10-30 19:19:17 -04:00
Uleat 01b3b41bae Fix for mailkey-based server crashes (does not fix the problem of non-existent mailkeys...) 2019-10-30 07:22:11 -04:00
Akkadius e2630d2b20 Return blank string on null socket [skip ci] 2019-10-29 23:16:37 -05:00
Akkadius dadeb01045 One more arg [skip ci] 2019-10-29 20:55:27 -05:00
Akkadius 31914eb0b6 Properly set box size [skip ci] 2019-10-29 20:32:20 -05:00
Noudess a7bcc12eb6 Removed constant no longer used 2019-10-28 19:50:28 -04:00
Noudess 566e6ea307 Added support for all SE_EyeOfZomm and some other small changes 2019-10-28 19:48:31 -04:00
Paul Coene 96e5adc8de Merge pull request #6 from noudess/patch-2
Allow for new merchant corpse rule
2019-10-28 10:24:15 -04:00
Paul Coene 6609728188 Allow for new merchant corpse rule 2019-10-28 10:21:33 -04:00
Paul Coene 74ca949a5b Added rule to allow merchants to have a corpse. 2019-10-28 10:16:20 -04:00
Noudess 194c61a467 Modify eye of zomm support to be more efficient. 2019-10-26 10:42:00 -04:00
kentai 3e50332c23 tidied 2019-10-24 15:25:51 +11:00
kentai 454a5c4527 #faction -- Displays Target NPC's Primary faction
#faction Find [criteria | all] -- Displays factions name & id
#faction Review [criteria | all] -- Review Targeted Players faction hits
#faction Reset [id] -- Reset Targeted Players specified faction to base
2019-10-24 14:55:55 +11:00
Uleat 135eaae402 Merge pull request #925 from prestanneth/master
Added some backticks on mysql keywords
2019-10-23 22:22:51 -04:00
Noudess 8f5bd52e24 Make sure eye os zomm updates are the actual eye 2019-10-23 13:58:52 -04:00
kentai 62be0c475e Added backticks on sql keyword 2019-10-24 02:44:57 +11:00
kentai 1c6971da4a Merge branch 'master' of https://github.com/prestanneth/Server 2019-10-24 02:11:13 +11:00
Noudess ff59255e63 Eye of Zomm needed support in OP_ClientUpdate. 2019-10-22 10:45:54 -04:00
Uleat 653801a54b Fix for tradeskill combine-based zone crashes 2019-10-18 20:47:21 -04:00
KentaiVZ 6a393afdf3 Merge pull request #2 from EQEmu/master
SYNC
2019-10-18 16:30:58 +11:00
Michael Cook (mackal) b0efe88a03 Merge pull request #922 from noudess/spawn2
Fix some bugs with the use of the model field in npc_types
2019-10-15 21:02:36 -04:00
Noudess 7eb2e834b1 Fix some bugs with the use of the model field in npc_types 2019-10-15 13:22:49 -04:00
KimLS 754ed71f9a Update dependency locations 2019-10-15 00:07:02 -07:00
Alex 4f538fbdad Merge pull request #921 from EQEmu/master_build_revert
Build merge into master again
2019-10-13 21:47:06 -07:00
Uleat 99ee4e04d9 Added bot command 'precombat' to manually set pre-combat mode rather than the 'assumption' process used before; Added rule Bot:AllowOwnerOptionAltCombat to allow admins control over its use 2019-10-13 22:24:06 -04:00
Alex 7989451c36 Merge pull request #920 from EQEmu/build
Build
2019-10-13 18:50:33 -07:00
Alex 4c9c070d67 Merge pull request #919 from EQEmu/revert-917-revert-916-build
Revert "Revert "Build System Updated""
2019-10-13 18:49:42 -07:00
Alex 058a722569 Revert "Revert "Build System Updated"" 2019-10-13 18:49:16 -07:00
Alex 1d460bd636 Merge pull request #918 from EQEmu/revert-821-feature/remove_boost
Revert "Remove boost"
2019-10-13 01:30:26 -07:00
Alex 47ee5b5afb Revert "Remove boost" 2019-10-13 00:53:31 -07:00
Alex 7edfdbd9db Merge pull request #917 from EQEmu/revert-916-build
Revert "Build System Updated"
2019-10-12 21:08:09 -07:00
Alex b9f57f1f28 Revert "Build System Updated" 2019-10-12 21:07:06 -07:00
Alex 579471afcc Merge pull request #916 from EQEmu/build
Build System Updated
2019-10-12 19:04:26 -07:00
KimLS 04e7238a6e Fix for wrong perl lib in auto dependencies 2019-10-11 15:53:23 -07:00
KimLS 0e9fae3181 Merge remote-tracking branch 'origin/master' into build 2019-10-10 17:29:17 -07:00
Michael Cook (mackal) 37d4371acd Merge pull request #915 from noudess/spawn2
Old School poison changes to be close to live.  Added extending proci…
2019-10-10 17:32:48 -04:00
Noudess bcf0af0a8d Old School poison changes to be close to live. Added extending procing rule. 2019-10-10 14:32:27 -04:00
Chris Miles f17779efeb Merge pull request #913 from EQEmu/quest_logging
Added logging functions to perl/lua apis
2019-10-08 20:56:03 -05:00
Uleat 3aed0e257a Added logging functions to perl/lua apis 2019-10-08 20:35:03 -04:00
Uleat a26227f258 Fix for #npceditmass command failure on string-based updates 2019-10-07 22:15:24 -04:00
Michael Cook (mackal) db085b7126 Merge pull request #911 from noudess/spawn2
Old school apply poison was allowing multiple poisons at once.
2019-10-07 17:18:35 -04:00
Paul Coene bca567d2f5 Merge branch 'master' into spawn2 2019-10-07 13:25:12 -04:00
Noudess c62d9040cb Old school apply poison was allowing multiple poisons at once. 2019-10-07 13:16:52 -04:00
Uleat abb1086e52 Added rules Bots:AllowOwnerAutoDefend and Bots:LeashDistance 2019-10-05 23:11:16 -04:00
Uleat 1f04938535 Merge pull request #910 from EQEmu/bot_ai_rework
Updated Bot AI to make use of neglected commands/features
2019-10-05 19:15:13 -04:00
Uleat 12204dd927 Updated Bot AI to make use of neglected commands/features 2019-10-05 18:17:23 -04:00
Chris Miles b118864920 Merge pull request #907 from alimalkhalifa/master
Added automated initialization of login.json [ci skip]
2019-10-05 00:54:49 -05:00
Ali af749cf07a Updated do_install_config_login_json to pull from EQEmu repo [ci skip] 2019-10-01 23:14:01 +03:00
Ali bf45e8b491 Fix missing ;s [ci skip] 2019-10-01 21:31:22 +03:00
KimLS abd14f556a Merge remote-tracking branch 'origin/master' into build 2019-09-30 14:02:39 -07:00
Akkadius 29b90fbeaf Fix escaping issue in #npcspawn create 2019-09-30 14:14:59 -05:00
Akkadius 6cecc85d17 Change login config defaults to avoid confusion [skip ci] 2019-09-30 01:26:09 -05:00
Akkadius f3c85dc585 Auto convert insecure world server admin passwords during the world authentication process, add cli support for updating world admin account 2019-09-30 01:22:40 -05:00
Ali 2e4868d3eb Added automated initialization of login.json [ci skip] 2019-09-30 08:39:41 +03:00
Chris Miles 0005df31f7 Merge pull request #906 from alimalkhalifa/master
Modified eqemu_server.pl to use new login server schema
2019-09-28 02:22:28 -05:00
Ali 1f3287759a Modified eqemu_server.pl to use new login server schema 2019-09-28 10:20:05 +03:00
Alex 3c345b9a9c Merge pull request #821 from adam4813/feature/remove_boost
Merged finally, to build which will hit master soon (tm)
2019-09-27 17:47:27 -07:00
Alex 895c8626b6 Merge branch 'build' into feature/remove_boost 2019-09-27 16:32:13 -07:00
KimLS 2965ab28e2 Remove oldcode 2019-09-27 16:28:14 -07:00
KimLS 259bce9509 Refactor zone net class (nothing to do with networking -.-) 2019-09-27 14:42:35 -07:00
KimLS 316d645f33 Merge remote-tracking branch 'origin/master' into build 2019-09-27 12:04:47 -07:00
KimLS 135b4aac34 Fix for compile error 2019-09-26 17:19:38 -07:00
Kinglykrab 0b3c489028 Exported MerchantCloseShop() and MerchantOpenShop() to Perl. 2019-09-25 20:07:32 -04:00
Akkadius cda6a1465b Fix small loginserver bug where when a worldserver pings world for the first time it may not show up 2019-09-24 21:51:42 -05:00
Chris Miles 9a4a49fc9e Merge pull request #903 from EQEmu/feature/linux-crash-dumps
Automated Linux GDB crash dumps before process dies that follow the same pipeline as Windows
2019-09-24 01:02:16 -05:00
Akkadius 118c6b5636 Add refinements to linux crash handler 2019-09-23 01:56:03 -05:00
Akkadius 161edef2a8 WIP POC 2019-09-23 00:47:57 -05:00
Kinglykrab 54053f7e24 Fix maximum status value.
- Maximum Status of 250 was causing status levels 251 to 254 to be excluded from the queue.
2019-09-19 22:04:54 -04:00
KimLS 8ae76bc217 Merge fix 2019-09-17 20:56:22 -07:00
Akkadius fdf2fe71e1 Few more logging changes to test out Github bot functionality [skip ci] 2019-09-17 19:11:45 -05:00
Akkadius 5a600cd7c0 Fix simple log formatting [skip ci] 2019-09-17 19:08:29 -05:00
Michael Cook (mackal) 91a7ebbdfb Fix crash in SharedDatabase::UpdateOrphanedCommandSettings 2019-09-17 12:52:00 -04:00
Akkadius 3dbb5fab50 Change some logging scope to LogInfo from LogDebug 2019-09-17 02:33:08 -05:00
JJ 9bc96432be Merge branch 'master' of https://github.com/EQEmu/Server 2019-09-17 01:50:19 -04:00
JJ 48cb96214a Legacy LS tables no longer needed. [skip ci] 2019-09-17 01:49:52 -04:00
Akkadius 084e588843 Add /v1/ API route prefix 2019-09-17 00:49:51 -05:00
Akkadius 11fdbb6a49 Add EscapeString to the one function left that is missing it 2019-09-17 00:37:55 -05:00
Akkadius 96ef76847b Fix log calls that either didn't carry over or were using newer aliases that weren't converted to FMT prior to migration 2019-09-17 00:18:07 -05:00
Akkadius 9a7ecb4e8d Fix faction loading logging 2019-09-16 23:50:48 -05:00
Akkadius 578fafb485 Fix rule logging 2019-09-16 23:48:32 -05:00
Akkadius 4e2b2aca6a Add response codes to loginserver api reponses 2019-09-16 23:40:06 -05:00
Michael Cook (mackal) ae0eebe043 Nuke unused TinyXML 2019-09-16 23:55:40 -04:00
Akkadius 4e129ca7b5 Update database manifest 2019-09-16 22:41:03 -05:00
Chris Miles 1521e3810f Merge pull request #889 from EQEmu/lsid
Loginserver overhaul
2019-09-16 22:25:28 -05:00
Akkadius 2a18d7cd80 Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-09-16 22:11:59 -05:00
Uleat d0b505f32d Undefined Behavior fix... 2019-09-16 20:39:05 -04:00
Uleat 9c95d1bfa2 Fix for bad RestoreRuleNotes() query (thanks mackal!) 2019-09-16 20:24:58 -04:00
Uleat 70ad517c14 Fix for linux double free error in RestoreRuleNotes() 2019-09-16 02:18:19 -04:00
Alex 265458a6da Merge pull request #901 from dencelle/patch-1
fix for telnet's lack of language skill
2019-09-13 20:58:31 -04:00
Dencelle 8ab2b15768 fix for telnet's lack of language skill
this function is only used when a raw telnet ooc, auction, or tell is used. it needs to have the language skill set though otherwise it just comes out as garbled
2019-09-13 19:29:37 -05:00
Uleat cf80e594bc Merge branch 'master' of https://github.com/EQEmu/Server into lsid
# Conflicts:
#	common/ruletypes.h
#	world/net.cpp
#	zone/bot_command.cpp
#	zone/command.cpp
#	zone/zonedb.cpp
2019-09-12 01:54:37 -04:00
KentaiVZ 3128453eb6 Merge pull request #1 from EQEmu/master
update local
2019-09-12 08:45:04 +10:00
Chris Miles 655cb798c3 Merge pull request #899 from EQEmu/croak
Remove multi-line Perl croaks
2019-09-10 18:51:20 -07:00
Kinglykrab 499c0fdca5 Fixes multi-link Perl croaks, allowing the quest API reader to function properly. 2019-09-10 21:48:15 -04:00
Uleat 28d5c8f301 Fix-up after 'io_work' branch merger 2019-09-10 00:20:13 -04:00
Uleat 7911225960 Merge pull request #894 from EQEmu/io_work
Io work
2019-09-09 23:57:43 -04:00
Uleat 1990ae970a Updated 'io_work' per pr page request 2019-09-09 23:28:55 -04:00
Uleat b41ae05dc4 Merge branch 'master' of https://github.com/EQEmu/Server into io_work 2019-09-09 22:42:39 -04:00
Uleat 8bb76ae2fe Merge pull request #898 from EQEmu/faction_queries
Faction queries
2019-09-09 22:07:59 -04:00
Uleat e846fc4eea Merge branch 'master' of https://github.com/EQEmu/Server into faction_queries 2019-09-09 21:12:06 -04:00
Uleat e9f5c03141 Merge pull request #892 from prestanneth/master
Bot Naming - View/Delete Databuckets
2019-09-09 20:28:48 -04:00
Uleat 8a26eaabf3 Oops! Gotta have the sql too... [skip ci] 2019-09-09 19:53:34 -04:00
Uleat a73df6aa09 Rework of Bot Owner Options 2019-09-09 19:52:41 -04:00
Uleat 420667a35b Reworked LoadFactionData() to use minimal database queries 2019-09-08 17:02:49 -04:00
Akkadius b63821bbae Change account parse delimiter [skip ci] 2019-09-08 15:44:19 -05:00
Akkadius 51995ca7f2 Formatting [skip ci] 2019-09-08 03:38:08 -05:00
Akkadius edf93f20e5 Update loginserver_webserver.cpp 2019-09-08 03:24:02 -05:00
Akkadius 1e6a67e1ad Change vars to be more consistent [skip ci] 2019-09-08 03:23:47 -05:00
Akkadius 4f20236440 Adjust external endpoint [skip ci] 2019-09-08 03:21:03 -05:00
Akkadius 40696a132b Add another API endpoint [skip ci] 2019-09-08 03:03:52 -05:00
Akkadius 34a4db6302 Fix world server admin auth bug [skip ci] 2019-09-08 02:06:57 -05:00
Akkadius b2526ff6d6 Make sure loginserver is writing to file log [skip ci] 2019-09-08 02:01:10 -05:00
Akkadius 6fcb97e153 Cleanup UCS logging [skip ci] 2019-09-08 01:09:50 -05:00
Akkadius 3177b6ac46 Add CLEStatusString to logging 2019-09-08 00:07:07 -05:00
Akkadius 3230d81d2c Unify ClientLogin logging [skip ci] 2019-09-07 23:59:12 -05:00
Akkadius 89dbdff925 Change logging category [skip ci] 2019-09-07 23:40:22 -05:00
Uleat 5206983513 Removed rule-based check for rule note updates 2019-09-07 23:18:12 -04:00
Akkadius 1bfbe51d89 Add keepalives for world > login and login > world 2019-09-07 21:55:21 -05:00
Uleat 0041d3e0da Manual revert of code from commit to fix clients not dropping group..this still needs to be addressed 2019-09-07 22:15:12 -04:00
Uleat fec567c2f3 Updated Command Update code to report after each process handling rather than at the end 2019-09-07 21:21:46 -04:00
Akkadius 4b61d00dfe Implement Zone -> World keepalive so that Zone reconnects to world in the case of a world crash / reset 2019-09-07 20:20:10 -05:00
Akkadius 4cba9439b9 Move a spammy log call to LogDebug [skip ci] 2019-09-07 19:36:28 -05:00
Akkadius dad1efbeaa Add api endpoint for updating an external account link reference [skip ci] 2019-09-07 19:24:27 -05:00
Akkadius ae781ee962 Replace template function used by many macros 2019-09-07 18:25:40 -05:00
Chris Miles 67d8d6d67d Merge pull request #895 from mibastian/patch-1
git submodule init/update must be executed from the top level working…
2019-09-07 18:11:45 -05:00
Chris Miles b69fee5619 Merge pull request #897 from mibastian/patch-3
RHEL/CentOS 6/7 cmake prerequisites
2019-09-07 18:11:10 -05:00
MIchael Bastian f698571f35 The RHEL/CentOS 6/7 cmake prerequisites
RHEL/CentOS 6/7 are still on cmake version 2. Install cmake3 out of epel and set as primary alternative.
Note: Might break with RHEL/CentOS 8
2019-09-08 00:10:31 +02:00
MIchael Bastian 891944a1ba git submodule init/update must be executed from the top level working tree
Build is failing as the submodules are not installed.
2019-09-07 23:23:08 +02:00
Akkadius cc377f2659 Fix compile [skip ci] 2019-09-07 02:30:33 -05:00
Akkadius 6222132625 More logging cleanup [skip ci] 2019-09-07 02:18:15 -05:00
Akkadius 9e3f9f9749 More logging changes [skip ci] 2019-09-07 01:59:50 -05:00
Akkadius b8216a5d40 Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-09-07 01:03:13 -05:00
Akkadius 7154873091 Change opcode too [skip ci] 2019-09-07 00:52:13 -05:00
Akkadius 052583d170 Adjust more logging [skip ci] 2019-09-07 00:30:54 -05:00
Akkadius 463aeea5a3 Fix struct mismatch from merge of identical blocks of code [skip ci] 2019-09-07 00:17:23 -05:00
Akkadius a624b85ea1 More login logging [skip ci] 2019-09-07 00:12:53 -05:00
Akkadius 4b77f573c0 More logging [skip ci] 2019-09-07 00:07:57 -05:00
Akkadius 1f928cd161 More logging [skip ci] 2019-09-07 00:05:00 -05:00
Akkadius b97696a8c0 Adjust logging [skip ci] 2019-09-06 21:40:13 -05:00
Uleat a428eb61a1 Merge branch 'master' of https://github.com/EQEmu/Server into io_work 2019-09-06 20:52:23 -04:00
Uleat 1515785ada Added count reports to command injection/orphan code 2019-09-06 20:43:21 -04:00
Uleat 8673aec9fd Oops! StringFormat wasn't suppose to make into final 2019-09-06 20:04:08 -04:00
Akkadius 534bed1483 Add Rule Zone:KillProcessOnDynamicShutdown and functionality for killing a dynamic after it has been allocated a zone and has shutdown - this is done for memory reasons because we do not clean up after ourselves at all and zone processes bloat heavily in memory. This is a workaround until we manage this better 2019-09-06 12:26:30 -05:00
Akkadius 45278f80ca Cleanup world logging [skip ci] 2019-09-06 12:03:50 -05:00
JJ 1e1b21f2bf Fix log during UCS shutdown [skip ci] 2019-09-06 12:05:51 -04:00
Uleat fcaa685e77 Hack fix for differences in Windows-Linux template generation techniques 2019-09-05 23:00:46 -04:00
Uleat 96103b09e0 Fix for non-fmtlib related linux build failure 2019-09-05 21:01:47 -04:00
Akkadius de38440c4f Update eqemu_server.pl to use the bin folder if the binaries are being ran from them [skip ci] 2019-09-05 19:53:19 -05:00
kentai 512880e316 Combined databucket view delete commands to #databuckets 2019-09-06 10:04:37 +10:00
KimLS bd64d8e6b3 Revert to earlier perl portable, the new ones don't work 2019-09-05 00:49:01 -07:00
Akkadius e4bfc547cb Another logging adjustment [skip ci] 2019-09-05 02:42:53 -05:00
Akkadius afa6358838 Debugging adjustments [skip ci] 2019-09-05 02:01:52 -05:00
Akkadius c53c769a7c Update logging [skip ci] 2019-09-05 01:54:25 -05:00
Akkadius 4ef481dbc0 Adjust logging slightly [skip ci] 2019-09-05 01:52:49 -05:00
Akkadius c887b7eae3 Changelog formatting [skip ci] 2019-09-05 00:31:27 -05:00
Uleat eefe0dfbb7 Merge branch 'master' of https://github.com/EQEmu/Server into io_work
# Conflicts:
#	common/ruletypes.h
2019-09-05 01:18:27 -04:00
kentai 8e1b6a23eb Bot Naming - View/Delete Databuckets
^bottitle
^botsuffix
^botsurname
#viewbuckets
#deletebucket
2019-09-05 14:12:56 +10:00
Uleat c1b48b9931 Updated the rule system to automatically restore rule notes (rule-based) 2019-09-04 22:37:17 -04:00
Akkadius fceca6e72f Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-09-03 23:37:57 -05:00
Chris Miles eb4592c3ae Merge pull request #890 from noudess/spawn2
Allow single spawn2 locations to filter based on condition (in spawn-entry).
2019-09-03 04:26:53 -05:00
Uleat f9536f9621 Updated the rule system to automatically add new rules and remove orphaned entries from the rule values tables 2019-09-03 04:04:05 -04:00
Akkadius c89cd9d3c4 Changelog format 2019-09-03 00:40:14 -05:00
Noudess 2e98de3923 Changes to allow individual spawn2 locations to vary in npc selection (cond) 2019-09-02 10:34:09 -04:00
Paul Coene 26e14c02b6 Merge pull request #4 from EQEmu/master
Merge master changes into my fork.
2019-09-02 08:50:51 -04:00
Akkadius b45fd24f9d Update bot.cpp 2019-09-02 04:31:10 -05:00
Akkadius acae5d81ab Logs::QSServer to LogInfo 2019-09-02 04:23:50 -05:00
Akkadius 89bfbe6bd2 Logs::Combat to LogCombat 2019-09-02 04:21:03 -05:00
Akkadius 3e4587cd57 Logs::Spawns to LogSpawns 2019-09-02 04:10:43 -05:00
Akkadius 076d393f79 Logs::FixZ to LogFixZ 2019-09-02 03:54:00 -05:00
Akkadius 44e3f28cb0 Logs::AI to LogAI 2019-09-02 03:44:03 -05:00
Akkadius b4339691f9 Logs::Pathing to LogPathing 2019-09-02 03:37:55 -05:00
Akkadius b738f8852d Logs::AA to LogAA 2019-09-02 03:37:18 -05:00
Akkadius 405ed5447d Logs::Skills to LogSkills 2019-09-02 03:36:04 -05:00
Akkadius 70ba7c9c85 Logs::NPCScaling to LogNPCScaling 2019-09-02 03:35:19 -05:00
Akkadius c3a94766ea Logs::Food to LogFood 2019-09-02 03:31:46 -05:00
Akkadius 698d6d4ed2 Logs::ZoneServer to LogInfo 2019-09-02 03:30:03 -05:00
Akkadius af4c630ede Logs::Spells to LogSpells 2019-09-02 03:26:44 -05:00
Akkadius b83c0f8bf9 Logs::Tribute to LogTribute 2019-09-02 03:20:41 -05:00
Akkadius 1acb76bc74 More Logs::None to LogDebug 2019-09-02 03:18:12 -05:00
Akkadius ed4fc74bd4 Logs::Tradeskills to LogTradeskills and more Logs::Error to LogError 2019-09-02 03:10:03 -05:00
Akkadius b402e8f33d Logs::Trading to LogTrading 2019-09-02 02:57:55 -05:00
Akkadius c8e673c6d4 Move inventory log calls to LogInventory 2019-09-02 02:50:39 -05:00
Akkadius 674dfc5fac Move some log calls to use more appropriate LogDebug 2019-09-02 02:39:30 -05:00
Akkadius 2970afff67 More log migrations to fmt / log aliases 2019-09-02 02:33:02 -05:00
Akkadius 2b1950d2e2 Logs::Guilds to LogGuilds 2019-09-02 02:24:34 -05:00
Akkadius 31cebb5793 Logs::Normal to LogInfo 2019-09-02 02:18:54 -05:00
Akkadius ccbbadc5ee Streamline UCS 2019-09-02 01:39:52 -05:00
Akkadius bfd0752c4d Logs::None added to LogDebug 2019-09-01 23:54:24 -05:00
Akkadius 00c40f5d9e Remove errant debug calls 2019-09-01 23:41:26 -05:00
Akkadius 859252a270 Move status log calls to use LogInfo 2019-09-01 23:22:40 -05:00
Akkadius 2eb14a5c8a Move Netcode logging to LogNetcode 2019-09-01 23:10:49 -05:00
Akkadius be291d58b0 Move worldserver logging ot use LogInfo 2019-09-01 22:53:23 -05:00
Akkadius 678c25e02c Simplify error logging 2019-09-01 22:05:44 -05:00
Akkadius 98cbb7d781 Simplify log calls 2019-09-01 21:04:58 -05:00
Akkadius d3803045bc Add log aliases to make logging much easier to use (All FMT driven) 2019-09-01 20:47:26 -05:00
Akkadius db5e511af3 Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-09-01 19:23:56 -05:00
Chris Miles 585c07210d Merge pull request #862 from fryguy503/tradeskill_lockout
Container lock inconsistent state fix
2019-09-01 16:54:22 -05:00
Akkadius b8624d0488 Post PR blocked spells formatting 2019-09-01 16:51:39 -05:00
Chris Miles 206b769731 Merge pull request #866 from eqft/pr/block_all_spells_region
Support for blocked_spells entries for all spells in a region
2019-09-01 16:31:16 -05:00
Akkadius 5381dcead1 Formatting: NPC::ModifyStatsOnCharm 2019-09-01 16:07:48 -05:00
Chris Miles 5c14bc92bd Merge pull request #814 from EQEmu/charm_specialatk
Added Spells:CharmDisablesSpecialAbilities
2019-09-01 15:43:15 -05:00
Chris Miles 898aea80c7 Merge pull request #774 from hgtw/spa112
Make SPA 112 affect fizzle rate not effective caster level
2019-09-01 15:42:00 -05:00
Chris Miles 69a3432898 Merge pull request #877 from noudess/light-wield
Light wield for Npcs/mobs
2019-09-01 15:39:50 -05:00
Chris Miles 1acf78101f Merge pull request #876 from noudess/poison
Poison
2019-09-01 15:38:00 -05:00
Chris Miles 0d6d78ebda Update client_packet.cpp 2019-09-01 15:37:21 -05:00
Uleat a534ab83ec Converted new implode and join_pair functions to template functions 2019-08-31 20:55:46 -04:00
Uleat 3092a8ba3b Fix-up in command system procedural code 2019-08-30 09:41:50 -04:00
Uleat d341a1b38f Updated the command systems to automatically add new commands and remove orphaned entries from the command settings tables 2019-08-30 06:38:48 -04:00
KimLS 276804604c Merge remote-tracking branch 'origin/master' into build 2019-08-29 21:57:54 -07:00
KimLS 836f842f23 Small changes to msvc perl finding 2019-08-28 20:14:31 -07:00
KimLS 4fbce7d5d6 Reworked some of the dependency flow 2019-08-28 14:56:18 -07:00
KimLS 34cb51c449 Some fixes for strawberry perl on msvc, added automatic portable perl linking on windows (experimental) 2019-08-28 01:35:27 -07:00
Uleat f837d423ef Added bot owner option 'spawn message' 2019-08-27 20:06:07 -04:00
KimLS 5ce71b7923 Fix for missing LS option (wowowow) and will build zlib-ng by default now (it doesnt add much to compile time and has a pretty big payoff) 2019-08-27 01:12:47 -07:00
KimLS 9520499103 CMake will fetch visual studio dependencies automatically now 2019-08-26 23:30:30 -07:00
Uleat 7749f83134 Temp fix for Bot::Camp() zone crashes (memory leak still needs to be addressed) 2019-08-27 01:09:11 -04:00
KimLS 5a852d4780 Basic small build guide 2019-08-26 00:44:00 -07:00
KimLS 712e403528 Missing luabind 2019-08-25 22:02:17 -07:00
KimLS 581a0ec212 Added own lua find package that will also try to find luajit since it's compat with the 5.1 api 2019-08-25 20:47:14 -07:00
KimLS bb02af2548 Add check for policy back in 2019-08-25 16:02:45 -07:00
KimLS 852cc9119e Small change to zlibng 2019-08-25 15:49:00 -07:00
KimLS 72a922f2ba Changes to building 2019-08-25 14:45:54 -07:00
Uleat c0575892cb Changed bot create help options to pop-up display 2019-08-24 22:51:29 -04:00
Uleat 377c569635 Fix for clients not dropping group after camping bots 2019-08-24 21:54:46 -04:00
Uleat 5e60fcdc0c Fix for bot pets not updating their health (probably not the best fix..but, it works...) 2019-08-24 21:32:57 -04:00
Uleat 4d1d9df05d Added cap to Titanium BaneDmgAmt translator 2019-08-24 20:38:57 -04:00
Uleat c6c4480061 Merge pull request #888 from KinglyKrab/banedamage
Convert item bane damage to int32.
2019-08-23 22:56:08 -04:00
Kinglykrab c2794b244d Convert item bane damage to int32.
- int8 was not the proper type for this.
2019-08-20 20:52:47 -04:00
Michael Cook (mackal) 83cae7aaf3 Merge pull request #886 from KinglyKrab/master
Export Getter/Setter alternate currency methods to Perl and Lua.
2019-08-20 19:01:45 -04:00
Kinglykrab 08d197fe15 Export Getter/Setter alternate currency methods to Perl and Lua.
- GetAlternateCurrencyValue(currency_id) - Returns the amount of the alternate currency you have.

- SetAlternateCurrencyValue(currency_id, amount) - Allows you to directly set the amount of an alternate currency.
2019-08-20 18:12:27 -04:00
Paul Coene 5a0fcdfefd Merge branch 'master' into light-wield 2019-08-16 10:30:54 -04:00
Paul Coene 49094bcfbc Fix attack to not attack with a non-weapon (expand cancel to include cancel of light)
I found a single item in the db, Flickering Watchtower Torch, that is a light item type but has 1 damage/100 delay.  This code would make that weapon not operate, if we care.
2019-08-16 10:28:06 -04:00
Akkadius 6fb1d95518 Implemented command #spawneditmass <search> <option> <value> with options [respawn_time] currently implemented 2019-08-16 04:33:51 -05:00
Akkadius bf25937ee0 Command #npceditmass now lists column options when one isn't properly specified 2019-08-16 03:39:15 -05:00
Akkadius 05e7c473df Simplified the use of roamboxes and improved the AI for roambox pathing 2019-08-16 03:25:34 -05:00
Akkadius c149e6ca5f Add a heading option to #goto 2019-08-15 22:56:03 -05:00
Uleat 537e3931ef Don't need the zlib1.ilk file... [skip ci] 2019-08-15 22:20:58 -04:00
Chris Miles 9476f9e417 Update SECURITY.md 2019-08-15 20:21:09 -05:00
Chris Miles 1f4753b719 Create SECURITY.md 2019-08-15 20:20:33 -05:00
Uleat 65c05f227b Added zlib1.dll debug symbols to eqemu_server.pl download [skip ci] 2019-08-15 21:10:51 -04:00
Michael Cook (mackal) ef6b2976a3 Make SE_SummonPC only clear aggro for beneficial spells 2019-08-14 23:06:34 -04:00
Michael Cook (mackal) 7b4908957d Clean up EntityList::QuestJournalledSayClose 2019-08-13 15:19:20 -04:00
Michael Cook (mackal) 963da70506 Change how we handle null quest initiator in QuestManager::say
Timers etc triggered say's don't have an initiator but should still
work.

The target ID is set in QuestJournalledSay for us so not needed here
2019-08-13 15:11:37 -04:00
Akkadius 1ef577bc25 Modifications to findzone 2019-08-11 03:20:38 -05:00
Chris Miles a2364023c4 Merge pull request #882 from EQEmu/feature/mass-npc-edit-command
Added bulk edit command #npceditmass <column-to-search> <column-searc…
2019-08-11 02:40:52 -05:00
Akkadius 1c6a76246f Added bulk edit command #npceditmass <column-to-search> <column-search-value> <change-column> <change-value> 2019-08-11 02:40:23 -05:00
Chris Miles 8c17c42a10 Merge pull request #881 from EQEmu/feature/unify-chat-constants
Feature/unify chat constants
2019-08-11 01:58:41 -05:00
Akkadius e9cb8781bf More build fixes for bot 2019-08-11 01:32:51 -05:00
Akkadius 04a18786f9 Bot compile fixes 2019-08-11 01:21:55 -05:00
Akkadius 20bd37dde7 More function name refactoring 2019-08-11 01:09:11 -05:00
Akkadius 665efe09f3 Fill function calls using magic numbers 2019-08-11 00:27:04 -05:00
Akkadius a28ea6419f Beginning of #npceditmass 2019-08-11 00:14:34 -05:00
Akkadius 9f25c9070c Refactor message functions 2019-08-11 00:14:02 -05:00
Akkadius 57354579aa Unify chat constants usage 2019-08-11 00:00:55 -05:00
Akkadius 25a5310f49 Add login account_id in validation response 2019-08-10 07:04:52 -05:00
Akkadius 66ee0dc9bd Update DefaultLoginServerName 2019-08-10 06:59:45 -05:00
Akkadius f39684b7f7 API adjustments 2019-08-10 05:36:22 -05:00
Akkadius f06ff14f9e Squash exception in ParseRequestBody 2019-08-10 05:14:39 -05:00
Akkadius 661ad09291 Remove legacy loginserver config 2019-08-10 05:14:25 -05:00
Akkadius 9708bd38c4 Remove legacy loginserver config 2019-08-10 05:14:12 -05:00
Akkadius 8a2fce83e0 Adjust API handlers 2019-08-10 04:56:50 -05:00
Akkadius 2081b0e214 Merge changes 2019-08-10 03:26:51 -05:00
Akkadius eaf31fb14b Merge branches 'lsid' and 'master' of https://github.com/EQEmu/Server into lsid 2019-08-10 03:26:40 -05:00
Akkadius d2e7cf96bd Update .gitignore 2019-08-10 02:49:55 -05:00
Chris Miles 24d2a5723b Merge pull request #879 from EQEmu/kick_events
Sessions adjustments
2019-08-10 02:48:36 -05:00
Akkadius 17c8af3814 Drop db logging, up stale connections 2019-08-10 02:47:08 -05:00
Akkadius 69bad593cd Merge branch 'master' of https://github.com/EQEmu/Server into kick_events 2019-08-10 02:38:48 -05:00
Akkadius 0884c57928 Update minimum status for devtools 2019-08-10 02:27:07 -05:00
Akkadius 461931f5bd Fix remainder of ghosting 2019-08-10 01:59:58 -05:00
Uleat 0d76e224fd Updated eqemu_server.pl login server config example to json standard [skip ci] 2019-08-09 21:28:07 -04:00
Akkadius ea15e9bc5f Fix bug with command length 2019-08-09 00:43:25 -05:00
KimLS 5fce042a31 Up stale connection ms again 2019-08-08 18:49:21 -07:00
KimLS 6a64d845c2 Async eqemu login credential lookup 2019-08-08 18:45:10 -07:00
Uleat 19c92173d2 Added signal check for player EVENT_CAST_BEGIN 2019-08-08 20:38:24 -04:00
KimLS 880de837d9 Crash and compile issues on windows 2019-08-08 15:55:14 -07:00
Michael Cook (mackal) 8df7bcc2c8 Fix double free in queryserv 2019-08-08 14:26:08 -04:00
Akkadius d9eeb00dea Adjust ghosting algorithm to work much better for super large zones as well 2019-08-07 18:54:53 -05:00
Chris Miles a6af014d5e Merge pull request #878 from EQEmu/fix/eliminate-mob-ghosting
Fix/eliminate mob ghosting
2019-08-06 02:09:03 -07:00
Akkadius 758a1af6ae Merge branch 'fix/eliminate-mob-ghosting' of https://github.com/EQEmu/Server into fix/eliminate-mob-ghosting 2019-08-06 04:07:43 -05:00
Akkadius f1ee042de6 Add bulk force update by distance as well which we had similarily before the movement overhaul 2019-08-06 04:07:37 -05:00
Chris Miles 2014b6c251 Delete CTestTestfile.cmake 2019-08-06 03:28:17 -05:00
Akkadius 8fa76b9154 Optimizations to movement updates to eliminate ghosting possibilities in larger zones 2019-08-06 03:27:33 -05:00
Akkadius 9f6976e852 More readability changes 2019-08-06 03:24:59 -05:00
Akkadius b117be29fb Movement code readability 2019-08-06 01:59:54 -05:00
Paul Coene d3641be6c0 Update loottables.cpp 2019-08-05 09:30:57 -04:00
Paul Coene 06fbd7103e Update client_packet.cpp 2019-08-05 09:24:22 -04:00
Paul Coene acef4c0264 Merge pull request #3 from EQEmu/master
Pull down all of the latest
2019-08-05 08:18:20 -04:00
KimLS b62944c5fb Fix for windows compile issue 2019-08-05 01:12:31 -07:00
Uleat 8065cdb89d Give Erudites their head coverings back (forced until we can sort out the packet building process...) 2019-08-04 22:54:22 -04:00
Uleat 20530ed3cf Merge branch 'master' of https://github.com/EQEmu/Server 2019-08-04 22:37:58 -04:00
Uleat 4aa8cecc55 Fix for SoF client not being able to login 2019-08-04 22:36:24 -04:00
Akkadius 4ec210c411 Update web api errors 2019-08-04 05:09:05 -05:00
Akkadius 4de85ff836 Add CLI and Web endpoints to change local login account password 2019-08-04 05:04:55 -05:00
Akkadius ba6009730b Add CLI and Web endpoints to change local login account password 2019-08-04 05:04:34 -05:00
Akkadius b0d33f094d Add local credential validation logic 2019-08-04 04:16:14 -05:00
Akkadius 5ff0f4851e Add path to http request logging, add email to local account creation through web endpoint 2019-08-04 03:11:30 -05:00
Akkadius 63e1599e9b Remove colon from bearer API key 2019-08-04 03:06:09 -05:00
Akkadius 4498819fad Abstracted CLI command handling interface, streamlined more logging 2019-08-04 02:58:26 -05:00
Chris Miles f5cfec529e Fix format ordering 2019-08-03 04:10:40 -05:00
Chris Miles 9d9374ec19 Fix #gmzone <zonename> <version> to actually create bucket flags via version 2019-08-03 01:32:56 -05:00
KimLS e56edd9231 Some changes to ordering of login authorization for world<->zone 2019-07-30 19:12:44 -07:00
Chris Miles 979c819075 Update README.md 2019-07-29 17:28:58 -05:00
KimLS b754ddbc67 Change drop client code to not be two step process 2019-07-27 20:13:04 -07:00
KimLS 3f2f7b3929 SQL 2019-07-26 19:23:47 -07:00
KimLS 9297fc38f6 Log kick events 2019-07-26 19:22:29 -07:00
Uleat ff4e549ec0 Fix for cmake 'zlib not found' defaulting to internal libs not working issue [skip ci] 2019-07-26 18:20:01 -04:00
KimLS a8ec176432 Merge branch 'master' of github.com:EQEmu/Server 2019-07-25 22:27:11 -07:00
KimLS 212f8a3062 Minor fixes to CLE stale system 2019-07-25 22:26:56 -07:00
Uleat cca5fe3286 Fix for multiple-argument with explicit token use in 'vcxproj_dependencies' [skip ci] 2019-07-25 19:55:42 -04:00
Uleat 9ac15d7a4b Fix for false elevation of priority in 'vcxproj_dependencies' [skip ci] 2019-07-24 22:48:51 -04:00
KimLS 23a187f6c1 Merge branch 'master' of github.com:EQEmu/Server 2019-07-24 19:20:24 -07:00
KimLS f3255c17da Changes to cle enums, characters will now auto kick on login instead of making you wait at world unless you specifically turn that feature on in the rules. 2019-07-24 19:20:09 -07:00
Uleat 90eb9e9da2 Some more mods and tweaks to 'vcxproj_dependencies' [skip ci] 2019-07-24 21:59:57 -04:00
KimLS ffb5b2393f Merge branch 'master' of github.com:EQEmu/Server 2019-07-23 21:59:32 -07:00
KimLS cd32a5a47a Make the reconnect code only trigger when there's actually a client IN ZONE and try to clean up otherwise 2019-07-23 21:59:22 -07:00
Uleat debc2644b1 Tweaked CMakeLists.txt so CMake will play nicer with 'vcpkg' dependencies [skip ci] 2019-07-23 21:11:30 -04:00
Chris Miles 9c9615e8bb Fix the manifest [skip ci] 2019-07-23 19:06:11 -05:00
Uleat 53ec007459 Fixes and tweaks for 'vcxproj' script [skip ci] (zlib still needs some work) 2019-07-23 19:34:35 -04:00
Uleat f5da6e18fc Changed 'vcxproj_dependencies.py' script criteria to allow zero-length pretext headers in multiple-argument hints [skip ci] 2019-07-22 23:27:38 -04:00
Uleat 72ae1b0e0b Added 'vcxproj_dependencies.py' 2019-07-22 23:05:33 -04:00
Akkadius 581cbccad5 CLE checks in non legacy user to world 2019-07-21 18:11:09 -05:00
Akkadius 4aca39ad9b Send correct response 2019-07-21 17:47:34 -05:00
Akkadius 5a7186305d Merge remote-tracking branch 'origin' into lsid 2019-07-21 22:18:19 +00:00
KimLS 780f8f8515 Mark old cle entries as stale when you login 2019-07-20 22:12:48 -07:00
Michael Cook (mackal) 186834594f Merge pull request #871 from EQEmu/fix_OP_SpecialMesg
Fix issues with OP_SpecialMesg handling
2019-07-20 01:46:53 -04:00
Michael Cook (mackal) f4310c5a06 Merge branch 'master' into fix_OP_SpecialMesg 2019-07-20 01:27:37 -04:00
Chris Miles 4d77ba28fe Merge pull request #872 from regneq/master
added language paramter to Lua_Mob::Say() and Lua_Mob::Shout() (credi…
2019-07-19 22:08:46 -07:00
Michael Cook (mackal) 222fd060a3 Change lua constants to be less ugly 2019-07-19 13:04:27 -04:00
regneq 31d0adbacc added language paramter to Lua_Mob::Say() and Lua_Mob::Shout() (credit to Torven) 2019-07-18 18:20:22 -07:00
Michael Cook (mackal) 9fe17f4d46 Fix issues with OP_SpecialMesg handling
This should prevent any optimizations being done on the "1 char string"

This also fully documents the packet and expands the uses of
quest::say/QuestSay
2019-07-18 00:56:46 -04:00
Michael Cook (mackal) 16d6014a87 Merge pull request #859 from eqft/feature/rule_for_gm_level_cmd_with_target
Convert constant check in level_command() to a Rule
2019-07-16 13:43:02 -04:00
Michael Cook (mackal) 7801b295d6 Merge pull request #869 from regneq/master
added variable to chatchannels as well as various changed to chatchannel and using language / language skills d…
2019-07-16 13:39:33 -04:00
Akkadius e92d130538 Adust ProcessUsertoWorldReq reponse codes 2019-07-15 02:21:19 -05:00
Akkadius 7c2ee06355 Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-07-14 22:53:32 -05:00
Akkadius f6259af22b Add login schema conversion script 2019-07-14 22:26:12 -05:00
Akkadius 25c119b843 Add new default login.json 2019-07-14 22:23:51 -05:00
Akkadius 6d9bcfe39f Remove old login.ini 2019-07-14 22:16:50 -05:00
Akkadius ce09aad28a Move rest of logging to FMT and move config options into more finite categories 2019-07-14 22:16:26 -05:00
regneq 460468224e various changed to chatchannel and using language / language skills derived from takp code. 2019-07-14 20:03:30 -07:00
KimLS 6bdc9b6ba5 Add support for single account login to both world and login server, should also work with eqemu login server, can be turned off in rules if you don't mind the side effects double logins cause. Also lowered the linkdead time to 30s + 90s default (2min) 2019-07-13 16:16:15 -07:00
Uleat 7181b46608 Merge branch 'master' of https://github.com/EQEmu/Server 2019-07-13 00:44:09 -04:00
Uleat eb8cd1a5b4 Fix for build zlib option when not using vcpkg 2019-07-13 00:43:56 -04:00
Chris Miles a8e65cdce1 Merge pull request #826 from livermana/master
fix for mob movement getting 'stuck' when paths don't have updated lo…
2019-07-11 18:41:50 -05:00
Akkadius 949e7adff8 init vars [skip ci] 2019-07-11 01:23:55 -05:00
Michael Cook (mackal) 1ba78d0988 Switch to char_traits::length in SerializeBuffer
This benches a bit faster
2019-07-10 14:33:33 -04:00
Akkadius 35eb5b24dd Implement flymode 2019-07-10 03:39:07 -05:00
Akkadius 7b808ee6e0 Add more debug logging for ServerListPacket [skip ci] 2019-07-10 00:45:40 -05:00
Michael Cook (mackal) dfa90aaac5 Fix OP_SpecialMesg encoding
This broke with newer GCCs. It also worked even though the code was just
wrong before???
2019-07-10 01:44:59 -04:00
Michael Cook (mackal) 525813be02 Adjust VARSTRUCT_ENCODE_STRING macros for smarter compilers
This is no more dangerous than what we were doing before (not checking
return value of sprintf) Maybe we should sometime
2019-07-10 01:20:51 -04:00
Akkadius 2a927c5c80 Logging / initializers [skip ci] 2019-07-10 00:11:17 -05:00
Akkadius 6e550ecc75 CLE changes [skip ci] 2019-07-09 23:58:47 -05:00
Akkadius 839baba553 Logging [skip ci] 2019-07-09 19:27:23 -05:00
Akkadius 5c2ac5ab24 Validate password hash in WS auth [skip ci] 2019-07-09 17:52:04 -05:00
Akkadius 553d9aca6f Need more coffee apparently [skip ci] 2019-07-09 17:42:29 -05:00
Akkadius 910dfaf082 Typo fail [skip ci] 2019-07-09 17:41:08 -05:00
Akkadius 9730917d73 Format [skip ci] 2019-07-09 17:40:04 -05:00
Akkadius 32e8a0fa45 Authenticate world admin prior to checking against a world short name [skip ci] 2019-07-09 17:39:06 -05:00
Akkadius 193dbe5938 Few tweaks [skip ci] 2019-07-09 17:22:11 -05:00
Akkadius 86943ce6be Add Database::DbLoginServerAdmin GetLoginServerAdmin [skip ci] 2019-07-09 16:57:14 -05:00
Akkadius 739f54bbfb Add CreateLoginserverWorldAdminAccount command [skip ci] 2019-07-09 05:23:21 -05:00
Akkadius b165760f18 Update database [skip ci] 2019-07-09 04:02:13 -05:00
Akkadius 1a577014d9 Few more updates [skip ci] 2019-07-09 03:46:59 -05:00
Akkadius 54ea7d7c4b Update remote ip [skip ci] 2019-07-09 02:41:09 -05:00
Akkadius 0111e9a5d0 Update client [skip ci] 2019-07-09 02:32:20 -05:00
Akkadius 0c2d26579a Update database.cpp 2019-07-09 02:14:41 -05:00
Akkadius 8eaeda5ec5 Tweaks 2019-07-09 02:10:10 -05:00
KimLS 8c75cf1ff5 Fix for compile issues on windows (bad perl bad) 2019-07-08 19:26:21 -07:00
Uleat 87b1d32ce8 Updated PerlembParser::ExportItemVariables to new inventory standard 2019-07-08 21:58:47 -04:00
Akkadius d8f34651de Streamline worldserver authorization handlers, cleanup and refactoring 2019-07-08 20:25:37 -05:00
Akkadius c2917a9004 Take in API requests via json payload instead of params 2019-07-07 19:57:05 -05:00
Akkadius 5473457c0c Migrate database schema 2019-07-07 05:26:10 -05:00
Akkadius 392b328a95 Centralize local account creation and create API endpoint for creation 2019-07-07 04:32:59 -05:00
Akkadius 4bc6493718 Add cli command create-loginserver-account --username=* --password=* 2019-07-07 03:39:44 -05:00
Akkadius 78d8b909be Add standalone web api server, cli handler, authorization, commands 2019-07-07 03:13:04 -05:00
Akkadius 7d71163fa0 Update dbcore.cpp 2019-07-06 03:33:41 -05:00
Akkadius 0668f41de2 Fix some edge case with account name not being passed to world 2019-07-06 03:19:50 -05:00
Akkadius a9969e500b ls tweaks 2019-07-05 21:22:35 -05:00
Akkadius 3eb102a006 Fix issue with adding the real values of new logging categories 2019-07-05 19:43:10 -05:00
Akkadius 9d3ece8133 More logging 2019-07-05 18:34:08 -05:00
Akkadius b2ed5fe479 Add RFC 5424 logging 2019-07-05 18:16:09 -05:00
Akkadius 86f9a205e5 Remove eqemu_logsys_fmt.h header, more log tweaks 2019-07-05 17:20:20 -05:00
Akkadius f0937c3963 More logging adjustments 2019-07-05 04:21:22 -05:00
Akkadius ffd652a643 Load log settings from the database 2019-07-05 03:50:01 -05:00
Akkadius feea52f79e Make loginserver intelligently determine if the client is requesting from a RFC 1918 network instead of using a config string match 2019-07-05 03:38:12 -05:00
Akkadius 2c922876a9 More loginserver refactorings and cleanup 2019-07-05 02:49:55 -05:00
Akkadius b41e58fd10 More loginserver refactorings and cleanup 2019-07-05 02:33:31 -05:00
Akkadius 8b582730a8 Small refactorings 2019-07-05 00:44:42 -05:00
Akkadius d5eb015533 Remove old DB connector 2019-07-04 23:29:54 -05:00
Akkadius 8ad4ef503b database_mysql -> database 2019-07-03 23:27:45 -05:00
Akkadius a914e97c29 Convert Database::GetLoginTokenDataFromToken 2019-07-03 23:26:03 -05:00
Akkadius 126d8edc57 Convert Database::CreateWorldRegistration 2019-07-03 23:13:13 -05:00
Akkadius d17cfff8fe Migrate query Database::GetFreeID 2019-07-03 22:54:22 -05:00
Akkadius 1a5ce7a9de Cleanup query Database::GetWorldRegistration 2019-07-03 22:47:28 -05:00
Akkadius bd2836db61 DatabaseMySQL -> Database 2019-07-03 21:58:39 -05:00
Akkadius ff5783965a Use one database class 2019-07-03 21:56:24 -05:00
Akkadius 7fcf6b51d8 Update database.h 2019-07-03 21:35:39 -05:00
Akkadius eea3965d02 Add DatabaseMySQL::DoesLoginServerAccountExist 2019-07-03 21:35:36 -05:00
Akkadius d40b95f2e8 ProcessLSStatus logging 2019-07-03 19:22:06 -05:00
Akkadius dc9e4e8260 Received New Login Server Info log 2019-07-03 19:10:34 -05:00
Akkadius 8c25486112 Few tweaks 2019-07-03 18:54:08 -05:00
Akkadius 9613d128ae More logging updates 2019-07-03 18:49:53 -05:00
Akkadius 11bc21f99f Update more logging 2019-07-03 16:26:32 -05:00
Akkadius cdfd473476 Add more logging 2019-07-03 16:01:44 -05:00
Akkadius bb7cae46c5 Update console.cpp 2019-07-03 14:53:24 -05:00
Akkadius c7e196e26d Update client.cpp 2019-07-03 04:27:51 -05:00
Akkadius daec42c4d9 Migrate quite a few database calls to dbcore and fmt 2019-07-03 04:03:54 -05:00
Akkadius b04d71ff45 Update json_config.cpp 2019-07-03 03:09:03 -05:00
Akkadius fbebec03ae Update database_mysql.cpp 2019-07-03 02:57:03 -05:00
Akkadius 217c9751a8 Tons of cleanup / formatting 2019-07-03 02:50:16 -05:00
Akkadius 9e0f440106 Remove postgres 2019-07-03 02:16:30 -05:00
Akkadius 6638b9ade5 Cleanup 2019-07-03 02:16:16 -05:00
Akkadius ea02042ace Merge fixes 2019-07-03 01:40:36 -05:00
Akkadius 4e7bcd86ff Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-07-03 01:18:23 -05:00
Akkadius 915bbe32f0 Add submodule commands to linux installer [skip ci] 2019-07-03 01:09:55 -05:00
Akkadius 151cb5f286 Update changelog.txt 2019-07-03 01:00:03 -05:00
Akkadius c8d6895526 See changelog 2019-07-03 00:59:49 -05:00
Akkadius dce5d774e2 Merge branch 'master' of https://github.com/EQEmu/Server into feature/eqemu-api-data-service-netstats-ws 2019-07-03 00:36:26 -05:00
Chris Miles 69c57d8715 Merge pull request #867 from N0ctrnl/patch-7
Updated libsodium18 package location for Ubuntu
2019-07-02 01:23:32 -05:00
Kurt Gilpin a42d77c204 Updated libsodium18 package location for Ubuntu 2019-07-01 22:29:51 -05:00
Chris Miles 6757f61249 Merge pull request #858 from jalavoy/master
Updating linux installer script
2019-07-01 21:17:47 -05:00
Akkadius 6e51783d4b Don't send reload all rules messages to non-gm's 2019-07-01 15:37:12 -05:00
Akkadius a4f68f755f Update system_tables.txt 2019-07-01 02:52:06 -05:00
Akkadius 8d67c1aed7 Merge branch 'master' of https://github.com/EQEmu/Server into feature/eqemu-api-data-service-netstats-ws 2019-07-01 01:28:49 -05:00
Akkadius 1e90e64178 Merge branch 'master' into feature/eqemu-api-data-service-netstats-ws 2019-07-01 00:52:34 -05:00
KimLS f50d502f3d Fix for x86 zlib issue 2019-06-30 18:28:11 -07:00
KimLS e086f53b97 Zlib ng 2019-06-30 18:13:46 -07:00
Justin Wienckowski 682054970c Zone::IsSpellBlocked should correctly handle spellid 0 (all spells) blocked in a region (type 2). 2019-06-29 00:08:37 -07:00
Uleat d7c110041a Added full support in eqemu_server.pl for downloading both stable and unstable bots binaries 2019-06-27 21:08:08 -04:00
Uleat 6c73fee075 Added bot command 'petgetlost' to dismiss summoned pets 2019-06-27 19:00:02 -04:00
Akkadius 8bb909090b Merge branch 'master' into lsid 2019-06-26 00:56:13 -05:00
Uleat ee49ad3ce9 Reworked BotDatabase into a functional add-on for ZoneDatabase 2019-06-24 18:13:25 -04:00
Akkadius 89691d6c32 Change websocket listener verbiage 2019-06-23 21:33:24 -05:00
Akkadius 09b633e374 Merge branch 'master' into feature/eqemu-api-data-service-netstats-ws 2019-06-23 22:51:21 +00:00
Akkadius 18fa056a38 Merge branch 'master' into feature/eqemu-api-data-service-netstats-ws 2019-06-23 17:26:11 -05:00
Uleat 2e9cf7dbd7 Added bot owner option 'stats update' 2019-06-22 22:53:35 -04:00
Uleat c9d4bb178f Added level to NPC spell list logging .. and some additional debug logging for same 2019-06-22 19:05:41 -04:00
Uleat 5d138891d8 Fix for insufficient spell mana logging 2019-06-22 06:42:06 -04:00
Justin Wienckowski 5fdf976137 Add an optional SQL to add the new rule to the rule_values table. Default value is unchanged. 2019-06-21 20:02:42 -07:00
Uleat a8d3ba41a7 Fix for non-BOTS compile failure 2019-06-21 18:36:33 -04:00
Uleat 2cd910ad86 Added ping() call to botdb 2019-06-21 07:58:47 -04:00
Uleat e903b06c22 Added const cast Entity::CastToBot() 2019-06-21 06:00:58 -04:00
Uleat ca874cb861 Fix for NukeItem not taking items from general bags properly 2019-06-20 22:09:49 -04:00
Uleat a2a13e9779 Revert "fixed opcode for deleteing a item out of a player's inventory slot"
This reverts commit 65e429a596.
2019-06-20 19:37:08 -04:00
Uleat 104edee427 Fix for fishing not working correctly (thanks mackal!) 2019-06-19 23:20:43 -04:00
Uleat 6256660972 Fix for possible memory leak with mercenaries and bots 2019-06-19 20:01:57 -04:00
Uleat 0541eec8bf Fix for thrown weapons hitting self 2019-06-19 17:47:24 -04:00
Trust 1aab23098a Container lock inconsistent state fix 2019-06-18 23:59:37 +00:00
Uleat c74c46263a Merge pull request #861 from KinglyKrab/master
Export Mob::GetItemStat(item_id, identifier) to Lua.
2019-06-16 21:09:49 -04:00
Kinglykrab 51c51b0d72 Export Mob::GetItemStat(item_id, identifier) to Lua. 2019-06-16 19:56:07 -04:00
Uleat f4e609ef0a Merge pull request #860 from KinglyKrab/master
New Perl/Lua buff functionality.
2019-06-16 19:51:43 -04:00
Kinglykrab 9356b5dc7f New Perl/Lua buff functionality.
- Client::FindMemmedSpellBySlot(slot)
	This allows you to find memmed spells by a specific slot.
	Example: https://i.imgur.com/06OFT3c.png
	Perl Example: https://pastebin.com/BCr6KqSS

- Client::MemmedCount()
	This will find the number of memmed spells the client has.
	Example: https://i.imgur.com/cY26DEl.png
	Perl Example: https://pastebin.com/T3ahSUgi
2019-06-16 12:53:23 -04:00
Justin Wienckowski 6a31af81ee Add GM:MinStatusToLevelTarget rule, which determines the GM status needed to use the #level command on your target. 2019-06-16 00:43:18 -07:00
James Lavoy 2a308b1f14 moderning and updating installer script
fixing tabs

adding perl-json

adding sodium

adding openssl

removing debian stuff, refactoring rhel stuff

changing some fedora stuff

more fedora crap

dnf doesn't like newlines in group install?
2019-06-15 21:08:13 -06:00
Uleat 8681d0acf7 Merge pull request #855 from KinglyKrab/master
New Perl/Lua buff functionality.
2019-06-13 19:17:53 -04:00
Kinglykrab 7d1362732d New Perl/Lua buff functionality.
- Mob::FindBuffBySlot(slot)
	This allows you to find buffs by a specific slot.
	Example: https://i.imgur.com/VG68cxs.png
	Perl Example: https://pastebin.com/8HvMAC4h

- Mob::BuffCount()
	This will find the active number of buffs an NPC/client has.
	Example: https://i.imgur.com/jrLRBwV.png
	Perl Example: https://pastebin.com/Wmg16wwp
2019-06-13 18:20:33 -04:00
Akkadius 86ed2c1e76 Pets shouldn't be scanning for aggro 2019-06-12 01:50:01 -05:00
Akkadius d817f08373 Fix issue with pets causing players to be aggroed and ignoring distance checks 2019-06-12 01:27:55 -05:00
Akkadius 882e3742d9 Make sure AC / Corrup and PhR do not auto scale unles auto scale criteria is met 2019-06-11 15:26:01 -05:00
Akkadius 660416065e Fix scaling and display for cor / phr 2019-06-11 15:19:27 -05:00
Chris Miles 79d8a6329c Merge pull request #854 from EQEmu/feature/file-load-tweaks
Feature/file load tweaks
2019-06-10 00:48:45 -05:00
Akkadius a2dd1fc753 Update eqemu_server.pl 2019-06-10 00:40:11 -05:00
Akkadius ce41cf9cd5 Load mail_opcodes.conf dynamically 2019-06-10 00:29:24 -05:00
Akkadius c0e07cec01 Loader adjustments 2019-06-10 00:01:18 -05:00
Akkadius 3c8ecd6715 Cleanup files if exist 2019-06-09 23:47:15 -05:00
Akkadius b6e592db13 Remove more defaults 2019-06-09 23:38:42 -05:00
Akkadius 94cce09253 Remove perl defaults 2019-06-09 23:36:54 -05:00
Akkadius f6a96ae941 Remove no longer used html template files 2019-06-09 23:36:19 -05:00
Michael Cook (mackal) 290133803e Add a hard off for NPC scaling for Merc/Bot
They don't need it. We may want to add this to actually be in the DB for
normal NPCs in the future.
2019-06-10 00:36:18 -04:00
Michael Cook (mackal) 4627bfe271 Mercs shouldn't do global loot (I think) 2019-06-10 00:30:04 -04:00
Uleat c3e10a7409 Merge pull request #853 from dencelle/master
fixed opcode for deleteing a item out of a player's inventory slot
2019-06-09 19:11:06 -04:00
dencelle 65e429a596 fixed opcode for deleteing a item out of a player's inventory slot 2019-06-09 22:36:23 +00:00
Michael Cook (mackal) 63933f53c8 Merge pull request #851 from fryguy503/lua_stand_crouch
LUA/PERL - IsStanding() and IsCrouching() - Returns as bools
2019-06-08 14:09:44 -04:00
Trust d23a6e646e LUA/PERL - IsStanding() and IsCrouching() - Returns as bools 2019-06-08 04:48:06 +00:00
Uleat 2690e4de4d Redirected bots binaries remote to appveyor artifact repo (thanks Akkadius!) [skip ci] 2019-05-27 20:27:23 -04:00
Chris Miles 1122d29e19 Update system_tables.txt 2019-05-26 03:37:52 -05:00
Akkadius b2aa696a3a Add get_zone_attributes back in 2019-05-25 23:11:21 -05:00
Akkadius 40b63f74ee Add logging calls 2019-05-25 18:46:07 -05:00
Akkadius 9c931ced4e Allow local admin login 2019-05-20 00:49:05 -05:00
KimLS 52276d06b0 Remove c++17 construct, a bridge too far for now 2019-05-17 00:29:51 -07:00
KimLS 597c4e8c60 Rename websocket_server so it no longer shares a name with its own type 2019-05-17 00:22:32 -07:00
KimLS 5b41060588 Swap out recast for our own submod 2019-05-17 00:18:32 -07:00
KimLS c737504645 Subscription changes 2019-05-17 00:09:38 -07:00
KimLS e277e55718 Merge remote-tracking branch 'origin/master' into feature/eqemu-api-data-service-netstats-ws 2019-05-16 14:38:12 -07:00
KimLS 5936d865b5 Apply patches to recast 2019-05-16 14:37:52 -07:00
KimLS f2d47927b8 Update cmake to point at our static recast, need to apply our patches to it now 2019-05-16 14:28:15 -07:00
KimLS 4836db73d7 Recast navigation 2019-05-16 14:24:08 -07:00
KimLS e00cd4afd9 Remove recast module 2019-05-16 14:13:13 -07:00
KimLS ebca112769 Implement a basic websockets server 2019-05-16 00:12:21 -07:00
KimLS 5bfcef600f Removed submodule 2019-05-14 13:06:46 -07:00
KimLS 845dd339b2 Remove websocketpp 2019-05-14 13:04:36 -07:00
KimLS 09b91f5229 Change hash from enum to int, older gcc versions have trouble with that 2019-05-12 21:09:06 -07:00
KimLS 0eeb73b436 Fix for lvalue ref trying to bind to a rvalue 2019-05-11 00:10:47 -07:00
Alex ad790ac8ef Merge pull request #840 from noudess/master
Roambox patch for navmesh and large roamboxes in hilly zones
2019-05-02 18:38:00 -07:00
Akkadius d7abf3f26c Change compression level in deflate 2019-05-01 16:23:24 -05:00
Akkadius 6739eea78b Change NPC scaling classification order check 2019-05-01 15:26:16 -05:00
Uleat cd3125ced0 Added safety to SuspendMinion spell index dereference 2019-04-28 21:20:52 -04:00
Uleat 72e0320509 Fix for loginserver crashes 2019-04-25 01:11:56 -04:00
Chris Miles 15ff0bf5c3 Merge pull request #843 from noudess/RandomizeFeatures
Expose RandomizeFeatures which supercedes plugin::RandomFeatures in functionality
2019-04-24 16:53:33 -05:00
Paul Coene a402f01514 Update perl_mob.cpp 2019-04-24 17:26:17 -04:00
Paul Coene dfe4bb5b78 Update lua_mob.cpp 2019-04-24 10:32:09 -04:00
Paul Coene c24bfaf35f Update lua_mob.h 2019-04-24 10:30:24 -04:00
Paul Coene 7dc1e10956 Update perl_mob.cpp 2019-04-24 10:10:48 -04:00
KimLS 63198d974e Merge branch 'feature/eqemu-api-data-service-netstats' of github.com:EQEmu/Server into feature/eqemu-api-data-service-netstats 2019-04-16 01:09:31 -07:00
KimLS cd8ab727aa Tweaks from other branch 2019-04-16 01:09:25 -07:00
Akkadius 1d88b063aa Change compression level in deflate 2019-04-15 00:12:11 -05:00
Michael Cook (mackal) 54da27424f Implement Foraging AA
Currently this SPA is only checked for AA bonuses since a non-permanent
bonus doesn't make sense. Plus I'm not sure the client is aware of it in
spells/gear
2019-04-14 00:18:23 -04:00
Michael Cook (mackal) 6e1f317c60 Merge pull request #839 from briankinney/rule-based-faction-thresholds
Rule based faction thresholds
2019-04-13 16:01:29 -04:00
Brian Kinney 3e8ef681a3 Change defaults to the values intended by recent update 2019-04-13 15:04:43 -04:00
Michael Cook (mackal) e009e064f3 Merge pull request #842 from noudess/faction_min_max
Fix the auto-correct mechanism on illegal faction
2019-04-13 12:56:58 -04:00
Michael Cook (mackal) 9654beda9f Merge pull request #841 from noudess/use_model
Fix version to match committed manifest
2019-04-13 12:56:48 -04:00
Paul Coene 3105577c1b Fix the auto-correct mechanism on illegal faction
Auto correct was not using the new client_base_data for min/max.
2019-04-13 12:39:45 -04:00
Paul Coene c06774ca61 Fix version to match committed manifest 2019-04-13 07:22:16 -04:00
Noudess e1e3d99a79 Change range of values to accomodate large roamboxes 2019-04-12 20:13:30 -04:00
Noudess 8942c0ea24 Merge remote-tracking branch 'upstream/master' 2019-04-12 20:11:16 -04:00
Chris Miles 1603ea097f Merge pull request #832 from noudess/master
Added model field to npc_types to allow using a diff graphic without losing race
2019-04-12 18:48:04 -05:00
Paul Coene 0426a15fec Update mob.cpp 2019-04-12 19:34:28 -04:00
Paul Coene 5b374927f2 Update mob.cpp 2019-04-12 19:16:00 -04:00
Noudess d59170f84f Fix some formatting and fix some incorrect constants. 2019-04-12 19:09:47 -04:00
Brian Kinney 8aaf39d2d9 Fix incorrect rule categories in SQL 2019-04-12 15:29:05 -04:00
Brian Kinney 2bb305305a Use rules to configure faction thresholds
Default to legacy values. Updated "accurate" values are available in optional database script
2019-04-12 15:25:32 -04:00
Brian Kinney e8127f4b8a Merge pull request #1 from EQEmu/master
Update from Root Repository
2019-04-12 13:51:51 -04:00
Noudess 762de03be7 Merge 2019-04-12 10:50:11 -04:00
Noudess f18b9c99b5 Merge remote-tracking branch 'upstream/master' 2019-04-12 10:35:10 -04:00
Alex 8f9a859c56 Merge pull request #838 from noudess/roamboxfix
Fix SetCurrentWP to allow negatives
2019-04-11 15:02:19 -07:00
Paul Coene 5e008a5a97 Fix SetCurrentWP to allow negatives
Needed to make new roambox constants (that were used instead of 666) actually work.
2019-04-03 15:56:12 -04:00
Michael Cook (mackal) fa2052236c Update some spell immune message colors Fixes #833
Should probably go and do some captures on live, but MQ2Cast's source is
probably correct
2019-03-27 18:20:39 -04:00
Noudess f75c5b6fc8 Fix db version. 2019-03-25 19:32:46 -04:00
Noudess 63045fadd9 Manifest and sql to add model to npc_types to override race if presentwq 2019-03-25 19:29:57 -04:00
Akkadius 850b32f2ca Adjust constants 2019-03-25 18:24:16 -05:00
Noudess 60d5c11c43 Added a use_model field to npc_types to override race-graphics, maintain race. 2019-03-25 19:21:33 -04:00
Chris Miles 03458b88a4 Merge pull request #831 from noudess/master
Fix issue with roambox wait time after switch to new movement code.
2019-03-25 18:12:05 -05:00
Noudess 0852468b88 Add constants for waypoints 2019-03-25 17:54:17 -04:00
Noudess 3d1dda888d Use constants for waypoint values that are not actual waypoints 2019-03-25 14:58:26 -04:00
Akkadius 566f743a88 Derp 2019-03-21 18:43:18 -05:00
Akkadius b8c41c9e9a Use a different way to determine zone loaded 2019-03-21 18:38:14 -05:00
Akkadius c23f0eaefb Add api get_opcode_list 2019-03-20 03:19:47 -05:00
Akkadius 7a50ad4c11 Hook up netstats to data service 2019-03-19 17:50:33 -05:00
Akkadius 81e511df13 Add error handler so that calls aren't made when zone isn't booted 2019-03-19 16:34:12 -05:00
kentai 6da0f84e18 Merge branch 'master' of https://github.com/EQEmu/Server 2019-03-16 17:27:08 +11:00
kentai b2dd3df1e2 Revert "Added bot commands"
This reverts commit 3ec500244e.
2019-03-16 17:16:49 +11:00
KimLS cbfd02b9ff Remove logging from daybreak network code to make it thread safe, there is a threadsafe replacement if you care (there's only like 4 logs in the code anyway); made event loop thread local so we can have one for each thread 2019-03-15 21:34:23 -07:00
Noudess a4c171cb1d Fix issue with roambox wait time after switch to navmesh. 2019-03-15 10:28:23 -04:00
Michael Cook (mackal) 20de6acfea Merge pull request #829 from noudess/master
Fix Spin() to use old mechanism so the npc actually spins again.
2019-03-14 12:56:44 -04:00
KimLS 9dc83d389e Add wip sql so you don't have to try to divine what im going for 2019-03-13 22:59:00 -07:00
KimLS 7977949ae9 Change eqstream interface to get rid of some stuff as well as flesh out a few more options plus some rule and performance changes 2019-03-13 22:55:49 -07:00
Michael Cook (mackal) 9c42f28b0d Make Database::CheckStatus() 2038 safe 2019-03-12 14:31:23 -04:00
kentai 3ec500244e Added bot commands
^bottitle, ^botsuffix
2019-03-12 19:21:30 +11:00
KentaiVZ 4425e3ab49 Merge pull request #5 from EQEmu/master
merge local
2019-03-12 18:16:33 +11:00
KimLS 67b228a91c Added packet stats 2019-03-11 15:24:32 -07:00
Noudess 75d3329d37 Fix Spin() to use old mechanism so the npc actually spins again. 2019-03-11 18:24:02 -04:00
Chris Miles 26a95998da Merge pull request #828 from noudess/master
Fix issue with perl script not updating itself correctly
2019-03-11 12:46:26 -07:00
Noudess 6715977a1f Change the system call to an exec. Fix the misnamed argument. 2019-03-11 13:15:55 -04:00
KimLS 675a67b676 Set data rate to disabled by default 2019-03-10 03:28:44 -07:00
KimLS 1c20da88f9 Compile error fixes 2019-03-10 00:53:08 -08:00
KimLS 35a54426da Merge fix 2019-03-10 00:48:48 -08:00
KimLS f010f3be39 Remove jsoncpp submodule since it's not intended to be used as a subproject sadly 2019-03-10 00:43:43 -08:00
KimLS 233c1b6770 Remove old glm 2019-03-10 00:39:49 -08:00
KimLS fe3fe163a6 Remove old recast from proj 2019-03-10 00:39:22 -08:00
KimLS d0ad579501 Recastnav to submodule 2019-03-10 00:38:43 -08:00
KimLS 3983a099c0 Remove old libuv library 2019-03-10 00:18:36 -08:00
KimLS 7c0ca73937 libuv submodule 2019-03-10 00:18:04 -08:00
KimLS 8689186859 Remove old libs 2019-03-10 00:11:26 -08:00
KimLS 777f182282 Update fmt lib with submodule 2019-03-10 00:10:47 -08:00
Akkadius aa797b7ce4 Some sorting on get_client_list 2019-03-10 01:44:13 -06:00
Akkadius 374841cba0 Add call api get_client_list 2019-03-10 01:43:07 -06:00
Akkadius ecd6c362a2 Update zonelist.h 2019-03-10 01:11:31 -06:00
Akkadius 891f0740d7 Refactor naming of zone server "list" to zone_server_list 2019-03-10 01:10:04 -06:00
Akkadius e5512f05b5 Hook up world to its own api data service 2019-03-10 01:09:04 -06:00
KimLS ee1fcdf5fa Stats, stats everywhere (I added a #netstats command) 2019-03-09 22:25:04 -08:00
Akkadius 6cb9271e7e Add call get_corpse_list_detail 2019-03-10 00:13:02 -06:00
Akkadius d487bba6b2 Add call get_client_list_detail 2019-03-10 00:04:13 -06:00
Akkadius 0a445c4a96 Add call get_object_list_detail 2019-03-09 23:56:56 -06:00
Akkadius 81c6e7d573 Add get_door_list_detail 2019-03-09 23:54:32 -06:00
Akkadius 63d0f5ea1d Update CMakeLists.txt 2019-03-09 23:10:11 -06:00
Akkadius da739b8520 Initial work 2019-03-09 23:08:38 -06:00
KimLS 5c32afc77d Submodules 2019-03-09 16:11:31 -08:00
kentai 413c006785 Merge branch 'master' of https://github.com/EQEmu/Server 2019-03-08 18:04:54 +11:00
JJ fd990136f7 Fix note in SQL. [skip ci] 2019-03-07 17:46:34 -05:00
Chris Miles 3db3e53f11 Merge pull request #802 from noudess/master
New min/max personal faction per faction.  Use of actual client mods for race/class/deity
2019-03-06 13:17:34 -08:00
Noudess ca4e23695d I hate tabs vs spaces 2019-03-06 16:13:28 -05:00
Noudess 293a18301d More format 2019-03-06 16:10:23 -05:00
Noudess 3eb80e3111 Fixed a line of mixed spaces and tabsy 2019-03-06 15:59:51 -05:00
Noudess 4a0126eec3 Fix some formatting issues. 2019-03-06 15:54:22 -05:00
Akkadius 98e6fcf21c Add individual export options to export_client_files 2019-03-05 02:34:10 -06:00
Noudess ce2e74c9a6 Moved item conversion to optional dir. PEQDB has client values already in items 2019-03-04 14:41:17 -05:00
Noudess 2eb884e9b0 Added code to convert item factions as well 2019-03-04 11:30:55 -05:00
Noudess 84f288d572 Added faction info to changelog.txt 2019-03-01 10:26:00 -05:00
Noudess 88b3d11167 Added code to adjust custom faction bases down due to change in dubious range. 2019-03-01 10:12:21 -05:00
Noudess 96089e1718 Merge branch 'master' of github.com:noudess/Server 2019-02-28 16:11:21 -05:00
Noudess f89a0297b4 Fix so quests are backed up and fixed after faction update (version was wrong) 2019-02-28 16:07:52 -05:00
Paul Coene 6dbd579f4f Merge branch 'master' into master 2019-02-28 15:05:18 -05:00
Noudess aa9611d494 Code added to auto fix quests. Updated manifest and version to current. 2019-02-28 15:01:39 -05:00
Noudess 380e5d5084 Added code for conversion of quests for factions (based on Akkas start)
Made sure a temporary table needed for quest conversion was not removed prior.
2019-02-28 12:00:41 -05:00
Akkadius 726a996a25 Update process timer to be less aggressive 2019-02-27 14:10:22 -06:00
kentai ae3052fbd1 Merge branch 'master' of https://github.com/EQEmu/Server 2019-02-27 10:21:25 +11:00
KimLS cb9f0fbe31 Start of a network options interface command 2019-02-24 19:24:10 -08:00
KimLS b156b078ed Revert internal send to old code 2019-02-24 15:20:01 -08:00
adam 7a28a6e9a7 fix for mob movement getting 'stuck' when paths don't have updated locations. 2019-02-22 19:17:09 -05:00
Akkadius 37915f5b7e Adjust default rule values 2019-02-17 03:29:23 -06:00
Akkadius 3a8f206841 Merge branch 'master' into resend 2019-02-17 03:25:55 -06:00
Uleat 2af4d3d67d Reworked command and quest api 'traindisc' methods 2019-02-13 07:55:04 -05:00
Uleat 43a488d5b5 Added type conversion to questmgr 'scribespells' 2019-02-11 21:46:20 -05:00
Uleat 0b4dcb4271 Reworked command and quest api 'scribespells' methods 2019-02-11 20:03:02 -05:00
Noudess abf39c4ff7 Added base values for factions that the client does not provide a base, nor mods for, yet we did. 2019-02-11 11:59:55 -05:00
Uleat 3bdd6c20a5 Bot definition clean-up 2019-02-09 06:38:26 -05:00
Uleat bef849b5c1 Definition clean-up 2019-02-09 05:58:49 -05:00
Uleat 146e28f708 Updater criteria fix [ci skip] 2019-02-07 22:13:58 -05:00
Uleat f84fed7335 Merge branch 'master' of https://github.com/EQEmu/Server 2019-02-07 22:09:41 -05:00
Uleat 3cffe5f7ef Put merc and bot classes on the same stance standard (mercs) 2019-02-07 22:09:31 -05:00
Noudess ad97968d5e Fixes for bug wherein illusions other than PC races could be exploited.
Fixed for areas that neglected to take into account alliance and item faction
bonuses.
2019-02-07 14:48:31 -05:00
Michael Cook (mackal) c8b7b3e74f Merge pull request #824 from briankinney/correctly-reference-defender-mitigation
Reference the defender melee mitigation, not attacker
2019-02-06 23:58:27 -05:00
Brian Kinney 1d0b00caf7 Raw numbers are negative so adding is correct 2019-02-06 23:54:38 -05:00
Brian Kinney 93394e0edc Reference the defender melee mitigation, not attacker 2019-02-06 21:52:59 -05:00
Uleat b810e3aa71 Fix for profanity command script file name in manifest [ci skip] 2019-02-04 21:39:16 -05:00
Uleat ee970acc2e Fix for bots ceasing combat when their 'follow me' mob dies 2019-02-04 14:56:00 -05:00
Uleat 594ec4faee Fix for possible server crash when applying poison 2019-02-04 14:00:08 -05:00
Uleat cd95f58625 Fix for linux build 2019-02-04 12:03:25 -05:00
Uleat 93a0ad2ceb Added command 'profanity' 2019-02-04 07:02:27 -05:00
Uleat 36b0a60451 Fix for Titanium returning wrong value in ConvertClientVersionToExpansion## 2019-02-02 21:51:57 -05:00
Adam Martin f6c8d9532e Applied changes proposed in https://github.com/decimad/luabind-deboostified/pull/38/
These changes claim to fix GCC 7 compilation.
2019-02-02 00:32:41 -06:00
Adam Martin 5f23a72a16 Removed unused boost header, fixed compiling with new luabind
Fixed TryFinishingBlow attempting to return by parameter reference.
The new luabind fails with a by_reference to by_value check. Using
a pointer accomplishes the same goal, but bypasses this issue.
2019-02-02 00:08:46 -06:00
Adam Martin 26eb4fb6e0 Swapped luabind for non-boost fork
https://github.com/decimad/luabind-deboostified
2019-02-02 00:06:32 -06:00
Uleat cbe811cf94 Oops!! I did it again! 2019-01-31 21:59:11 -05:00
Uleat 1526a167bb Update '/who' handler to behave like '/who all' in regards to gm flags 2019-01-30 19:11:20 -05:00
Uleat bc79e28d49 Fix for bots disappearing while idle (update) 2019-01-29 20:25:35 -05:00
KentaiVZ 8be23a1214 Merge pull request #4 from EQEmu/master
update local
2019-01-28 14:45:02 +11:00
Uleat 444acb7c70 Fix for bot npctype memory leak (thanks mackal!) 2019-01-27 21:49:21 -05:00
Uleat c8645475b9 Fix for client not scribing spells (thanks Secrets!) 2019-01-27 20:19:51 -05:00
Uleat 036e4739ae Fix for bots disappearing while idle 2019-01-27 09:14:47 -05:00
Uleat 5b371ad054 Fix for bot out-of-combat movement animation glitches 2019-01-27 08:09:54 -05:00
Uleat 3c0bd2bf5d Synchronized bot code to new movement system 2019-01-27 08:08:01 -05:00
Uleat 16036ab492 Fix for class Bot not honoring NPCType data reference 2019-01-26 22:30:49 -05:00
Uleat 2f3cd45c4a Removed server-side checksum of player profile 2019-01-24 04:26:14 -05:00
Uleat 4658ad676f Extended server spellbook entries to RoF2 standard and added per-client restriction of spell id max 2019-01-24 03:53:41 -05:00
Akkadius 230d6ae964 Merge branch 'master' into resend 2019-01-23 19:05:42 -06:00
Noudess 46ead8e29e Move out faction changes to later db version as it is still pending. 2019-01-23 14:54:16 -05:00
Akkadius 2d5f0dce42 Update eqemu_server.pl [skip ci] 2019-01-22 03:18:47 -06:00
Akkadius b0c4d626f2 Update db_update_manifest.txt [skip ci] 2019-01-22 03:16:02 -06:00
Akkadius 5aa64f362d Update eqemu_server.pl [skip ci] 2019-01-22 03:11:00 -06:00
Akkadius 16270d7f93 Update eqemu_server.pl [skip ci] 2019-01-22 03:02:20 -06:00
Akkadius 6d5c99d892 Update eqemu_server.pl [skip ci] 2019-01-22 02:57:40 -06:00
Akkadius b82e870e22 Update eqemu_server.pl [skip ci] 2019-01-22 02:50:30 -06:00
Akkadius f6ea89f100 Update eqemu_server.pl [skip ci] 2019-01-22 02:49:51 -06:00
Akkadius a6638104ac Update eqemu_server.pl [skip ci] 2019-01-22 02:38:01 -06:00
Akkadius ce610db166 Update eqemu_server.pl [skip ci] 2019-01-22 02:16:02 -06:00
Xackery Xtal 44f85f140c Added Spells:CharmDisablesSpecialAbilities 2019-01-21 20:29:12 -08:00
Chris Miles e6d40c5954 Merge pull request #813 from KinglyKrab/dynamic_rules
Adds dynamic rule capabilities to quests in LUA/Perl.
2019-01-21 16:21:19 -08:00
Chris Miles b61105f96d Merge pull request #807 from KinglyKrab/master
Added multi-version capabilities to NPCs.
2019-01-21 16:18:25 -08:00
Kinglykrab 32b161fd57 Adds dynamic rule capabilities to quests in LUA/Perl.
- quest::set_rule(string rule_name, string rule_value)
		Example: quest::set_rule("Zone:UseZoneController", "false") - Sets the rule "Zone:UseZoneController" to "false" for the current zone.
	- quest::get_rule(string rule_name)
		Example: quest::get_rule("Zone:UseZoneController") - Returns true/false depending upon if it's enabled/disabled.
	- Example NPC script here: https://pastebin.com/akKKN2NS
2019-01-21 19:10:48 -05:00
Akkadius f5b28a0b24 Filter invis NPC's in #killallnpcs 2019-01-21 02:30:05 -06:00
Akkadius e5fce0fd4d Remove debug std::cout [skip ci] 2019-01-21 01:44:35 -06:00
Akkadius fdae56e89f Update changelog.txt [skip ci] 2019-01-21 01:39:13 -06:00
Akkadius 90b9e51f70 Fix issue where NPC's clip into the world and the client interprets them at 0,0,0 2019-01-21 01:37:38 -06:00
Akkadius 7c15d332c5 Implemented: #gmzone [zone_short_name] [zone_version=0] [identifier=gmzone] - Zones to a private GM instance 2019-01-21 01:33:38 -06:00
Akkadius 48564a5789 Implemented server side #who 2019-01-21 00:29:58 -06:00
Uleat 7b2c87c7ed Added bi-state dynamic lookup return 2019-01-20 23:40:40 -05:00
Uleat 93cc07e097 Merge pull request #805 from prestanneth/master
SaveCharacterTribute misses tribute id 0
2019-01-20 23:34:12 -05:00
Akkadius 40b2366346 Implement and extended #goto via #goto <player_name> - this will work cross zone, cross instance, in zone etc. It works on top of the original #goto (target) and #goto x y z 2019-01-20 21:33:56 -06:00
Uleat f690c64f9e Moved buff definitions into 'spells' lookup 2019-01-20 20:04:07 -05:00
Uleat 585c6322bf Added 'spells' entry to EQDictionary 2019-01-20 08:24:21 -05:00
Michael Cook (mackal) 14a4f58c0b Remove duplicate waypoint code from a merge 2019-01-16 13:18:33 -05:00
Uleat c9ef66ae2d Added note for inventory::InitializeDynamicLookups() [ci skip] 2019-01-15 20:11:29 -05:00
Uleat 703cbc6727 Activated per-expansion support for active inventory slot addressing 2019-01-15 00:50:58 -05:00
KimLS 182b7e9843 Small change to gmmove to always force an update 2019-01-12 20:19:21 -08:00
Uleat 26ed51f32a Fix for linux builds 2019-01-12 20:59:27 -05:00
Uleat bcf271c30f Added dynamic entries to eqdictionary 2019-01-12 20:03:52 -05:00
Uleat 7857bc45fb Excluded runtime modification of expansion-based rules 'World:ExpansionSettings' and 'World:UseClientBasedExpansionSettings' 2019-01-11 05:01:44 -05:00
Kinglykrab d8c88aac96 Added multi-version capabilities to NPCs.
Setting a spawn2 row's 'version' column to -1 will make that spawn appear in all versions of the zone.

This is similar to how doors/objects/groundspawns use version -1.
2019-01-10 19:55:59 -05:00
Michael Cook (mackal) dd0216589f Merge pull request #806 from KinglyKrab/master
Reimplemented pre-nerf Ranger stationary damage bonus.
2019-01-10 19:33:39 -05:00
Kinglykrab 93acbf5241 Reimplemented pre-nerf Ranger stationary damage bonus.
This will allow Developers to disable/enable the stationary requirement.
2019-01-10 19:09:27 -05:00
kentai c5a08f978f SaveCharacterTribute..
Skipping Tribute id 0 during save loop.
Aura of Clarity has an id of 0.
2019-01-10 14:50:02 +11:00
Barry c234adefcc Merge pull request #3 from EQEmu/master
updating before pull
2019-01-10 14:30:00 +11:00
Uleat 38bf73cc08 Added enum class Expansion 2019-01-09 20:14:49 -05:00
Chris Miles 34e7d96977 Merge pull request #804 from isenior/DataBucketFix
Properly escape key in SQL queries
2019-01-08 00:41:27 -06:00
= 31b33ba72c Properly escape key in SQL queries 2019-01-08 06:16:57 +00:00
KimLS e3d5200310 Redid background task interface, used it to async send client packets 2019-01-07 19:53:23 -08:00
Barry f617250281 Merge pull request #2 from EQEmu/master
merge_test_updates
2019-01-08 12:57:06 +11:00
Uleat 0ad43977bf Naming convention update for EQEmu::versions::ClientVersionBit 2019-01-07 20:25:43 -05:00
Uleat 8eaed2233f Added namespace expansions 2019-01-07 18:18:35 -05:00
Uleat 0d38808030 Updated EQDictionary entries to allow ease of reading and gui tooltip propagation (pt. 2) 2019-01-07 07:39:43 -05:00
Uleat 011d7a6a29 Updated EQDictionary entries to allow ease of reading and gui tooltip propagation 2019-01-07 00:11:07 -05:00
Akkadius 9c9d46e3ea Fix NpcScaleManager::ScaleNPC MinDMG overflow issue when NPC's load dynamic min with static maxd 2019-01-06 18:46:14 -06:00
Akkadius d127b1bef9 Client version check on show proximity 2019-01-06 18:41:05 -06:00
Akkadius 5a5d73ca25 [Scaling] Global base scaling data has been updated in new database binary revision 2019-01-06 15:45:13 -06:00
Noudess 5474661e11 Updated manifest to remove extra space, removed comments from sql dumpw 2019-01-05 13:00:33 -05:00
Noudess d7e98bba17 Remove comments. 2019-01-05 12:59:47 -05:00
Noudess ca6bcdb1f9 Updates to match up with db versions that have chwqanges since PR created. 2019-01-05 12:46:52 -05:00
Noudess bd47e2121f Reconstruct faction_list to get rid of obsolete fields. 2019-01-05 12:17:10 -05:00
Noudess 90b46c7bda Change backup table names per Akka
Add commented out secion illustrating what next manifgest might do for
cleanup.
2019-01-05 12:01:40 -05:00
Akkadius f3782af10e Update eqemu_server.pl [skip ci] 2019-01-04 19:38:33 -06:00
Akkadius bce3609617 Update system_tables.txt [skip ci] 2019-01-04 19:15:32 -06:00
Akkadius 030339aab8 Update system_tables.txt [skip ci] 2019-01-04 19:06:16 -06:00
Akkadius 57c3e9d146 Update system_tables [skip ci] 2019-01-04 19:03:02 -06:00
Akkadius 4471a0aab5 Update system_tables [skip ci] 2019-01-04 18:58:57 -06:00
Akkadius e5021241b2 Update user_tables.txt [skip ci] 2019-01-04 18:56:53 -06:00
Akkadius 2da6acee6c Update user_tables.txt [skip ci] 2019-01-04 18:45:11 -06:00
Akkadius b9abc09294 Update base scaling data [skip ci] 2019-01-04 18:14:11 -06:00
Noudess 4b21f901b9 Performance changes. Now tested on rolath, peq and EZ servers 2019-01-04 13:11:28 -05:00
KimLS 6c1e3ae3d6 Added some rules for network server startup, added a limit on number of resends per connection channel per cycle (default is 10) 2019-01-03 20:04:09 -08:00
Akkadius d073d682e7 Merge branch 'master' of https://github.com/EQEmu/Server 2019-01-03 20:49:03 -06:00
Akkadius d25dff7a72 Update eqemu_server.pl [skip ci] 2019-01-03 20:48:59 -06:00
KimLS 3cb548f72e Merge branch 'master' into resend 2019-01-03 18:33:55 -08:00
KimLS dd295866c5 Merge branch 'master' of github.com:EQEmu/Server 2019-01-03 18:33:31 -08:00
KimLS 85ebda1b5a GMMove minor logic change so clients who are not LD/Charmed will be affected 2019-01-03 18:33:22 -08:00
Akkadius 4a099ca0ef Update maintenance script with new appveyor windows CI build artifact [skip ci] 2019-01-03 19:45:16 -06:00
Noudess 37ed923302 Fixed code on insert to not worried about extra fields in target db 2019-01-03 16:42:58 -05:00
KimLS d20ea3852c Some changes to resend logic and default values 2019-01-02 20:57:40 -08:00
Uleat 55e856d5fe Update for a couple of things...
- secondary material slot on self spawn (inc. pet)
- instant update of prim/sec weapon ornamentations
2019-01-02 19:41:48 -05:00
Michael Cook (mackal) f39244acca Comment out some IsBardOnlyStackEffect stuff 2019-01-02 17:09:36 -05:00
Barry a0ae45e412 Merge pull request #1 from EQEmu/master
testsync
2019-01-02 21:00:50 +11:00
Akkadius b870873ffe Changelog [skip ci] 2019-01-02 02:57:47 -06:00
Akkadius 4ba5ef9170 Reload scaling data on repop 2019-01-02 02:36:12 -06:00
Akkadius df68ad6358 More texture / ornamentation work - export SetPrimaryWeaponOrnamentation and SetSecondaryWeaponOrnamentation to Perl / Lua 2019-01-01 04:22:31 -06:00
Akkadius 7a56ffc380 Comment change [skip ci] 2018-12-31 23:20:55 -06:00
Akkadius c1a02e8244 Add path finder wrapper around devtools proximity show 2018-12-31 23:20:04 -06:00
Akkadius 2c8ed1074a Fix bots build 2018-12-31 23:19:48 -06:00
Akkadius 11a43cd320 Texture work 2018-12-31 03:18:59 -06:00
Akkadius a24dfd35e8 Update changelog.txt 2018-12-30 14:50:16 -06:00
Akkadius 4e24184089 Merge branch 'master' into movement_manager 2018-12-30 14:49:59 -06:00
Akkadius 82d2843d92 Safely access IsProximitySet 2018-12-28 02:46:10 -06:00
Akkadius 9059efe98e Add proximity show to devtools 2018-12-28 02:39:08 -06:00
KimLS e96539e6a8 Some changes to navmesh path finding, disabled waypoint nav interface for now, might keep it disabled (i don't think anyones using it anyway) added a rule that might need some fine tuning for navmesh pathfinding 2018-12-24 14:48:11 -08:00
KimLS d3aa74ff54 Update glm 2018-12-21 00:39:28 -08:00
KimLS 18fa53e09b Fix for broken movespeed in merge 2018-12-21 00:23:04 -08:00
Uleat 8499c3e65d Fix for conditional zone crashes caused by post-bot owner death hate aggregation (irongut_av) 2018-12-19 07:11:59 -05:00
Uleat 487e994f89 Disabled zone map mmf option in cmake 2018-12-19 05:36:48 -05:00
Noudess f3608edd62 Merge branch 'master' of github.com:noudess/Server 2018-12-18 11:37:28 -05:00
Noudess b5cc006e46 Update version of db needed for code. 2018-12-18 11:35:15 -05:00
Paul Coene e71eefab50 Merge branch 'master' into master 2018-12-18 11:33:52 -05:00
Noudess 469224cfe7 Update manifest versions 2018-12-18 11:24:10 -05:00
Noudess 3b21d2eb26 Spacing where some spaces crept in. 2018-12-18 11:11:22 -05:00
Noudess 3487086d46 Update version of db needed for faction changes 2018-12-18 11:08:09 -05:00
Noudess 50997ad0ec New sql with new client data tables and a hand create mapping 2018-12-18 11:00:38 -05:00
Noudess 688e37f108 Changes to accomodate the new raw faction data. 2018-12-18 10:58:01 -05:00
Akkadius 07ab96b883 Post merge adjustments 2018-12-17 01:51:43 -06:00
Akkadius 0681e6dbb2 Merge branch 'master' into movement_manager 2018-12-17 01:39:37 -06:00
Chris Miles bbec352a80 Update system_tables.txt [skip ci] 2018-12-17 01:19:02 -06:00
Chris Miles 54f322d2aa Merge pull request #801 from EQEmu/feature/global-base-scaling
Feature/global base scaling
2018-12-16 23:16:25 -08:00
Akkadius 52df2fa8d3 Merge branch 'master' into feature/global-base-scaling 2018-12-17 00:35:30 -06:00
Akkadius 6b18c71c11 Changelog 2018-12-17 00:35:08 -06:00
Michael Cook (mackal) bbbee6e6b2 Fix some bard stacking issues (mainly AE DOT)
Please report if it breaks anything (shouldn't)
2018-12-17 00:51:18 -05:00
Akkadius e835514fca Merge branch 'master' into feature/global-base-scaling 2018-12-16 22:48:55 -06:00
Akkadius a9fc1d89c8 Update eqemu_logsys.cpp 2018-12-16 04:21:37 -06:00
Akkadius c32b31ffff Add npc_scale_global_base table and add devtools command and toggling functionality 2018-12-16 03:59:08 -06:00
Akkadius bc6109ec8f Some adjustments to scale manager 2018-12-16 02:30:53 -06:00
Chris Miles bfe85a2f1b Merge pull request #798 from prestanneth/master
Tidied Comments
2018-12-15 23:47:55 -08:00
Akkadius a7f2eebfdf Entity window adjustments 2018-12-16 01:46:55 -06:00
Chris Miles e4b9ba7ff9 Merge pull request #799 from KinglyKrab/master
Resolved a possible scaling issue with the way CharMaxLevel works wit…
2018-12-14 22:41:52 -08:00
Kinglykrab 3a757a7a85 Resolved a possible scaling issue with the way CharMaxLevel works with quest globals and data buckets. 2018-12-15 01:37:13 -05:00
Chris Miles 9c1e14a4ab Merge branch 'master' into feature/global-base-scaling 2018-12-14 02:40:33 -06:00
kentai e367fee4bc Tidied Comments 2018-12-14 16:24:15 +11:00
Kinglykrab 838ab5b77e Missed embparser_api.cpp and lua_general.cpp. Sorry. 2018-12-13 20:25:05 -05:00
Kinglykrab 8ae9c99f3d Added new data bucket and quest functionality.
Added multiple new instance related quest functions.
	1. quest::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id)
		- Allows you to pull the instance ID of a client by character ID.
	2. quest::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id)
		- Allows you to assign an instance to a client by character ID.
	3. quest::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id)
		- Allows you to remove a client from an instance by character ID.

Added spell buckets, similar to spell globals.
	- Uses a new spell_buckets table and the Spells:EnableSpellBuckets rule.

Added max level by data bucket.
	- Uses data bucket char_id-CharMaxLevel and Character:PerCharacterBucketMaxLevel rule.
2018-12-13 19:42:31 -05:00
Michael Cook (mackal) f4dee67d7c Merge pull request #797 from noudess/master
Fix typo in manifest.
2018-12-12 12:56:40 -05:00
Noudess cfbd8e727a Fix typo in manifest. 2018-12-12 09:15:54 -05:00
Michael Cook (mackal) ce5c09441f Merge pull request #795 from noudess/master
Fix the LoadGFG function to no longer have the unused parameter.
2018-12-11 17:20:48 -05:00
Noudess 58d0aef90d Fix the LoadGFG function to no longer have the unused parameter.
Fixed the command that was passing the wrong second parameter.
2018-12-07 12:17:27 -05:00
Michael Cook (mackal) a4a69be0f5 Merge pull request #794 from noudess/master
Small fix for an NPC on a faction but with no entries in npc_faction_entries
2018-12-06 19:44:17 -05:00
Noudess 9bf23a131b Small fix for an NPC on a faction but with no entries in npc_faction_entries. 2018-12-06 14:25:58 -05:00
KimLS dacbce1c5f Some changes to fixz while pathing 2018-11-29 23:11:39 -08:00
Uleat df2e68ad31 Added missing return value 2018-11-29 22:55:04 -05:00
JJ 86ade2261b Move name_filter table from user_tables.txt to system_tables.txt [skip ci] 2018-11-26 18:08:34 -05:00
KimLS 1654dd6baf Some debug logging for water maps 2018-11-25 21:11:42 -08:00
KimLS 0662e3c780 Merge fix with sql 2018-11-25 15:35:52 -08:00
KimLS db5c42735c Fix a situation where nav could end up not being reset 2018-11-25 15:33:04 -08:00
JJ e46b9043ee And the version. [skip ci] 2018-11-25 16:55:56 -05:00
JJ fc69824a3f Oops. https://github.com/EQEmu/Server/commit/be17d21149e840a3df7447d7d76a91e6247b9376 2018-11-25 16:53:00 -05:00
JJ be17d21149 Add primary key to name_filter table. [skip ci] 2018-11-25 16:46:42 -05:00
KimLS 78adc7590e Missing line from secret's patch, should address sometimes npcs stop moving. 2018-11-25 00:03:47 -08:00
KimLS a26cf5f1de Some changes to fix various issues 2018-11-24 15:46:50 -08:00
KimLS cfba613efd Remove floating logic, fix for some bestz logic 2018-11-21 22:10:51 -08:00
KimLS b55771ca7d Some fixes as well as floating behavior for boats 2018-11-21 16:34:52 -08:00
Chris Miles 50525429ff Merge pull request #787 from noudess/master
Fix Get Corpse to fetch the corpse indicated.
2018-11-21 09:04:50 -06:00
Chris Miles 9ab8a6d197 Merge pull request #791 from mthogan/master
Fix omission for Perl/Lua binds for get_data_expires()
2018-11-21 09:02:21 -06:00
Matt Hogan ecf3c47968 Fix omission for Perl/Lua binds for get_data_expires() 2018-11-21 09:38:34 -05:00
Michael Cook (mackal) c6bb4cd44a Update system_tables.txt [skip ci] 2018-11-19 20:40:52 -05:00
Akkadius f3067872c4 Appveyor take 2 2018-11-19 02:57:38 -06:00
Akkadius 020b144449 Try to make appveyor happy 2018-11-19 02:52:53 -06:00
Akkadius d215ccfa8c Few adjustments 2018-11-19 02:40:10 -06:00
KimLS b772518901 Selective commit of secrets somewhat broken pr 2018-11-18 20:29:21 -08:00
Uleat e43b8d8463 Limited Client::GetTraderItems() to 80-item return 2018-11-18 21:11:22 -05:00
Michael Cook (mackal) 0d0c22b5e5 Update corpse decay cap to 24 hours I guess
Some people were wanting higher, w/e
2018-11-18 16:06:31 -05:00
Michael Cook (mackal) aae316c171 Fix formating in ZoneDatabase::GetDecayTimes() 2018-11-18 16:03:38 -05:00
Michael Cook (mackal) 2c0714b5d8 Fix cap bug in ZoneDatabase::GetDecayTimes() 2018-11-18 16:02:59 -05:00
Michael Cook (mackal) 8302f7cc26 Add a level cap to gray con flee 2018-11-14 22:59:07 -05:00
Michael Cook (mackal) a1b384c254 Don't reset AA timers 2018-11-14 20:39:18 -05:00
Michael Cook (mackal) d4395a6f0a Client doesn't check AA casting standstate
Fixes an exploit and makes you stand if you're just sitting
2018-11-14 20:37:57 -05:00
Akkadius 1061788610 Even more mob_info work 2018-11-14 02:23:38 -06:00
Akkadius 4758c04e99 More mob_info work 2018-11-13 03:07:18 -06:00
KimLS e8dffa1087 Stuck behavior sql 2018-11-11 01:11:07 -08:00
KimLS ef32940be2 Merge fix 2018-11-11 01:05:44 -08:00
KimLS ab6cdd65a3 Various stuck behavior 2018-11-11 01:04:25 -08:00
KimLS 81b409a2e4 Working on stuck behavior handler, fix for world crash when you can't connect to a login server. 2018-11-09 18:30:05 -08:00
KimLS 8f0051db8d Changes to various path finding behavior 2018-11-09 00:54:51 -08:00
KimLS fd7b6deafa Merge branch 'movement_manager' of github.com:EQEmu/Server into movement_manager 2018-11-07 21:55:26 -08:00
KimLS c0ebe05d5d Prelim swimming support 2018-11-07 21:55:12 -08:00
Akkadius 17ca995aa9 Add single target and zonewide dynamic and static scaling methods / commands 2018-11-07 02:34:55 -06:00
Akkadius 10fd51a1f9 Add spellscale and healscale to scaling data 2018-11-07 00:36:18 -06:00
Akkadius 0752edcab0 Zero out default SpawnNPC stats 2018-11-07 00:11:58 -06:00
Akkadius 06e668108a Zero out stats on lua_create_npc to inherit default global base scaling 2018-11-07 00:11:27 -06:00
Akkadius e6dbc8291a Tweak log code to handle is_category_enabled array initialization dynamically 2018-11-07 00:11:06 -06:00
Akkadius ed2547b974 Merge branch 'master' into feature/global-base-scaling 2018-11-05 00:44:33 -06:00
Akkadius 4e0d85534e Fix issue where new log category settings were getting injected into the database with all settings turned on 2018-11-05 00:43:52 -06:00
Akkadius d75afd4688 Allow display window to be snoozed 2018-11-05 00:26:52 -06:00
Akkadius 775b5fcaf1 Mostly done with global base scaling work, dev tooling and various other works 2018-11-04 23:26:34 -06:00
Michael Cook (mackal) cc920e60d9 Reset all follow variables when follow target is gone 2018-11-03 18:14:54 -04:00
Michael Cook (mackal) 467e2d3114 Add follow getters to lua just in case 2018-11-03 18:10:36 -04:00
Michael Cook (mackal) dbb368865c Add some Follow stuff to lua
You can also disallow following code from allowing the NPC to run if
they're far enough away
2018-11-03 17:44:19 -04:00
Chris Miles 190ff0c66e Merge pull request #788 from SecretsOTheP/movement_manager
Remove errant Stun call, fix up logging notification for fear
2018-10-31 14:31:59 -05:00
E Spause 706ae291d8 Remove errant Stun call, fix up logging notification for fear 2018-10-31 11:08:50 -04:00
KimLS cd59916e67 Merge branch 'movement_manager' of github.com:EQEmu/Server into movement_manager 2018-10-28 13:39:43 -07:00
KimLS 8ebcd6b6c5 Some fixes to grid pathing at 0 wp pause plus command changes 2018-10-28 13:39:24 -07:00
Paul Coene 2a9f38de2a Fix Get Corpse to fetch the corpse indicated. 2018-10-28 12:44:13 -04:00
Chris Miles 305e569cff Merge pull request #784 from SecretsOTheP/movement_manager
Fear pathing fixups, random path rewrite, and nektulos / general roam…
2018-10-27 15:59:20 -05:00
Uleat 5e03d977d6 Merge branch 'master' of https://github.com/EQEmu/Server 2018-10-22 22:27:18 -04:00
Uleat 84643ce9a1 Inventory update work-around [ci skip] 2018-10-22 22:27:05 -04:00
Akkadius ab8075d629 Cleanup eqemu_logsys code and automatically inject new logging categories into the database if they do not exist 2018-10-20 22:29:59 -05:00
Chris Miles 8115db3576 Merge pull request #785 from noudess/master
Zone header was getting ignored by RoF2 client.
2018-10-20 22:02:29 -05:00
Paul Coene 0830ea8650 Zone header was getting ignored by RoF2 client. 2018-10-20 22:54:38 -04:00
Chris Miles 13f9c9fdb1 Merge pull request #782 from mthogan/master
Added get_data_expires function to both Perl and Lua to retrieve Data…
2018-10-20 21:10:30 -05:00
Akkadius 55197cf830 Add fix for data buckets deletion 2018-10-20 21:07:45 -05:00
E Spause fb645e276c Update zone/mob_ai.cpp 2018-10-20 18:43:53 -04:00
E Spause e466f9b3f9 Fear pathing fixups, random path rewrite, and nektulos / general roambox fixups where best Z axis is below the ground 2018-10-19 22:35:38 -04:00
Matt Hogan 88debae660 Added get_data_expires function to both Perl and Lua to retrieve DataBucket expire time 2018-10-19 19:37:25 -04:00
KimLS 29383882f8 Merge branch 'movement_manager' of github.com:EQEmu/Server into movement_manager 2018-10-19 13:05:53 -07:00
KimLS dc4f52deeb Remove comment 2018-10-19 13:05:40 -07:00
Alex b3fd1e6c9b Merge pull request #781 from SecretsOTheP/movement_manager
Add MoveTo functionality to allow NPC to clip through walls and preve…
2018-10-19 13:03:29 -07:00
E Spause 904bc3e004 Add MoveTo functionality to allow NPC to clip through walls and prevent getting stuck in the event that there are 2 or less nodes. Teleport logic fixes
Add MoveTo functionality to allow NPC to clip through walls and prevent getting stuck in the event that there are 2 or less nodes.

Changed Teleport logic; NPCs should no longer warp and instead clip thru walls / z axis on geometry when stuck or teleporting.

Added a sanity check for teleport nodes at 0,0,0 which have been observed on a few nav meshes. This is in case someone accidentally adds one.
2018-10-19 15:26:26 -04:00
KimLS 973abef1b0 Water work and work with grids (still not perfect but i think its the ai code) 2018-10-18 20:44:46 -07:00
KimLS f76fffe622 A bunch of send position changes, rename navigateto 2018-10-15 22:02:16 -07:00
KimLS cd6fd2d2dc Merge master to movement_manager, fix for merge failure 2018-10-14 17:23:11 -07:00
KimLS 1600f68239 Bots compile again 2018-10-14 17:17:32 -07:00
KimLS 94bce44295 Some checks to cut down on position sends by about 30%, still need to optimize movement sends 2018-10-14 00:02:16 -07:00
KimLS d0685556e8 Bunch of bug fixes, guard behavior works again 2018-10-13 23:53:16 -07:00
KimLS 18ec09a79e Velocity will now work in horizontal only instead of being both h + v (this was causing occasional skips in hilly areas) 2018-10-12 22:17:50 -07:00
KimLS 1785120796 Bunch of refactoring and walking, AI needs a ton of tweaking to use the new logic 2018-10-12 00:03:58 -07:00
Uleat 9f039b47e9 Merge branch 'master' of https://github.com/EQEmu/Server 2018-10-09 22:04:57 -04:00
Uleat 43aaaf7f26 Implemented bot owner options 2018-10-09 22:04:47 -04:00
Michael Cook (mackal) df899bb2df Tweak NPC AI Heal logic a bit
New rule: Spells:AI_HealHPPct defaults to 50
This is the default maximum HP and NPC will start a heal

The spell AI fields min_hp and max_hp are now used to override the HP
percentages they will heal at
2018-10-09 14:18:24 -04:00
Akkadius 72bf4b7e3c Send HP updates when mobs update regen hp internally 2018-10-09 08:38:35 -05:00
Uleat a836baac32 Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework 2018-10-07 20:42:29 -04:00
Uleat df885b9179 Fixed a few bot issues... 2018-10-07 20:41:26 -04:00
Uleat e1659d9236 Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework
# Conflicts:
#	changelog.txt
2018-10-06 23:26:21 -04:00
Uleat 94c17f941c Fixed a few bot issues... 2018-10-06 23:23:29 -04:00
Uleat b1b35a0a97 Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework 2018-10-05 19:14:39 -04:00
Michael Cook (mackal) d8c6c62809 Merge pull request #779 from noudess/master
Allow UseLevelAggro rule to be configurable.
2018-10-05 17:21:41 -04:00
Paul Coene e6d3210b1f Allow UseLevelAggro rule to be configurable. 2018-10-05 17:01:12 -04:00
Uleat 1ba6801bb2 Fix for UF and older clients' experiment combine failure 2018-10-05 07:54:42 -04:00
Uleat 6eddb2b5f4 Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework 2018-10-03 18:36:22 -04:00
Uleat 31b70ea74b Fix for world containers failing in experiment mode 2018-10-03 18:08:27 -04:00
Akkadius 9fcafbef62 Remove navmesh from roambox logic until stuck issues are sorted with movement overhaul 2018-10-01 21:15:30 -05:00
KimLS 29ea65a71e Redoing movement to introduce proper rotation 2018-09-24 22:41:53 -07:00
Uleat 7c5b1e8fd2 Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework 2018-09-23 01:02:54 -04:00
KimLS 1aa97957d8 Renamed function, need to fix bots, some combat bug fixes. 2018-09-21 23:54:07 -07:00
Uleat 384c376d31 Added scripting api 'use' notes 2018-09-21 01:27:30 -04:00
KimLS 4815cabb63 Some bug fixes 2018-09-20 22:08:35 -07:00
KimLS 7278c6294d Movement will now be handled by the movement manager instead of mob 2018-09-20 16:14:47 -07:00
Uleat 526d3bfba1 Update to perl api inventory slot tokens 2018-09-19 19:58:16 -04:00
KimLS f754cb1307 Move update path to movement manager so all movement will use paths 2018-09-18 23:06:56 -07:00
Chris Miles 1cc29d9a70 Merge pull request #773 from chazix/master
converting some remaining abs & fabs to use std::abs, fixing warnings
2018-09-18 02:44:56 -05:00
KimLS 2224b83ae0 Movement manager add 2018-09-17 14:32:36 -07:00
KimLS c677169edd Removed existing movement code, started replacing 2018-09-15 19:20:47 -07:00
hg a73bf221ed Make SPA 112 affect fizzle rate not effective caster level
Per dev quote, SPA 112 "Modifies casting skills of the affected
entity by BaseEffect for the purposes of determining whether or not a
fizzle occurs when casting spells."

Fixes issues caused by having a spell with this effect on caster such
as wrong target debuff durations and buff refreshes not taking hold.
2018-09-13 19:25:05 -04:00
Uleat 953bee6c21 Fix for crash when dropping items (c != python) 2018-09-11 20:05:43 -04:00
chase add25eb617 converting some remaining abs & fabs to use std::abs, fixing some warnings 2018-09-10 00:23:09 -07:00
Uleat 0e3df84ad9 Fix for inventory update dupe entry failure 2018-09-09 20:39:21 -04:00
Uleat 8d69ff5826 Fix 2 for linux compile failure 2018-09-09 18:52:30 -04:00
Uleat 7ca6f008d6 Fix for linux compile failure 2018-09-09 18:29:14 -04:00
Akkadius 55c0cc02a1 Update eqemu_server.pl [skip ci] 2018-09-09 02:27:04 -05:00
Chris Miles 92eb64b51c Update install.sh [skip ci] 2018-09-09 00:04:16 -05:00
Chris Miles 08bd335cdb Update install.sh [skip ci] 2018-09-09 00:03:07 -05:00
Michael Cook (mackal) 7836d020ce Add NPC Max Aggro Distance to zone table 2018-09-08 00:22:16 -04:00
Michael Cook (mackal) ec40b3dc69 Fix bots 2018-09-08 00:11:31 -04:00
Michael Cook (mackal) 00e44285a7 Fix column cases to make people happy
If you already sourced, too fucking bad.
2018-09-08 00:09:14 -04:00
Michael Cook (mackal) 4276bf3208 Too many commas 2018-09-07 23:55:51 -04:00
Michael Cook (mackal) 2d84029b37 Add FastRegen* to zone table 2018-09-07 23:54:40 -04:00
Akkadius 7c298a249f Pets now use navmesh 2018-09-04 20:27:43 -05:00
Uleat 5867a3147a Merge branch 'inv_possessions_rework' of https://github.com/EQEmu/Server into inv_possessions_rework 2018-09-03 20:58:47 -04:00
Uleat feb4cc37c6 Rework of 'invsnapshot' command and implementation of automatic inventory snapshots 2018-09-03 20:57:20 -04:00
Chris Miles 0a42b45c67 Merge pull request #772 from fryguy503/target-assist-exploit
/assist exploit fix
2018-09-03 17:00:00 -05:00
Trust 935dde797c Prevents players from /assist to see if a mob is up due to error or no error messages. 2018-09-03 09:34:14 -04:00
Akkadius 3eee699a89 Calculate roambox destination z once and let navmesh pathfinding calculate it the rest of the time 2018-09-03 04:07:13 -05:00
Akkadius 4a4668b36a Remove an unecessary costly z calc 2018-09-03 03:54:15 -05:00
Akkadius 395cf2e8ce Roambox logic now uses navmesh 2018-09-03 03:46:48 -05:00
Akkadius d1b5bbe1e4 Merge branch 'master' of https://github.com/EQEmu/Server 2018-09-03 03:06:26 -05:00
Akkadius 8a28e8500d Make fear and fleeing respect navmesh for both clients and NPCs 2018-09-03 03:06:23 -05:00
KimLS d2340d3f2e Fix for missing policy 2018-09-03 00:41:59 -07:00
Alex 71d6e97df2 Merge pull request #771 from EQEmu/revert-765-zlib_cmake
Revert "Adjusted zlib cmake to honor policy CMP0074 warning"
2018-09-03 00:40:27 -07:00
Alex 9b09891aa5 Revert "Adjusted zlib cmake to honor policy CMP0074 warning" 2018-09-03 00:30:50 -07:00
Chris Miles 8a580a7774 Merge pull request #765 from EQEmu/zlib_cmake
Adjusted zlib cmake to honor policy CMP0074 warning
2018-09-03 02:25:51 -05:00
Chris Miles 9998f07701 Merge pull request #745 from fryguy503/who-all-fix
/who all <zone> fix for zones like scarlet, netherbian, etc
2018-09-03 02:25:02 -05:00
Chris Miles 6c420651b9 Merge pull request #756 from fryguy503/drop-item-logging
[Queryserv] Dropped Item Logging
2018-09-03 02:24:31 -05:00
KimLS fc071d1d2f Set CMP0074 2018-09-03 00:20:43 -07:00
Chris Miles d7014dd320 Merge pull request #764 from fryguy503/editorconfig
editorconfig
2018-09-03 02:16:35 -05:00
Akkadius 6fc20939e8 Fix for edge case with roambox water logic 2018-09-03 02:11:39 -05:00
Akkadius b92e83a465 Fix client pathing Z while feared 2018-09-03 01:51:40 -05:00
Akkadius d4e0e8aea2 Revert LOS check code until further refinement 2018-08-28 00:55:06 -05:00
Akkadius 12f19fd824 Update system_tables.txt [skip ci] 2018-08-28 00:27:50 -05:00
Chris Miles 555c9004b9 Update eqemu_server.pl [skip ci] 2018-08-27 23:46:10 -05:00
Michael Cook (mackal) 766dcc464e Fix crash 2018-08-27 12:56:46 -04:00
Michael Cook (mackal) eb33279701 Reset various pet command states
This will prevent charm exploits
2018-08-26 22:19:56 -04:00
Michael Cook (mackal) 67e29a8aa7 Merge pull request #761 from fryguy503/lowlevel-mez-exploit
[Exploit] Prevent low level mez testing without aggro.
2018-08-25 20:27:19 -04:00
Michael Cook (mackal) e816196edb Merge pull request #762 from fryguy503/green-flee
Allow Separate CON_GRAY Flee rate.
2018-08-25 20:27:04 -04:00
Michael Cook (mackal) 16d719596b Merge pull request #769 from fryguy503/gate_logic_heal
Prevent Gate if near bind location (Rule) and Heal on Gate (Rule)
2018-08-25 20:26:11 -04:00
Trust 62f9816aa8 Returned Logic from PR #766 2018-08-25 19:46:37 -04:00
Trust 4c8018e4ca Prevent Gate if near bind location (Rule) and Heal on Gate (Rule)
RULE_INT(NPC, NPCGatePercent, 5) // % at which the NPC Will attempt to gate at.
RULE_BOOL(NPC, NPCGateNearBind, false) // Will NPC attempt to gate when near bind location?
RULE_INT(NPC, NPCGateDistanceBind, 75) // Distance from bind before NPC will attempt to gate
RULE_BOOL(NPC, NPCHealOnGate, true) // Will the NPC Heal on Gate.
RULE_REAL(NPC, NPCHealOnGateAmount, 25) // How much the npc will heal on gate if enabled.
2018-08-24 23:04:29 -04:00
Akkadius 86f1cedf91 Add LOS checks into roambox logic to prevent scaling mountains and going over buildings, cpu cycle saves and logging added. Things are looking really good now 2018-08-18 23:18:55 -05:00
Akkadius 3a7d18f32a Throttle Z calculations in roambox code, fix typo on fallback logic range 2018-08-18 22:48:12 -05:00
Akkadius 834062fbf9 Add another layer of randomization to roam box logic, npc's who weren't originally spawned in water won't roambox into water 2018-08-18 22:01:46 -05:00
Akkadius 4b6ab34fd9 Fix, cleanup and simplify the roambox logic and cleanup a bunch of other related code 2018-08-18 18:12:18 -05:00
Uleat 79229235bd Added 'LootRequestType::GMPeek' to Corpse::LootItem() fail criteria 2018-08-18 08:10:44 -04:00
Akkadius 40cb53f5a4 Syntax, naming and formatting tweaks 2018-08-17 23:54:24 -05:00
Michael Cook (mackal) 7cc5b143fc Make lua raid GetGroup functions signed
The server code is unsigned for bad reasons :P
2018-08-16 22:33:07 -04:00
Michael Cook (mackal) ace81215a1 Correct when tanks can be hit by AE Rampage
Tanks will only be hit by AE Rampage if they're the only one on the
NPC's hate list. Others on hate list out ranging AE Rampage will also
prevent the tank from being hit by AE Rampage.
2018-08-16 17:13:34 -04:00
Michael Cook (mackal) ffb9323a98 Revert "AE rampage shouldn't hit target"
This reverts commit 30148c3c56.

Was thinking of wrong thing ... logs say otherwise :P
2018-08-16 13:18:00 -04:00
Michael Cook (mackal) 30148c3c56 AE rampage shouldn't hit target 2018-08-16 13:01:19 -04:00
Michael Cook (mackal) 585ef81fde Fix lua raid GetGroup(client) and add lua raid GetGroupNumber(index)
This number will return group number and not let us iterate a bunch of
times to verify group numbers
2018-08-15 21:35:19 -04:00
Uleat 509a2b30a5 Inventory possessions beta testing 2018-08-13 22:32:36 -04:00
Michael Cook (mackal) 54abeba1ce Merge pull request #766 from noudess/master
Change spell logic to use min_hp from spell list.
2018-08-12 15:55:59 -04:00
Paul Coene e582a8d17a Change spell logic to use min_hp from spell list. 2018-08-12 15:35:38 -04:00
Akkadius 4b7126a2cd Bots fix 2018-08-11 00:41:51 -05:00
Akkadius 1e0ec048af HP update adjustment that should cover a scenario when mob is feared 2018-08-11 00:12:09 -05:00
Uleat ddd3e43d4e Added 'no valid genders' conditional to bot create validation [ci skip] 2018-08-10 22:02:19 -04:00
Uleat 053c35c59b Added optional rules for bot class/race/gender values
- run the optional script '2018_08_10_bots_allowed_criteria_rules.sql' if you want to change db values
2018-08-10 21:39:56 -04:00
Michael Cook (mackal) e3c01d4143 Add lua entity_list function GetShuffledClientList()
There is cases where we need to get a random client, but
GetRandomClient() is not sufficient enough due to complex predicates
required on what tells us is a valid client. This way we can just loop
over a shuffled list and verify a client is valid instead of multiple
GetRandomClient() calls.
2018-08-05 22:55:30 -04:00
Xackery bf5c5b803e Adjusted zlib cmake to honor policy CMP0074 warning 2018-08-05 17:12:46 -07:00
Trust 8b2ec7560a editorconfig 2018-08-04 15:26:21 -04:00
Michael Cook (mackal) 93749bc509 Add actual support for multi-zone task activities 2018-08-01 13:50:09 -04:00
Uleat 060f8aadfe Fix for NavMesh crash 2018-07-31 07:14:01 -04:00
Uleat 8089d52df6 Fix for 'is_arrow' bool parameter 2018-07-25 16:22:22 -04:00
Trust 1bba629514 Prevent Low Level Charm testing without Aggro 2018-07-22 18:35:50 -04:00
Trust 6b02d50a8c Allow Separate GrayCon Flee rate.
Added following Rules:

Combat:FleeGray - If true FleeGrayHPRatio will be used.
Combat:FleeGrayHPRatio - HP % when a Gray NPC begins to flee.
2018-07-22 18:22:07 -04:00
Michael Cook (mackal) 483a34242b Merge pull request #757 from fryguy503/purify-rez
Purfy Body Resurrection Effects fix
2018-07-22 16:53:43 -04:00
Trust 483b4724e5 [Exploit] Prevent low level mez testing without aggro.
Using low level mez to test if a mob is mezzable and NOT get aggro has been squashed. When you cast you will get 1 point of aggro on a Cannot mez with this spell.
2018-07-22 16:38:45 -04:00
Trust d4558b4664 Forgot to have the comparison flag 2018-07-22 16:32:53 -04:00
Trust d707fb13b8 Changed RezEffect check to dispell_flag 2018-07-22 16:31:24 -04:00
Michael Cook (mackal) f15ba46c24 Merge pull request #759 from fryguy503/see-invis-percent
SeeInvis %
2018-07-22 15:25:04 -04:00
Trust 79c7d9d8f2 SeeInvis % - Random
Added Function for GetSeeInvisible to pull the % chance from the database to spawn the npc as a SI mob.

If see_invis = 0/1 it will still function as normal, but if it is over 1, it will act as a % chance for the mob to SI.
2018-07-22 15:02:18 -04:00
Trust c2c8de01b8 Purfy Body Resurrection Effects fix
Purify Body was removing Resurrection Effects and it should not.
Added a !IsResurrectionEffects check to the logic to make sure Purify Body does not remove Resurrection Effects.
2018-07-22 14:41:35 -04:00
Michael Cook (mackal) 58883c2ed4 Merge pull request #755 from regneq/master
Quest NPCs will no longer turn and face their target if they are snea…  …king, sitting, or laying/playdead.
2018-07-22 12:56:59 -04:00
Trust f8f1061ced [Queryserv] Dropped Item Logging 2018-07-22 12:39:34 -04:00
regneq f9ea18b642 Quest NPCs will no longer turn and face their target if they are sneaking, sitting, or laying/playdead. 2018-07-22 09:31:58 -07:00
regneq 082641b1ad Merge pull request #13 from EQEmu/master
update
2018-07-22 09:18:19 -07:00
Michael Cook (mackal) 87ea81cc36 Merge pull request #754 from fryguy503/disarm-implement
Disarm Support
2018-07-21 23:43:25 -04:00
Trust 2fe923457b Fixed more Message_StringID 2018-07-21 23:22:14 -04:00
Michael Cook (mackal) 7d0b281b7f Merge pull request #753 from fryguy503/graveyard-placement
Added random graveyard corpse placement within +/- 20 units on X/Y ax…
2018-07-21 23:04:02 -04:00
Trust 7a44521b03 rand is bad random.Real is good! 2018-07-21 23:02:07 -04:00
Trust 9fa377303e Corrected Disarm StringID's 2018-07-21 22:20:53 -04:00
Trust 9251e6efd2 Disarm Support 2018-07-21 19:16:19 -04:00
Michael Cook (mackal) 983b8f7237 Merge pull request #740 from noudess/master
Fix HT and LOH to retry after failure to cast
2018-07-21 17:19:57 -04:00
Michael Cook (mackal) ede21d9b10 Merge pull request #752 from fryguy503/grammar-split
Fixed Game breaking grammar issue with /split
2018-07-21 17:06:40 -04:00
Michael Cook (mackal) 02a3f971dd Merge pull request #751 from fryguy503/horse-feign-fix
[Exploit] Prevent players from summoning horses while feigned.
2018-07-21 17:06:29 -04:00
Michael Cook (mackal) 2013063928 Merge pull request #750 from fryguy503/master2
Fixing incorrect operator so Appveyor will pass.
2018-07-21 17:06:03 -04:00
Trust 508a731181 Added random graveyard corpse placement within +/- 20 units on X/Y axis to help spread corpses out. 2018-07-21 16:30:55 -04:00
Trust b5b266d265 Fixed Game breaking grammar issue with /split 2018-07-21 16:24:14 -04:00
Trust c375716c22 [Exploit] Prevent players from summoning horses while feigned. 2018-07-21 16:17:42 -04:00
Trust 2f40e5da98 Fixing incorrect operator so Appveyor will pass. 2018-07-21 16:10:55 -04:00
Michael Cook (mackal) 96d146f73c Merge pull request #746 from fryguy503/mount-dismount-water
Rule: DismountWater - Causes mounts to dismount when entering liquid …
2018-07-21 13:26:11 -04:00
Michael Cook (mackal) e06c128ced Merge pull request #749 from fryguy503/aa-lowlevel-exploit
[Exploit Fix] AA Below Level Fix - When you are below level 52 with A…
2018-07-21 13:25:52 -04:00
Trust f51396aa70 [Exploit Fix] AA Below Level Fix - When you are below level 52 with AA set above 0% it will revert the aa % to 0% 2018-07-21 00:01:36 -04:00
Trust f776b1c73b Rule: DismountWater - Causes mounts to dismount when entering liquid per era. 2018-07-20 23:22:18 -04:00
Trust 8498d7b5d2 /who all <zone> fix for zones like scarlet, netherbian, etc 2018-07-20 23:07:59 -04:00
Uleat f7107fda83 Fix for opcode_handlers.py crash [ci skip] 2018-07-20 21:40:01 -04:00
Uleat 69b96b718e Update to opcode_handlers.py [ci skip] 2018-07-20 21:13:29 -04:00
Michael Cook (mackal) dfa7e2bffb Add completion emote for tasks 2018-07-20 14:06:07 -04:00
Uleat 22f586f110 Update to opcode_handlers.py [ci skip] 2018-07-18 21:06:21 -04:00
Michael Cook (mackal) 0cd4c0ac65 Update system_tables.txt 2018-07-17 14:52:32 -04:00
Uleat e12e1c0d9b Fix (temp) for bot-related appearance packets with id '0' 2018-07-16 02:46:00 -04:00
Uleat 59ad6012b1 Fix for trading with bots using trade window 2018-07-15 18:22:25 -04:00
Michael Cook (mackal) 71e309022a Fun fact, seconds are not milliseconds! 2018-07-15 00:34:44 -04:00
Michael Cook (mackal) 6aba38f664 Bug fix with rest timer changes 2018-07-15 00:27:51 -04:00
Michael Cook (mackal) 6ac4154acd Don't call UpdateRestTimer when you're casting on yourself 2018-07-14 19:19:58 -04:00
Michael Cook (mackal) 6ab2871fd1 Beneficial spells will now correctly inherit targets RestTimer
Example PC A is fighting mob B. PC C casts a heal on PC A. PC C will
inherit the timer from PC A. This is done because beneficial spells have
a "witness" check from NPCs so there is a chance PC C would not gain
aggro and could just keep on going with no RestTimer which allows them
to fast regen while actively participating.
2018-07-14 18:52:20 -04:00
Uleat 18005ac7a9 Fix for random SoF client crashes (possibly Titanium too) 2018-07-14 18:41:47 -04:00
Michael Cook (mackal) 37ff8c830d Fix /camp rest timer exploit 2018-07-14 17:41:42 -04:00
Chris Miles d0956194af Update system_tables.txt [skip ci] 2018-07-11 00:02:48 -05:00
Chris Miles ac4117d815 Update character_table_list.txt 2018-07-10 23:57:11 -05:00
Michael Cook (mackal) 1d0b11acde Fix get_instance_timer_by_id too 2018-07-10 13:02:53 -04:00
Michael Cook (mackal) ade56231fc Merge pull request #741 from AthrogatePEQ/master
Exposing get_instance_timer to lua
2018-07-10 13:01:55 -04:00
Athrogate b8eff702df Exposing get_instance_timer to lua 2018-07-10 09:46:54 -04:00
Akkadius cc4924ebfc Remove log messages [skip ci] 2018-07-10 02:35:51 -05:00
Akkadius e4d8915c9d Make it so DataBuckets set_data can take time formats such as 1s, 1m, 1d, 1y 2018-07-10 02:24:55 -05:00
Akkadius 623b7b3eee Rename activities to task_activities for consistency since we're changing up task data 2018-07-10 00:26:53 -05:00
Michael Cook (mackal) c08993b60b Bit of Task Revamp (shared still unimplemented)
Lots of change, packets should be better defined.
Task type tasks are now supported
2018-07-09 16:36:18 -04:00
Michael Cook (mackal) 07f3ab955f Fix issue with Quest types 2018-07-09 14:01:52 -04:00
Michael Cook (mackal) 46bdbfc454 Merge branch 'master' into tasks 2018-07-09 13:17:17 -04:00
Akkadius dc87b8e78b Depop and cleanup existing node npc's when command executed again. Also remove string from "name" and leave metadata in "lastname" otherwise it is visually too busy 2018-07-09 01:39:14 -05:00
Akkadius 0d094754db Add #grid show comand to display a targeted NPCs grid points visually 2018-07-09 01:15:57 -05:00
Michael Cook (mackal) c0c34cf07a Update ClientTaskState::ShowClientTasks 2018-07-08 23:32:30 -04:00
Michael Cook (mackal) 4c6de9b991 Steal buffer from SerializeBuffer now 2018-07-08 23:03:53 -04:00
Michael Cook (mackal) 2d456ba8c9 Add task faction reward
This just reuses NPC faction ID stuff since it does everything we want
and isn't actually tied to NPCs :P
2018-07-08 21:40:04 -04:00
Michael Cook (mackal) 3969ac346d Remove startzone from tasks table since it's not needed 2018-07-08 18:42:26 -04:00
Michael Cook (mackal) 2418c3dd74 Remove old Text* stuff 2018-07-08 18:33:34 -04:00
Michael Cook (mackal) 7218128d03 Update TaskManager::SaveClientState 2018-07-08 18:07:08 -04:00
Michael Cook (mackal) 62b78fb9a8 Update TaskManager::LoadClientState 2018-07-08 18:01:14 -04:00
Michael Cook (mackal) 7e0c4eb93f Reformat save/load since they were lacking tabs 2018-07-08 17:35:37 -04:00
Michael Cook (mackal) 9b229779db Bunch more functions 2018-07-08 16:55:08 -04:00
Michael Cook (mackal) b59a41829b Fix more functions 2018-07-08 16:36:00 -04:00
Michael Cook (mackal) 160b56b4b7 Merge branch 'master' into tasks 2018-07-08 01:47:11 -04:00
KimLS b6388595f3 Merge branch 'master' of github.com:EQEmu/Server 2018-07-07 22:39:19 -07:00
KimLS 5060de9b58 Keep alive implemented for world->zone 2018-07-07 22:19:24 -07:00
Akkadius 41ab512349 Implemented qglobals replacement and/or alternative called "Data Buckets" see changelog for more details 2018-07-07 23:59:23 -05:00
Michael Cook (mackal) 0c899b2caa Update more functions 2018-07-08 00:29:46 -04:00
Michael Cook (mackal) 51baccc10f Merge branch 'master' into tasks 2018-07-06 00:59:45 -04:00
Michael Cook (mackal) 955b2afb18 Update GetTaskActivityDoneCountFromTaskID and GetTaskStartTime 2018-07-06 00:59:19 -04:00
Uleat 69f621f361 Fix for ISO C++ warning in command_peekinv 2018-07-05 22:40:15 -04:00
Uleat c435a77813 Reintegration of inventory-based EQDictionary references 2018-07-05 21:05:26 -04:00
Paul Coene 5c4ed0becf Fix HT and LOH to retry after failure to cast 2018-07-05 19:46:56 -04:00
Michael Cook (mackal) 0600b6834a Update IsTaskActivityCompleted, GetTaskActivityDoneCount, GetTaskActivityState 2018-07-05 14:58:01 -04:00
Michael Cook (mackal) cf30056cf6 Update FailTask, TaskOutOfTime, and TaskPeriodicChecks 2018-07-05 00:45:51 -04:00
Michael Cook (mackal) 0367bc3465 Task update events should be task type aware now 2018-07-05 00:13:19 -04:00
Michael Cook (mackal) 2f4fb46007 Optional is a DWORD in older packets 2018-07-04 14:36:18 -04:00
Michael Cook (mackal) 26f1d450fc OP_TaskActivity for older clients 2018-07-04 13:30:24 -04:00
Michael Cook (mackal) a7c1fad213 Fix up OP_OpenNewTasksWindow for older clients 2018-07-04 01:57:54 -04:00
Michael Cook (mackal) 6d60f619c0 Merge branch 'master' into tasks 2018-07-03 01:20:51 -04:00
Michael Cook (mackal) 60ac0f7888 Add WriteLengthString(const std::string &str) 2018-07-03 01:15:40 -04:00
KimLS d2683022e1 Merge branch 'master' of github.com:EQEmu/Server 2018-07-02 22:10:13 -07:00
KimLS 887b71eebb Change license to GPL3 instead of LGPL3 I'm not sure why this happened it should of always been GPL3 as per the attributions in the source 2018-07-02 22:09:37 -07:00
KimLS 2533de1d62 Appveyor scripts that are in use, and added back in the old dependency stuff for windows 2018-07-02 22:08:04 -07:00
Michael Cook (mackal) d2679f065a Merge branch 'master' into tasks 2018-07-02 22:02:07 -04:00
Michael Cook (mackal) 0ea82b5d88 Bunch more work on fixing up DB and packets 2018-07-02 22:01:17 -04:00
Akkadius 2d7267cb4e Add file export to lua-api.md 2018-07-02 01:15:00 -05:00
Akkadius 3443d8eb25 Upload lua-doc-parser.pl 2018-07-02 01:03:02 -05:00
Akkadius 1c5f0fba4f embparser_api.cpp formatting 2018-07-01 21:48:18 -05:00
Akkadius 5b6f9d3bfb Add --quest to perl-doc-parser.pl and update usage doc in embparser_api.cpp for quest:: 2018-07-01 21:47:34 -05:00
Akkadius 595138679d add --questitem to perl-doc-parser.pl - format and add usage doc to perl_questitem.cpp 2018-07-01 20:52:56 -05:00
Akkadius 9e03d76211 perl-doc-parser.pl fix --all option 2018-07-01 20:45:24 -05:00
Akkadius 94aa271a84 perl_raids.cpp formatting 2018-07-01 20:39:21 -05:00
Akkadius 57c1cd0be4 Add --raid to perl-doc-parser.pl and update usage docs for perl_raids.cpp 2018-07-01 20:39:07 -05:00
Akkadius d331114f71 Format perl_object.cpp 2018-07-01 20:29:44 -05:00
Akkadius 5b05987e27 perl_object.cpp formatting 2018-07-01 20:29:09 -05:00
Akkadius ed37715993 Add --objet to perl-doc-parser.pl and update usage doc for perl_object.cpp 2018-07-01 20:29:00 -05:00
Akkadius d079feeb66 perl_npc.cpp formatting 2018-07-01 20:20:40 -05:00
Akkadius 880285afa6 Add --npc to perl-doc-parser.pl and update usage docs in perl_npc.cpp 2018-07-01 20:20:09 -05:00
Akkadius 6faaff31be Add --hateentry to perl-doc-parser.pl - format perl_hateentry.cpp 2018-07-01 20:04:53 -05:00
Akkadius 465071c2cf More perl_groups.cpp formatting 2018-07-01 20:02:53 -05:00
Akkadius cf6a9d6b2a perl_groups.cpp formatting 2018-07-01 20:01:03 -05:00
Akkadius 782c5ebc75 Add group to perl-doc-parser.pl - update usage docs for perl_groups.cpp 2018-07-01 20:00:52 -05:00
Akkadius ef39395580 Add Doors to perl-doc-parser.pl 2018-07-01 19:56:11 -05:00
Akkadius 86c9b6b079 perl_doors.cpp formatting 2018-07-01 19:56:02 -05:00
Akkadius 4a036116dd Update perl_doors.cpp usage doc 2018-07-01 19:55:50 -05:00
Akkadius 2bab945c34 perl_entity.cpp formatting 2018-07-01 19:50:56 -05:00
Akkadius 26ed80bdda Add --entity to perl-doc-parser.pl 2018-07-01 19:49:52 -05:00
Akkadius a6c1314e3e perl_entity.cpp formatting 2018-07-01 19:49:31 -05:00
Akkadius 979e54daa7 Update usage croak docs perl_entity.cpp 2018-07-01 19:49:21 -05:00
Akkadius b87e355db3 Add corpse to perl-doc-parser.pl 2018-07-01 19:36:57 -05:00
Akkadius 88ed2e64bb perl_player_corpse.cpp formatting 2018-07-01 19:36:47 -05:00
Akkadius 2010d1ba83 Update usage docs for perl_player_corpse 2018-07-01 19:36:35 -05:00
Akkadius 332a3d6c6a Add "mob" to perl-doc-parser.pl 2018-07-01 19:30:52 -05:00
Akkadius 214503617e perl_mob.cpp formatting 2018-07-01 19:28:01 -05:00
Akkadius 1a1cce859a Update perl_mob.cpp croak usage blocks 2018-07-01 19:26:50 -05:00
Akkadius 0786b1158a Add initial perl-doc-parser.pl for Client 2018-07-01 18:16:23 -05:00
Akkadius 4d87216ec6 Format perl_client.cpp 2018-07-01 18:16:04 -05:00
Akkadius 7dbf24b95d Cleanup perl_client.cpp Usage types 2018-07-01 18:14:31 -05:00
KimLS e7cf687d2b Don't set c++ vers 2018-06-29 22:12:11 -07:00
Michael Cook (mackal) 1b8736188d Merge branch 'master' into tasks 2018-06-29 00:13:31 -04:00
KimLS 5544fd0ae5 Merge branch 'master' of github.com:EQEmu/Server 2018-06-28 21:03:48 -07:00
KimLS 842a40f76d lower cmake version 2018-06-28 21:03:32 -07:00
Michael Cook (mackal) df43d33def Merge branch 'master' into tasks 2018-06-28 22:17:16 -04:00
Michael Cook (mackal) 70f55179b6 Switch netcode to steady_clock 2018-06-28 22:16:25 -04:00
Alex a2e12667b4 Update README.md 2018-06-28 13:25:50 -07:00
KimLS 213a496efb Add cmake prefix path [skip-ci] 2018-06-28 13:21:46 -07:00
KimLS b0336302ee Merge branch 'build_improvements' 2018-06-28 13:17:48 -07:00
KimLS 58725b061e Add appveyor yml [skip-ci] 2018-06-28 13:17:11 -07:00
KimLS 90c18c1dc9 Change travis 2018-06-27 23:05:12 -07:00
KimLS 97ee8e59a1 Travis test 2018-06-27 22:50:08 -07:00
KimLS 50eededd9f Some build fixes and changes 2018-06-27 19:54:33 -07:00
Michael Cook (mackal) 80b4248315 Merge branch 'master' into tasks 2018-06-27 21:23:00 -04:00
Michael Cook (mackal) ee95a2a0c8 Remove uneeded DumpPacket in Handle_OP_ItemLinkClick 2018-06-27 21:22:39 -04:00
KimLS 254764c1e6 Fix for failed build due to lb changes 2018-06-26 23:00:20 -07:00
KimLS 352e70cf28 Fix for duplicate luabind 2018-06-26 22:50:44 -07:00
Michael Cook (mackal) 3d3eee9772 Merge branch 'master' into tasks 2018-06-24 23:22:02 -04:00
Michael Cook (mackal) 3498f7a56f Bunch of work 2018-06-24 23:21:35 -04:00
Michael Cook (mackal) 0558b1bc48 Merge pull request #739 from noudess/master
Changes to make Harmony work.
2018-06-24 14:38:33 -04:00
Paul Coene 2b38dbf1fb Changes to make Harmony work. 2018-06-24 12:13:09 -04:00
Michael Cook (mackal) 39d06a4012 Merge branch 'master' into tasks 2018-06-20 14:19:48 -04:00
Michael Cook (mackal) bce92c5e02 Add support for innate self targeted spells
Currently this just includes checking SpellType_InCombatBuffs
2018-06-20 14:18:39 -04:00
Michael Cook (mackal) 7d18b90788 Fix MAX_ACTIVE_TASK messages 2018-06-17 00:17:59 -04:00
Michael Cook (mackal) 58ad1641e6 Fix string IDs to be embedded in says 2018-06-17 00:05:53 -04:00
Michael Cook (mackal) 18c73526aa Gotta initialize stuff ... 2018-06-16 23:52:25 -04:00
Michael Cook (mackal) 4c826dfbcc Change task selector quest function to not directly call the Send
function
2018-06-16 23:06:46 -04:00
Michael Cook (mackal) 6708cd3d75 More work on tasks 2018-06-16 22:42:26 -04:00
Michael Cook (mackal) 9bd5f36129 Rename ClientTaskState::ActiveTasks to ClientTaskState::ActiveQuests
because that's what it is
2018-06-13 18:06:08 -04:00
Michael Cook (mackal) 247d478990 Rename MAXACTIVETASKS to MAXACTIVEQUESTS 2018-06-13 17:51:35 -04:00
Michael Cook (mackal) c35e010461 Tweak SQL 2018-06-13 17:23:07 -04:00
Michael Cook (mackal) 0765d273ea More changes to task system 2018-06-13 17:08:21 -04:00
Michael Cook (mackal) 4662f29f11 Change TaskInformation strings to std::string 2018-06-12 13:56:17 -04:00
Michael Cook (mackal) 9e64132261 Change the ActivityInformation::Text*s to std::string 2018-06-12 00:32:13 -04:00
Michael Cook (mackal) 6b64a8183d Fix issues with TaskGoalListManager::LoadLists 2018-06-11 23:54:42 -04:00
Michael Cook (mackal) c3e007597e Remove TaskGoalList_Struct::Size since it's not needed 2018-06-11 22:49:20 -04:00
Michael Cook (mackal) 6399710c1d Update TaskGoalListManager::GetListByID to std algos 2018-06-11 22:25:44 -04:00
Michael Cook (mackal) e3dfb2f19d Switch TaskGoalList_Struct::GoalItemEntries to std::vector 2018-06-11 21:58:11 -04:00
Michael Cook (mackal) 4fec8a2b75 Switch TaskGoalListManager::TaskGoalLists to std::vector 2018-06-11 21:49:32 -04:00
Michael Cook (mackal) 653824ae9e More task comments .. 2018-06-07 18:14:09 -04:00
Michael Cook (mackal) b61f612fbe More comments 2018-06-05 22:39:48 -04:00
Michael Cook (mackal) 028dbc4bda Add ActivityCollect (unimplemented) and more comments 2018-06-05 22:16:53 -04:00
Michael Cook (mackal) 49b90eae76 More comments to task system 2018-06-05 13:12:29 -04:00
Michael Cook (mackal) 65acefc6b1 Comment task selection packet some 2018-06-04 23:54:57 -04:00
KimLS c985307057 Patch detour to avoid a crash if an invalid ref is returned 2018-05-31 19:24:26 -07:00
Uleat b475f66014 Fix for bot-enabled compile (cursory seems to be ok) 2018-05-30 22:05:27 -04:00
Akkadius eae7183de2 Word better 2018-05-28 03:33:44 -05:00
Akkadius 1d088a1ac1 Merge branch 'master' of https://github.com/EQEmu/Server 2018-05-28 01:47:06 -05:00
Akkadius 7d0b7560bc Fix for map download 2018-05-28 01:46:50 -05:00
Akkadius 7e86337b80 Update notes 2018-05-28 01:13:57 -05:00
Akkadius ac25d49a62 Patch notes - navmesh merge 2018-05-28 00:59:02 -05:00
Akkadius 8a911682bf Use GetRaceGenderDefaultHeight in GetDefaultRaceSize constant 2018-05-28 00:41:32 -05:00
Akkadius a87bf5681f Merge branch 'master' into wp_master 2018-05-28 00:33:05 -05:00
Akkadius b84b98dd7c Merge branch 'master' into wp_master 2018-05-28 00:32:39 -05:00
Michael Cook (mackal) c487acbf1a Off by 1 error in size check 2018-05-28 01:30:32 -04:00
Michael Cook (mackal) 72349ddbb6 Fix condition to set default heights
Was off by 1, if the height > 0 they don't get default height
2018-05-28 01:23:35 -04:00
Akkadius c8389103e3 Few tweaks to rules loading code - broadcast all zones that have loaded when #reloadallrules is used 2018-05-27 23:44:09 -05:00
Akkadius 7a7069959f Fix issue where size 0 NPC's would hop in and out of the ground because FixZ calculates the offset wrong by adding a default race size 2018-05-27 23:14:32 -05:00
Akkadius a20615ea11 Add an up to date easy to read race defines list 2018-05-27 23:13:43 -05:00
Akkadius 0e8672562a Fix issue where some perl calls were unintentionally renamed 2018-05-26 17:39:57 -05:00
Akkadius 05ae8c8219 Add rule Aggro:NPCAggroMaxDistanceEnabled - enabled by default
If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level
2018-05-25 22:41:46 -05:00
KimLS add0c4de47 Added ignore flag for navmesh 2018-05-24 22:25:00 -07:00
JJ 510d8083b3 Merge pull request #734 from noudess/master
Kerran illusion spell uses 562 not 23.
2018-05-22 17:33:39 +03:00
Chris Miles d0e960e64b Ubuntu Server 18 LTS compile fix 2018-05-21 19:30:51 -05:00
Paul Coene b8a844b9dc Kerran illusion spell uses 562 not 23. 2018-05-21 18:40:22 -04:00
KimLS f46e4f9aa4 Some tweaks so its harder to get npcs intentionally stuck 2018-05-20 17:24:00 -07:00
Michael Cook (mackal) a828443b46 Add OP_TaskRequestTimer to patch files
This is the lockout timer before you can request a task again

Currently unimplemented
2018-05-15 22:12:18 -04:00
regneq 707cb452d8 Merge pull request #12 from EQEmu/master
update eqemu source
2018-05-14 09:03:17 -07:00
Natedog2012 e28ddcff25 Fix size of AltCurrencySelectItem_Struct in RoF2 2018-05-14 01:11:37 -07:00
KimLS 80c7643396 Fix for spaces instead of tabs 2018-05-12 22:30:07 -07:00
KimLS 66aaa92bd1 Changes to stuck handling that should result in fewer actually stuck npcs 2018-05-12 22:16:50 -07:00
Akkadius eb463eef97 Tweaks to zone shutdown code 2018-05-12 03:31:47 -05:00
Akkadius d43273fd1b Fix some of the Fix Z logic - Boats no longer snap Z - Even though we checked for water, chances are boats pathing was above water and would snap Z to the floor of the water 2018-05-11 00:43:49 -05:00
Akkadius 2c91d1db6e Make sure NPC's don't open keyed or lockpick enabled doors - also make sure we are opening doors and not platforms above or below 2018-05-11 00:14:24 -05:00
Akkadius d504397593 Change map loading paths - maps/base/*.map - maps/water/*.wtr - maps/nav/*.nav 2018-05-10 04:19:43 -05:00
Akkadius 95043d637c Implement NPC's opening doors and clean up door code a bit 2018-05-10 03:54:49 -05:00
KimLS 51a006654a Merge branch 'master' into wp_master 2018-05-02 18:24:19 -07:00
KimLS dde3f603be Change distance to within 100.0 dist instead of within 1.0 dist for checking stuck code. The actual instances where you're within 100.0 with a partial path and legit not stuck is going to be uncommon enough to put up with the visual oddities 2018-05-02 18:23:28 -07:00
Michael Cook (mackal) 4fe6836cf0 Fix compiling with libc++ 2018-04-27 21:41:52 -04:00
Michael Cook (mackal) fdcd39398c Merge pull request #730 from regneq/master
Added pause, resume, and ispause to lua.
2018-04-27 20:05:58 -04:00
regneq f7fe10fc98 Implemented lua methods eq.pause_timer("timername") and eq.resume_tim…
…er("timername"). This allows developers to pause and resume the given timer on the current NPC.

Added lua method eq.is_paused_timer("timername") to check to see if y…

…ou have a paused timer or not. Example usage:

if(eq.is_paused_timer("test"))then
     e.self:Say("You have a paused timer.");
else
     e.self:Say("You do not have a paused timer.");
end

(credit goes to Cavedude)
2018-04-27 16:31:35 -07:00
regneq 7d99becca9 Merge pull request #11 from EQEmu/master
eqemu update
2018-04-27 11:51:59 -07:00
KimLS a53f65d86b Merge and compile fixes (non-bot, will do bots later) 2018-04-16 14:15:08 -07:00
Uleat fb7362c092 Added bot command 'BotStopMeleeLevel' 2018-04-12 20:14:02 -04:00
Uleat 714f8172ec Added CanDoCombat() checks to certain actions 2018-04-11 18:49:49 -04:00
Michael Cook (mackal) 9344896238 /pet attack is range limited 2018-04-08 18:38:34 -04:00
Michael Cook (mackal) 3081f7b24f Pets/NPCs don't use bane damage
Adds rule NPC:UseBaneDamage (defaults to false)
2018-04-08 18:26:25 -04:00
Michael Cook (mackal) e594b7eac6 Fix NPC chance on fishing (100 = 100% chance now) 2018-03-29 18:28:36 -04:00
KayenEQ 0f3fbc3883 Add Change Log message 2018-03-28 17:07:15 -04:00
KayenEQ 2d20d5858e Fix for a few of the Cast on Fade effects to make sure the trigger spell
hits the correct target type.
2018-03-28 16:06:45 -04:00
Uleat fe57e4d924 Merge branch 'master' of https://github.com/EQEmu/Server 2018-03-26 03:38:33 -04:00
Uleat e4e40505b6 Removal of test code 2018-03-26 03:38:08 -04:00
Kinglykrab 5b5c3a08e6 Fix TryMoveAlong() in Perl.
- Didn't have 4th option accounted for (my bad).
2018-03-25 14:33:38 -04:00
Michael Cook (mackal) 137d2d723d Initialize AISpellVar 2018-03-25 01:16:06 -04:00
Michael Cook (mackal) aff481bd37 Fix invalid read in con 2018-03-25 01:12:42 -04:00
Kinglykrab a5a660b828 Fix quest::set_proximity(). 2018-03-24 21:06:56 -04:00
Kinglykrab d08b7dafa4 Export TryMoveAlong() to Perl. 2018-03-24 18:52:20 -04:00
Michael Cook (mackal) 3e1b86a7c3 Fix lua/perl set_proximity to accept flag for say prox
This will fix proximity say to always work
2018-03-24 15:24:54 -04:00
regneq fe68c7bc14 Merge pull request #10 from EQEmu/master
merge updates
2018-03-21 16:00:01 -07:00
Michael Cook (mackal) 4ee35d7e56 Add default size function 2018-03-20 14:35:52 -04:00
Uleat dbdad80960 Fix gcc error - report is non-critical portion of test 2018-03-19 22:00:12 -04:00
Uleat 72940b2511 Merge branch 'master' of https://github.com/EQEmu/Server 2018-03-19 20:58:40 -04:00
Uleat 70922975cf Test code for tracing zone crashes (stage 2) 2018-03-19 20:58:13 -04:00
Michael Cook (mackal) 135cfd7617 Revert "Revert changes to melee push until the generic push processing is better"
This reverts commit 49089f7537.
2018-03-19 00:13:57 -04:00
Uleat d58e88a2f7 Merge branch 'master' of https://github.com/EQEmu/Server 2018-03-17 20:19:15 -04:00
Michael Cook (mackal) c29bdd4b1d Add a sanity check to prevent mobs climbing steep walls
Ex. in OMM's room in anguish
2018-03-17 14:29:11 -04:00
Michael Cook (mackal) 0643bf9783 Remove z offset mod in push, wasn't needed 2018-03-17 13:43:27 -04:00
Uleat 386261181e Rework of command #peekinv 2018-03-17 07:54:39 -04:00
Michael Cook (mackal) d8b704ef7d Adjust z offset down 2018-03-17 02:05:36 -04:00
Michael Cook (mackal) e46e2952e6 Use 8 points to check in push code 2018-03-15 16:20:00 -04:00
Michael Cook (mackal) a339d0d41d Don't rotate the box, it works better 2018-03-15 15:48:34 -04:00
Michael Cook (mackal) d62f2d41fc Bug fixes to push, shouldn't get stuck anymore 2018-03-15 15:39:36 -04:00
Michael Cook (mackal) 339e921f17 Add a #push command, only works on NPCs for now 2018-03-14 16:10:14 -04:00
Uleat 5e963c05af Added client message for test code 2018-03-12 20:49:48 -04:00
Michael Cook (mackal) 638d43e3cf Use pathpoint races for showing nodes
The nearest neighbor command will grow them instead of changing race
now.
2018-03-10 15:36:12 -05:00
Michael Cook (mackal) fdef1090c3 Update #race to accept all valid RoF2 races 2018-03-10 15:11:16 -05:00
Uleat 89303d9218 Fix for zone crashes on startup 2018-03-09 23:41:27 -05:00
Uleat 341bc0723b Test code for tracing zone crashes 2018-03-09 23:25:50 -05:00
Michael Cook (mackal) a6b31017e3 Remove extra z offset 2018-03-09 19:27:31 -05:00
Michael Cook (mackal) ca29cb037e Add some more name filtering 2018-03-09 17:26:22 -05:00
Michael Cook (mackal) d59931dc4d Use an algorithm to generate pet names 2018-03-09 17:10:34 -05:00
Michael Cook (mackal) 876335bb54 Pull out forced movement from push to it's own function
Had to pull this out so we could process it before mez/stun
2018-03-08 19:42:40 -05:00
Michael Cook (mackal) 5c87b8152d Remove Map::FindClosestLoS()
Map::LineIntersectsZone() already accomplished this use case
2018-03-08 18:03:15 -05:00
Michael Cook (mackal) ef487112df Add FixZ() to the spell push stuff
This is done after the packet since we want the NPC to get pushed up
still. The client will still interp the fall but server side we'll be on
the ground instantly
2018-03-08 16:11:48 -05:00
Michael Cook (mackal) 49089f7537 Revert changes to melee push until the generic push processing is better 2018-03-08 12:57:40 -05:00
Uleat 736890119b Forgot sql script file... 2018-03-07 22:46:11 -05:00
Uleat 2da70c69da Added command '#ucs' to force re-connect after ucs server unavailability (must manually re-join channels for now) 2018-03-07 22:45:05 -05:00
Michael Cook (mackal) ae966e546b WIP for NPC spell push, off by default for now 2018-03-07 16:50:24 -05:00
Michael Cook (mackal) 0d63c8b9ef Trap auras should spawn a bit in front 2018-03-07 15:23:03 -05:00
Michael Cook (mackal) 8f66527e02 Add TryMoveAlong(distance, angle)
This will take a distance you would like to move and an EQ angle you
would like to move relative to current heading (so 0 is in front, 256
behind)

Exported to Lua as well
2018-03-06 23:03:55 -05:00
Michael Cook (mackal) 7e7f5f0bd6 Add Map::FindClosestLoS()
This will return true if LOS failed and you should use the outloc
2018-03-06 23:02:49 -05:00
Michael Cook (mackal) b3ac1001c9 Add a FixHeading function
This is similar to what the client is doing

Should be used when adding 2 headings together (or an EQ angle to a
heading)
2018-03-06 23:01:25 -05:00
Uleat e5e779c064 Updated UCS versioning code - update your *.conf files 2018-03-04 21:38:17 -05:00
Michael Cook (mackal) 525db1819d Fix VS compilation hopefully 2018-03-04 13:54:28 -05:00
Michael Cook (mackal) bb3c0b41f6 Merge pull request #721 from noudess/master
Make old style rogue poison closer to live.
2018-03-04 13:20:28 -05:00
Michael Cook (mackal) 35c4867334 Add the Fast trig functions that work with EQ headings
This should match pretty close to the clients LUTs

Also fixed a bug with push
2018-03-04 02:19:12 -05:00
Michael Cook (mackal) 690d8f9155 Fix Conditional jump or move depends on uninitialised value(s) 2018-03-03 22:37:06 -05:00
Michael Cook (mackal) b63923264d Fix memory leak 2018-03-03 22:21:06 -05:00
Michael Cook (mackal) 5aab187e17 Fix missile heading 2018-03-03 13:10:32 -05:00
Michael Cook (mackal) ee4a79616f Lets can't a reference in resends 2018-03-03 00:59:44 -05:00
Paul Coene b667944612 Removed unneeded macro 2018-03-02 20:13:24 -05:00
Paul Coene 6fb3c66fe5 Fixed last minute math change typo. 2018-03-02 20:08:06 -05:00
Paul Coene 66ef95b9c9 Missed a header file for poison commit 2018-03-02 19:26:41 -05:00
Paul Coene bb3596d245 Adjusted chances for apply slightly. 2018-03-02 19:14:48 -05:00
Paul Coene a5c32b63b7 Make old style poison work much closer to live. 2018-03-02 19:05:16 -05:00
Michael Cook (mackal) 9e4f728f21 Spell push values can be negative 2018-03-01 18:10:06 -05:00
Michael Cook (mackal) 3cb7b362c8 Only rate limit NPC push
Clients are fine
2018-03-01 16:42:46 -05:00
Michael Cook (mackal) 1beb221337 Pets seem to run until within 35 units of you
This was at 75 before, testing on live puts this closer to 35
2018-03-01 16:15:57 -05:00
Michael Cook (mackal) 28cb11f521 Implement SE_TossUP -- actually a DMG SPA
This just causes damage to NPCs only
2018-03-01 14:43:37 -05:00
Michael Cook (mackal) d71e79b306 Add 2013 NPC vs NPC push change
They remove NPC vs NPC melee push in 2013
2018-03-01 13:44:10 -05:00
Michael Cook (mackal) 7edc891605 Use the melee push pos update timer for rate limiting the pushes
Also lowered the timer since it's limiting actual movement now
2018-03-01 13:41:02 -05:00
Michael Cook (mackal) 8e4aff391e Fix buff issue 2018-03-01 11:29:13 -05:00
Michael Cook (mackal) 1b84905941 Fix spell push
This now uses the spell data correctly, still need to write a system for
NPCs though

SE_TossUp needs to be implemented to, it just damages NPCs only
2018-02-28 19:47:23 -05:00
Michael Cook (mackal) 06d22fa009 Identify the rest of Action/CombatDamage structs 2018-02-28 19:21:03 -05:00
Michael Cook (mackal) 29f89cdfbc NPCs parsed less than normal push
Checking the packets, I was getting 0.3 for bash against PCs and 0.03
against NPCs. Same for other attacks.
2018-02-27 23:42:18 -05:00
Uleat 6f49a37914 Fix for linux build fail 2018-02-26 23:04:28 -05:00
Uleat 1e316102ea Fix for UCS-based messages containing saylinks 2018-02-26 22:38:14 -05:00
Uleat 03b2550520 Merge branch 'master' of https://github.com/EQEmu/Server 2018-02-26 20:02:38 -05:00
Uleat e547a1e778 Added 'server ready' broadcast to UCS server so clients will reconnect after crash 2018-02-26 20:02:27 -05:00
JJ 9c69eed211 Merge pull request #719 from noudess/master
quest::npcfeature() could not set all features
2018-02-26 14:28:08 -05:00
Paul Coene 464c1cb584 quest::npcfeature() could not set all features 2018-02-26 13:53:33 -05:00
Michael Cook (mackal) 4fbe55cc35 Merge pull request #718 from eqcodex/master
added minimum level to pvp flag.
2018-02-26 13:04:02 -05:00
Xackery 008b17aaf2 added minimum level to pvp flag. 2018-02-26 09:33:15 -08:00
Uleat c469571f62 Merge branch 'master' of https://github.com/EQEmu/Server 2018-02-25 21:40:56 -05:00
Uleat 6c2a8edea6 Added ClientVersion request system to UCS server (needed to fix saylinks) 2018-02-25 21:40:45 -05:00
Uleat 361937d443 SayLink clean-up 2018-02-24 09:08:11 -05:00
Chris Miles 4071e1d4d9 Merge pull request #717 from N0ctrnl/patch-6
Removed conditional for installing libsodium.
2018-02-24 00:30:27 -06:00
Kurt Gilpin 46a358abe6 Update install.sh 2018-02-24 00:24:26 -06:00
Kurt Gilpin fc339cc9d0 Removed conditional for installing libsodium.
If it's superseded or already installed, it just won't install it anyway.
2018-02-24 00:23:30 -06:00
Michael Cook (mackal) c87380fa54 Actually fix pet warp range ... 2018-02-23 17:42:57 -05:00
Michael Cook (mackal) 959337b592 Pets should warp to owner >= 450 units Fixes #715 2018-02-23 17:09:04 -05:00
Michael Cook (mackal) ca0b9bc374 Fix rampage behavior Fixes #716 2018-02-23 17:00:17 -05:00
Michael Cook (mackal) 2d459a962e Merge pull request #714 from eqcodex/master
Added rule to remove pet reagent cost
2018-02-23 13:38:36 -05:00
Xackery f3b2ac6c17 Added rule to remove pet reagent cost 2018-02-22 18:43:31 -08:00
Michael Cook (mackal) 6027a80c14 Identified bouding_radius in all spawn structs 2018-02-22 01:30:40 -05:00
Alex 6934552dd9 Merge pull request #713 from eqcodex/master
Added sanity check for #hotfix
2018-02-21 12:13:51 -05:00
Xackery 0b755cac54 Added sanity check for #hotfix 2018-02-21 07:59:47 -08:00
Uleat 765ee5eeed Fix for possible memory leak when spawning bots 2018-02-19 07:34:43 -05:00
Uleat c36a1cd6dc Fix for linux build fail 2018-02-18 14:30:58 -05:00
Uleat a493242c3c Fix and overhaul to bug reporting system 2018-02-18 14:03:13 -05:00
Uleat 97bb50a5c4 Fix for query failure on some systems 2018-02-17 17:35:54 -05:00
Michael Cook (mackal) 27225b6047 Update changelog [skip ci] 2018-02-16 15:38:44 -05:00
Akkadius cbd68ff8c8 Add new heading format conversion routine - eqemu_server.pl quest_heading_convert 2018-02-16 01:18:52 -06:00
Michael Cook (mackal) a32dedeb48 Fix issue with heading being incorrectly handled
So we've been doing heading wrong all these years. You will need to run
a script to fix your quests and required SQL to fix DB.

This fixes a ton of random issues with headings and as gives us a better
resolution on headings :P
2018-02-15 18:20:16 -05:00
Uleat 91d3851d76 Fix for 'SoD' client unable to log into zone [ci skip] 2018-02-14 23:04:33 -05:00
Michael Cook (mackal) b5e9c0f996 Fix PVP arenas 2018-02-12 19:42:09 -05:00
Alex de4782368d Merge pull request #709 from noudess/master
Scaled AC and ATK if npc is scaling.
2018-02-12 19:34:30 -05:00
Paul Coene 3e39c0c11a Scaled AC and ATK if npc is scaling. 2018-02-12 10:51:21 -05:00
Michael Cook (mackal) d2360753fb Fix issue with optional SQL [skip ci] 2018-02-11 17:40:49 -05:00
Michael Cook (mackal) e747ea851a Fix issue with optional SQL [skip ci] 2018-02-11 17:39:12 -05:00
Michael Cook (mackal) 68d563c72f Add optional file to implement global defiant tables [skip ci]
This is destructive and will delete the loottable_entries currently
holding defiant drops

The level ranges maybe a bit wrong, kind of hard to tell, but it should
be accurate enough
2018-02-11 13:26:00 -05:00
Michael Cook (mackal) c5e4bb08f4 Implement global loot system Fixes #619
This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
2018-02-10 22:15:21 -05:00
Uleat 0b97db9fd2 Added some basic functionality to 'bot guard' 2018-02-08 16:46:43 -05:00
Michael Cook (mackal) fb8873e77b Fix for glm with GCC 7.3
Something similar will be in the next release of glm
2018-02-08 15:54:17 -05:00
Uleat e943771945 More tweaks to bot jitter code 2018-02-07 22:40:45 -05:00
Uleat 05a3c4b2b8 Implemented pass-thru for Mob::CalculateNewPosition2(...) arguments 'fixZ' and 'calcHeading' 2018-02-07 18:47:42 -05:00
Michael Cook (mackal) 24b396e516 Fix /pet leader 2018-02-06 21:50:59 -05:00
Michael Cook (mackal) cdd0b2de00 Bug fix for longer reuses 2018-02-06 13:13:13 -05:00
Michael Cook (mackal) 4096ee1f1e Should dismount if mounted and casting and FD spell 2018-02-05 13:38:03 -05:00
Michael Cook (mackal) f720e51585 Implement NPC Charm Stats
These combat stats an NPC will change to while charmed
2018-02-04 16:30:16 -05:00
Michael Cook (mackal) c5c93bb2e6 Fix distance forget aggro drop not triggering events 2018-02-04 13:23:47 -05:00
Michael Cook (mackal) 85bafecc93 Command #repop will clear NPC spell cache now 2018-02-02 20:18:40 -05:00
Uleat 2ed185aa2c Forgot unversioned script file... 2018-02-02 18:26:01 -05:00
Uleat 1b2316ad1f Update for bot_spells_entries [ci skip] 2018-02-02 18:25:01 -05:00
Chris Miles 80ad3a8940 Merge pull request #702 from daerath/BugFix/RecipesIgnoreContainerSize
Bug fix/recipes ignore container size
2018-02-02 13:15:24 -06:00
Uleat cef4928dd0 Tweak for rogue bot jitter code 2018-02-01 20:43:26 -05:00
Michael Cook (mackal) ab65bb1d57 Update #showspellslist command 2018-02-01 19:03:42 -05:00
Michael Cook (mackal) c21293e508 Fix issue with spells that didn't make sense to be innate 2018-02-01 18:55:16 -05:00
Michael Cook (mackal) 3c794cfc07 Add Support to define a valid HP range for NPC casting
These will allow us to define a valid HP range (HP of the caster) that
an NPC will cast a spell. For example NPC casting a defensive spell at
2018-02-01 18:34:07 -05:00
Uleat d71dbd1751 Relocated 'stop movement' code into class Mob from class Bot 2018-02-01 05:38:10 -05:00
Uleat 8805021960 Re-worked Bot::AI_Process(); Added 'leash,' 'main assist' and 'combat abort' features 2018-01-31 19:31:09 -05:00
Uleat dd2b12b517 Fix for 'MobAI_DEBUG_Spells >= 10' compile failure [skip-ci] 2018-01-31 17:46:28 -05:00
Michael Cook (mackal) 78f3a2aa64 Merge pull request #704 from noudess/master
Cleanup some rules that are no longer used anywhere.
2018-01-30 14:37:26 -05:00
Michael Cook (mackal) 03dbe47546 Skip distance check in mob spell AI for some target types
This should be good enough for now, some of the hatelist spells use 0
ranges for some reason :P

The client checks only a few target types for distance, we should
probably just match that eventually
2018-01-30 13:16:25 -05:00
Michael Cook (mackal) 13ad5e4b46 Lets ignore Z on distance hate removal until pathing doesn't suck 2018-01-30 12:53:58 -05:00
Michael Cook (mackal) 6716e580f3 Make npc_spells_cache a map fixes #705
Should probably add a way to clear the cache, but we didn't do that
before so I didn't bother.
2018-01-29 23:36:05 -05:00
Michael Cook (mackal) 5d9c8c8e27 Quick fix to allow dev work to still happen on npc spells
This will allow a bit of overhead while developing NPC spell sets
2018-01-29 15:18:47 -05:00
Michael Cook (mackal) 7bd5213be4 Skip buff stack check for innates SpellType_Nukes 2018-01-29 15:16:56 -05:00
Paul Coene 93ddf915a2 Cleanup some rules that are no longer used anywhere. 2018-01-29 14:48:10 -05:00
Michael Cook (mackal) f8ce10472b Rework some Spell AI so NPCs can have spammy spells
Lots of encounters in EQ will spam spells, like dragon fear is on a very
tight timer etc. In order to eliminate the need to script all of these
encounters AI spells with a priority of '0' will be treated as "innate
spells." Devs have used this term and it is what I believe they mean by
it.

You can run update npc_spells_entries set priority = priority + 1 where priority >= 0;
to disable the behavior.
2018-01-28 18:06:54 -05:00
Kinglykrab ceb2b287bb Fixed merchantlist probability.
NPCs were setting a singular chance value and each item was checking based on this value, making the probability field not a random chance per item.
This removes the probability field from NPCs, SetMerchantProbability() and GetMerchantProbability() and makes the probability field truly random chance.

Special thanks to ChaosSlayerZ for noticing the issue here: http://www.eqemulator.org/forums/showthread.php?t=41731
2018-01-27 19:08:15 -05:00
Kinglykrab 8e9fa38197 Added #reloadmerchants for zone-based merchant refreshing. 2018-01-27 18:19:48 -05:00
Daerath 5763672175 Merge branch 'master' into BugFix/RecipesIgnoreContainerSize 2018-01-27 12:17:39 -05:00
Michael Cook (mackal) 6ed3301110 Add some appearance Changing functions
These directly modify the values so we can script appearance on
pets/swarm pets. (Ex. Host of the Elements, some Vet AAs)

These functions are only really useful in EVENT_SPAWN since that's
before the appearance data is sent to the client and this will avoid
having to send a bunch of illusion packets.
2018-01-24 15:26:53 -05:00
Daerath fbe456ed45 * If GetItem returns null when searching for a container item, we now default bagslots to 10 instead of aborting. 2018-01-21 17:28:27 -05:00
Daerath 518a5e8ab1 * Added test for null output of GetItem and log & return if the item cannot be found. 2018-01-21 15:49:15 -05:00
Daerath 008ac97a64 Merge branch 'master' into BugFix/RecipesIgnoreContainerSize 2018-01-21 10:18:10 -05:00
Daerath 7892fed6d9 * Combine container size is checked before displaying favorite recipes or when searching for a recipe. This fixes an issue where you could combine any recipe in a 2 slot container or in any container smaller than the number of required components.
* World containers that do not have ID values default to size 10 based as all world containers that are not transmitting ID values appear to have 10 slots.
2018-01-21 10:17:31 -05:00
KimLS f16faae964 Fix for bug in config reading tables 2018-01-20 21:26:52 -08:00
Michael Cook (mackal) 6042410b4b Fix duration on WakeTheDead 2018-01-20 19:19:40 -05:00
Michael Cook (mackal) 26532c03ac Fix crash
Whoever made this using dynamic memory should be fired.
2018-01-19 23:28:07 -05:00
Uleat 0fa5053ad1 Merge branch 'master' of https://github.com/EQEmu/Server 2018-01-18 22:35:58 -05:00
Uleat 39a94dba0d Fix for installer script bot schema failures 2018-01-18 22:34:23 -05:00
Michael Cook (mackal) a440269c6b Adjust the behavior of out of range aggro removal
This is a bit more accurate
2018-01-18 19:59:04 -05:00
Michael Cook (mackal) a7310cba17 Export new special attack to lua too 2018-01-18 18:33:36 -05:00
Michael Cook (mackal) b82100bcd7 Add IMMUNE_RANGED_ATTACKS
This makes them immune to archery/throwing

This also needs more work as comments state, but good enough for now
2018-01-18 18:30:29 -05:00
Michael Cook (mackal) e7ce79261d Add a timer to rate limit the hatelist check 2018-01-18 15:54:53 -05:00
Michael Cook (mackal) d8bbb428d8 Add hatelist removal for far distances and time 2018-01-18 15:44:51 -05:00
Akkadius e0391dfcb8 Merge branch 'master' into lsid 2018-01-17 22:04:46 -06:00
Michael Cook (mackal) 7adc93d806 Fix zone failure messages on RoF+ 2018-01-17 22:01:45 -05:00
Michael Cook (mackal) 62dcc188d1 Set bZoning to false in failure cases 2018-01-17 21:37:24 -05:00
Michael Cook (mackal) aa1114c387 Rename Client::zoning to Client::bZoning 2018-01-17 21:37:24 -05:00
Akkadius 462349ad84 [eqemu_server.pl] Fix database dump script utility 2018-01-17 03:47:33 -06:00
Akkadius 19183f958e [eqemu_server.pl] Support for Linux Loginserver installation 2018-01-17 03:41:36 -06:00
Michael Cook (mackal) 42d3a7e4f6 Merge pull request #684 from daerath/feature/Dae-ModernAAXP
Feature/dae modern aaxp
2018-01-15 22:27:20 -05:00
Michael Cook (mackal) af02b9f958 Add json config examples 2018-01-15 22:02:52 -05:00
Chris Miles f67d280845 [eqemu_server.pl] Account for qsdatabase when installing config variables 2018-01-15 00:18:16 -06:00
Chris Miles 6d7203ef4b Update eqemu_server.pl 2018-01-15 00:00:41 -06:00
Chris Miles 90a9b98ae6 Remove install_variables on install completion (Linux) [skip ci] 2018-01-14 23:47:53 -06:00
Akkadius 61fb708b73 Disable caching for eqemu_server.pl wget requests [skip ci] 2018-01-14 22:52:02 -06:00
Chris Miles 4629b4f261 Update user_tables.txt 2018-01-14 22:32:22 -06:00
Akkadius 865c8562da Merge branch 'master' of https://github.com/EQEmu/Server 2018-01-14 14:04:34 -06:00
Akkadius 7fea04c663 Conversion order adjustment [skip ci] 2018-01-14 14:04:26 -06:00
Chris Miles 8620e1b7c9 Merge pull request #695 from N0ctrnl/patch-5
Install JSON libraries
2018-01-14 00:02:28 -06:00
Kurt Gilpin 9102c1a13a Update install.sh 2018-01-13 23:29:19 -06:00
Kurt Gilpin 682df81339 Install JSON libraries 2018-01-13 23:23:54 -06:00
Akkadius 40ebee9ff4 Noudess: This makes newly spawned NPCs have a chance to cast 2018-01-13 22:14:21 -06:00
Akkadius 26213f9049 Merge branch 'master' of https://github.com/EQEmu/Server 2018-01-13 22:04:29 -06:00
Akkadius 680f1f017d Compile fixes from merge 2018-01-13 22:04:10 -06:00
Chris Miles cee3dc370d Update README.md 2018-01-13 21:57:47 -06:00
Akkadius f91de33e5d Merge remote-tracking branch 'origin/doc_scripts' 2018-01-13 21:51:33 -06:00
Xackery Xtal fc844cefd7 Added perparlse and cleaned up some argument names in embparser 2018-01-13 19:10:51 -08:00
Akkadius a5e65b93c9 Change our web request references to master now that we are merged 2018-01-13 17:22:27 -06:00
Chris Miles 92e20d07ae Update README.md 2018-01-13 16:42:55 -06:00
Akkadius c4432bcd7e Merge fixes 2018-01-13 16:41:10 -06:00
Chris Miles b6fc878aab Update README.md 2018-01-13 16:38:11 -06:00
Michael Cook (mackal) d18fb730ec Don't increment the xtarget count on feign memory 2018-01-13 01:14:32 -05:00
Chris Miles 4cd7d98224 Merge pull request #693 from noudess/master
This patches gross pet errors in Z.
2018-01-12 03:11:34 -06:00
Michael Cook (mackal) 760ba01e6b Update a comment 2018-01-10 22:34:57 -05:00
Paul Coene fb2f8327e2 This patches gross pet errors in Z. 2018-01-10 14:13:52 -05:00
Michael Cook (mackal) 7559d96a0e Merge pull request #692 from noudess/master
Allow trading nodrop to pets via new rule.
2018-01-10 14:02:43 -05:00
Paul Coene 1471784035 Allow trading nodrop to pets via new rule. 2018-01-10 13:41:25 -05:00
Michael Cook (mackal) 057823e4c1 Merge pull request #691 from noudess/master
Add rule to use ClassicBackstab (no mob fronttab)
2018-01-10 13:35:21 -05:00
Paul Coene e1f8354905 Add rule to use ClassicBackstab (no mob fronttab) 2018-01-10 13:19:26 -05:00
Michael Cook (mackal) 50cc093250 Merge pull request #690 from noudess/master
Level was missing from Spell error message.
2018-01-10 13:15:50 -05:00
Paul Coene e25499b3f2 Level was missing from Spell error message. 2018-01-10 13:10:03 -05:00
Chris Miles 14b3525e9c Merge pull request #688 from noudess/master
Exclude clients from FixZ to fix fear issues.
2018-01-09 19:35:30 -06:00
Paul Coene c2a35bb2e1 Exclude clients from FixZ to fix fear issues. 2018-01-09 20:31:48 -05:00
Michael Cook (mackal) 279cd4660d Merge pull request #687 from noudess/master
Removed pets from Witness Heal Aggro.
2018-01-09 18:11:28 -05:00
Paul Coene 2dad087bbd Removed pets from Witness Heal Aggro. 2018-01-09 18:00:34 -05:00
Michael Cook (mackal) 4b612400da Merge pull request #683 from noudess/master
Adjust xp loss on death if using the level_based_mods.
2018-01-09 17:17:17 -05:00
Chris Miles 91da1305a4 Merge pull request #686 from shea851/GetWorldTime_fix
Packet sends with sz 0 do not work on Linux
2018-01-08 20:44:01 -06:00
Shea ee581f27c4 Packet sends with sz 0 do not work on Linux 2018-01-08 19:15:36 -06:00
Daerath d90982e63b * Merge from master and removal of commented code. 2018-01-06 11:01:41 -05:00
Daerath a3dc36ae22 Merge branch 'master' into feature/Dae-ModernAAXP 2018-01-06 10:28:04 -05:00
Daerath b25c5d509d * Refactored how XP is calculated
* Added ability to use normalized XP per AA (based on # of kills per AA per white con NPC -- TSS era change)
* Added ability to use accelerated AA gain between a defined range (based on live, 0 - 4000 AA, linearly decreasing)
2018-01-06 10:22:26 -05:00
Akkadius 6e1c8c665b Fix NPC aggro to account for squared - fixing NPC's that aggro beyond the normal scan range 2018-01-04 14:38:29 -06:00
Daerath feafd43fdf * Renamed rule to enable modern AA scaling to be consistent with the other related rules. 2018-01-03 06:19:48 -05:00
Daerath 7d7b9d0238 * Added rules for managing AA scaling. 2018-01-02 17:27:59 -05:00
Daerath c2b5820153 * Implementing live-like AA scaling rules based on a window where accelerated AA XP is earned.
* TODO: Add scaling rules to database and rules engine and remove hardcoding
2018-01-01 14:23:24 -05:00
Paul Coene a6b9cd87ec Adjust xp loss if using the level_based_mods. 2017-12-26 11:42:09 -05:00
Chris Miles 11092da32d Merge pull request #678 from noudess/master
Mobs no longer root feared enemies.
2017-12-25 13:46:53 -06:00
Chris Miles dfccb4a2bc Merge pull request #679 from SecretsOTheP/master
Fixed Ubuntu 17.10 compile until FMT is updated
2017-12-25 13:46:18 -06:00
KimLS cc0034fd3c SQL files 2017-12-24 23:31:13 -08:00
KimLS 3fdfc82ca0 Merge branch 'master' into lsid 2017-12-24 23:21:35 -08:00
KimLS 0ec53eff52 Reimplement some functions 2017-12-24 23:21:17 -08:00
Michael Cook (mackal) c1ad00cbc6 Fix where SE_ExtraAttackChance happens
Improved AA descriptions say this is after a successful double attack
2017-12-23 22:55:45 -05:00
Michael Cook (mackal) 6686346473 Implement July 24, 2002 pet resist changes 2017-12-23 22:48:21 -05:00
Michael Cook (mackal) 0356c0a891 Refactor getting resist value out to a function 2017-12-23 22:35:05 -05:00
Michael Cook (mackal) 8af4730ddf Merge pull request #680 from shea851/xtarget_fix
Fix for Xtargets not being populated when pet initiates aggro.
2017-12-22 18:39:05 -05:00
Shea 994e2001a0 Fix for Xtargets not being populated when pet initiates aggro. 2017-12-22 17:09:47 -06:00
SecretsOTheP c65864ffb6 Fixed Ubuntu 17.10 compiles 2017-12-21 14:55:59 +00:00
JJ 8011c48641 Make Ground Spawn sql required in https://github.com/EQEmu/Server/commit/97873ff42d6b4407d790e5d79886c7ee2c2259f0 2017-12-17 12:58:42 -05:00
KimLS 7a778c549f convert login.ini to login.json, stole jumber's idea about auto-updating old passwords (wip still) 2017-12-16 23:08:21 -08:00
JJ 97873ff42d Change Ground Spawn respawn timers to match normal spawns (msec to sec). Highly recommended sql included! 2017-12-16 23:20:20 -05:00
Michael Cook (mackal) 9af9deb0f5 Attempt to fix disc issue when client has no buff but server still does
This is kind of hard to test, but it is what the client is doing
2017-12-15 18:42:21 -05:00
Michael Cook (mackal) 477ba3f4b9 Apply HotZone for AAs
Ahh is this the right spot? No idea :P
2017-12-15 01:47:45 -05:00
KimLS 3ee5730890 Auto link ls accounts plus auto-create 2017-12-14 18:41:10 -08:00
KimLS 569a907e43 Changes to make it actually sorta work 2017-12-11 18:38:04 -08:00
KimLS 5bbeec626c Heavy wip on login changes to get it to actually work like we want 2017-12-10 23:35:25 -08:00
Paul Coene 9c6dbe699f Mobs no longer root feared enemies. 2017-12-10 10:55:25 -05:00
Chris Miles 9cfe6b936b Merge pull request #673 from noudess/master
Upgrade weaponless NPC offense
2017-12-04 08:10:57 -06:00
Chris Miles 9b4e63fbc7 Merge pull request #677 from shea851/distance_change
Add distance logic to mobs that move
2017-12-04 08:10:47 -06:00
Shea ba1a317119 Add distance logic to mobs that move 2017-12-03 11:33:29 -06:00
Michael Cook (mackal) 55f1767001 Add confirmed OP_MoveMultipleItems structs
Pretty sure SoF-UF are the same, but I haven't verified that yet
2017-11-30 16:50:10 -05:00
Michael Cook (mackal) f8b924c262 Identified other OP_MoveMultipleItems opcodes
Older clients don't actually ever send this but they do accept it
2017-11-26 18:51:27 -05:00
Michael Cook (mackal) e19b7bd368 Start work on OP_MoveMultipleItems (RoF+)
Currently it just kicks to prevent desyncs
2017-11-25 23:57:15 -05:00
Paul Coene 3bfa1d68f7 Merge branch 'master' of github.com:noudess/Server 2017-11-22 09:39:32 -05:00
Paul Coene aaac2c5a84 Give weaponless NPCs best offense based on skills 2017-11-22 09:38:03 -05:00
Akkadius 29a62dfa85 Remove debugging 2017-11-21 21:48:35 -06:00
Chris Miles 790304d1f1 Merge pull request #672 from noudess/master
MoveTo while saving guard position no longer hops.
2017-11-21 21:41:12 -06:00
Chris Miles 7e0e9a037d Merge branch 'master' into master 2017-11-21 21:39:31 -06:00
Chris Miles 712fe1f6ec Merge branch 'master' into master 2017-11-21 21:26:52 -06:00
Akkadius b03e9af597 Fix issues with NPC's ghosting who path for long distances, this should wrap up the small remainder of ghosting edge cases 2017-11-21 21:25:20 -06:00
Michael Cook (mackal) 52d31a6846 Make high STR race rez effects a rule
They stopped using this one at some point it seems
2017-11-19 01:45:05 -05:00
Paul Coene a8427ca610 Fixed Log message to have correct text and values 2017-11-17 14:09:19 -05:00
Paul Coene 5880593cb1 MoveTo while saving guard position no longer hops. 2017-11-17 13:12:26 -05:00
Chris Miles 6bb3ebc00e Merge pull request #669 from noudess/master
Added a #petname command for renaming only pets
2017-11-16 20:41:01 -06:00
KimLS 6b70faf141 Multiple login account support initial, needs a ton of work but can login and create account 2017-11-14 21:42:14 -08:00
Michael Cook (mackal) da163be8db Fix auto complete error 2017-11-10 00:06:50 -05:00
Michael Cook (mackal) e928046a95 Add guild tribute slot for legacy stuff 2017-11-10 00:04:33 -05:00
Michael Cook (mackal) 3eaa0b4fb1 Don't need to garble for language, client does
Maybe older clients need it?
2017-11-09 13:31:04 -05:00
Michael Cook (mackal) 37bedfe9ba Move PetHoTT to NPC::SetTarget for charmed pets 2017-11-04 01:27:41 -04:00
Michael Cook (mackal) df0004c1b0 Another fix for GetHaste for pets 2017-11-04 01:08:55 -04:00
Michael Cook (mackal) 24e4730204 Whoops, we do haste differently 2017-11-04 00:39:54 -04:00
Michael Cook (mackal) 7d12382333 Fix NPC/Pet haste caps 2017-11-04 00:33:30 -04:00
Michael Cook (mackal) bc348dadad Merge pull request #668 from regneq/master
Trap overhaul ported from takp
2017-10-29 13:18:57 -04:00
Paul Coene ceadb1325d Added a #petname command for renaming only pets 2017-10-28 15:22:58 -04:00
regneq 15f7440af2 Update version and manifest for traps.sql 2017-10-28 10:48:22 -07:00
regneq cd748e7d8b Fixed an issue that would cause traps to not function correctly if skill is 0 in the database.
Added undetectable column, to allow content developers to make a trap undetectable and not able to be disarmed.

Pets will no longer try to aggro traps its owner triggers.

Traps will now use the radius column to determine disarm range, instead of using a hardcoded value which may not be appropriate in all cases.

Decreased the scan range for traps to disarm.

Fixed some typos, and removed some unused code.
2017-10-28 10:02:31 -07:00
regneq ed98aa45d2 Traps overhaul. New functionality has been added, while preserving the old functionality. Numerous bug fixes occurred as well.
Added column triggered_number. If this is set, then the trap will despawn after it has been triggered this number of times. If 0, the trap will never despawn on its own.

Added group column. This allows developers to group traps together in a similar way as spawngroups for NPCs. When a trap that is grouped is despawned in anyway, a random trap in the group will take its place. Grouped traps do not have to be at the same coords or have the same type. This can allow for some spawning diversity if so required. If set to 0, the trap is not grouped and will always respawn.

Added column despawn_when_triggered. If set to 1, then a trap will despawn when a player triggers it. If 0, then there will be a 5 second reset time and then the same trap will again be active. (Assuming triggered_number has not been reached.) The player that triggered the trap will not re-trigger it until they have left and re-enetered the trap's radius.

Traps will no longer trigger on players that are currently zoning. This fixes some weirdness and at least one crash. The trap can trigger however after the connection is been completed. If a player camped out in a trap radius they can potentially still be hit.

Alarm type traps were not using effectvalue2 to determine who should be aggroed. This is now fixed.

Traps will no longer be broken by #repop, #depopzone, or #reloadworld. All 3 commands will now have the same effect on traps as they do for NPCs.

Added command #reloadtraps. This reloads all of the traps in the zone.

Added command #trapinfo. This gives some information about the traps currently spawned in the zone.

Added Traps logsys category

Required SQL:
utils/sql/git/required/2017_10_26_traps.sql
2017-10-27 21:24:24 -07:00
regneq 10477d3795 Merge pull request #9 from EQEmu/master
eqemu merge
2017-10-27 16:59:05 -07:00
Michael Cook (mackal) 982c078926 Merge pull request #665 from joeyw/fix-weapon-proc-level
Change weapon proc req. level to Level2 property
2017-10-25 18:42:32 -04:00
Chris Miles a721179aa8 Merge pull request #667 from noudess/master
Roam Box code was changing z every loop through.
2017-10-25 00:30:16 -05:00
Michael Cook (mackal) 50d5f3785c Send caster name in buff packets for UF+
Currently the names only show for inspecting via Target Window because
we send buff packets in the wrong order and there is a dependency on
them being correct for self that isn't present for target window.
2017-10-24 00:02:49 -04:00
Akkadius 9856df20fb Fix SQL syntax in Adventure::MoveCorpsesToGraveyard() 2017-10-23 17:24:18 -05:00
Akkadius c8b75e982e Safeguard characters losing their account_id 2017-10-20 18:36:11 -05:00
Michael Cook (mackal) 199dd7d618 Fix missing round kick dmg calc 2017-10-20 17:01:39 -04:00
Akkadius ab569681b1 Merge branch 'master' of https://github.com/EQEmu/Server 2017-10-16 15:54:37 -05:00
Akkadius b10f5d3745 Group ID can be zero 2017-10-16 15:52:59 -05:00
Paul Coene 7dd904c8d1 Roam Box code was changing z every loop through. 2017-10-16 16:39:22 -04:00
Chris Miles 624be70990 Merge pull request #666 from noudess/master
This change way back when actually totally hosed skillups.
2017-10-16 15:06:45 -05:00
Akkadius b9d2c1b9f6 Client::Handle_OP_RaidCommand crash fix 2017-10-16 13:56:02 -05:00
Akkadius 00b2debb32 Raid::UpdateGroupAAs out of range crash in memset 2017-10-16 13:52:01 -05:00
Akkadius f29fe17496 Potential pathing crash fix 2017-10-16 13:46:09 -05:00
Akkadius e80f3c87e9 Zone: Main loop crash fix 2017-10-16 13:20:33 -05:00
Akkadius a7d0251b77 Mob::TryFadeEffect sanity checks for potential crashing 2017-10-16 13:15:03 -05:00
Akkadius 3bcfcc6308 ZoneDatabase::GetKarma crash fix 2017-10-16 12:56:00 -05:00
Paul Coene 7d004e1eb0 Merge remote-tracking branch 'upstream/master' 2017-10-16 09:26:14 -04:00
Paul Coene 90f6023f0f I added this back when. I was wrong. 2017-10-16 09:25:26 -04:00
Michael Cook (mackal) 4e9c3e19d2 Fix some XTarget FD issues 2017-10-16 01:25:14 -04:00
Michael Cook (mackal) 0f1ca0856c Fix mana regen issue with old skill progression 2017-10-15 21:35:03 -04:00
Joey Wendt 2ef5ade596 Change weapon proc req. level to Level2 property 2017-10-12 00:43:25 -05:00
Michael Cook (mackal) 75e60b7f8e Area Regen functions shouldn't send to all 2017-10-09 01:08:01 -04:00
Michael Cook (mackal) 64d39134b9 Fix issues with Mob::TryTriggerOnValueAmount 2017-10-09 00:18:33 -04:00
Michael Cook (mackal) 414cafdbed Add OP_AddNimbusEffect 2017-10-09 00:04:43 -04:00
Michael Cook (mackal) f566cba56a Add Area Regen functions to Lua 2017-10-08 21:43:16 -04:00
Michael Cook (mackal) 8400994c57 Rework regens to match modern clients 2017-10-08 00:13:53 -04:00
Chris Miles 43f459b194 Update README.md 2017-10-06 20:13:35 -05:00
Chris Miles e352171efa Delete GPL.txt 2017-10-06 18:21:37 -05:00
Chris Miles 6c2f554a31 Update README.md 2017-10-06 18:04:12 -05:00
Chris Miles bb2a6dce23 Delete LICENSE.md 2017-10-06 17:57:42 -05:00
Chris Miles 288ae4bad3 Merge pull request #664 from noudess/master
Rooted mobs cast spells instead of doing nothing.
2017-10-06 17:53:35 -05:00
Chris Miles f2c48d4c58 Merge pull request #660 from mlinderdt/master
Bot bugs - targeting after zoning and zone.exe crash
2017-10-06 17:52:49 -05:00
Chris Miles f8571a57dd Create LICENSE 2017-10-06 17:50:57 -05:00
Paul Coene 5285e8a163 Rooted mobs cast spells instead of doing nothing. 2017-10-02 14:40:21 -04:00
Michael Cook (mackal) f8a4f2e6bd Merge pull request #662 from noudess/master
Rule to dictate if you can teach yourself lang.
2017-09-24 18:07:41 -04:00
Paul Coene c7ad873581 Rule to dictate if you can teach yourself lang. 2017-09-24 16:33:08 -04:00
Michael Linder 78759add4a Ignore bots during group position update. Fixes zone.exe crash when a client gets too far away from their bots. 2017-09-20 19:06:09 -05:00
Michael Linder 48b674a13d During bot spawn, set bot to targetable. Fixes issue #657. 2017-09-20 19:04:59 -05:00
Michael Cook (mackal) 8c9b852586 Fix food/drink to match live 2017-09-19 02:01:06 -04:00
Michael Cook (mackal) 9634bef7fc Identify Stackable and Lore in OP_AdventureMerchantResponse
Thanks eqmule!
2017-09-17 21:33:58 -04:00
KimLS cbbfae0cfc Merge master compile fixes 2017-09-17 13:34:35 -07:00
KimLS fc7623b690 Merge fix 2017-09-17 13:20:48 -07:00
Akkadius 0cf5a7aec3 Merge pull request #650 from noudess/master
Add fix for GetGroundZ and fix some constant references.
2017-09-17 11:19:48 -05:00
Paul Coene 59152a9d77 Fix some constants. 2017-09-17 12:11:02 -04:00
Akkadius e3972cc9e6 Update another Z Offset location for pathing 2017-09-17 10:16:13 -05:00
Akkadius 2a4d6523b1 Fix some zone entrance ghosting 2017-09-17 10:12:41 -05:00
Akkadius 6d8b96068d Add model/race offset to FixZ calc (KLS) 2017-09-17 09:55:42 -05:00
Akkadius e88cd61097 Fix 95% of food/water consumption issues, if there are additional modifiers for race/class combos - those will need to be applied
Mods properly calculated

Stages should be put in place if not already:
https://wiki.project1999.com/Food_and_drink#Stages_of_Hunger_and_Thirst

Values stored in the database are 0-6000, previously we capped it at 6000 but previous math would have normal values in the 60k+ range in order for food to be consumed at a reasonable rate. We are now using more native logic where 1 = 1 minute, following logic:

(Minutes)
0 -  5	- This is a snack.
6 -  20	- This is a meal.
21 - 30	- This is a hearty meal.
31 - 40	- This is a banquet size meal.
41 - 50	- This meal is a feast!
51 - 60	- This is an enduring meal!
61 - X	- This is a miraculous meal!
2017-09-17 09:48:10 -05:00
Akkadius b71f3031bc [Windows] World process window title now updates with server name and amount of clients connected 2017-09-17 05:34:44 -05:00
KimLS 9dd4002337 Move stuck code out of main pathing function so we can add logging easily later 2017-09-09 14:01:39 -07:00
KimLS ccdebf0116 Add custom feature, cross-class skill trainer, fix up stuck detection and added a better solution to it. 2017-09-09 00:24:30 -07:00
KimLS 1a4aa1692a Remove partial warp for now 2017-09-05 22:50:08 -07:00
Michael Cook (mackal) 240f04eda7 Implement fleeing stun 2017-09-04 02:10:10 -04:00
Michael Cook (mackal) 7b4c130e0a Switch local saved "animation" to signed
This variable is really the SpeedRun but packed as an int ...
2017-09-03 15:02:36 -04:00
Michael Cook (mackal) 7e3fdee86c Fix Life Burn from killing you 2017-09-03 02:04:25 -04:00
KimLS 6a79694fa1 Merge branch 'master' of github.com:EQEmu/Server into wp 2017-08-31 17:47:33 -07:00
KimLS c52ff4249a Pathing stuck detection, and logic to go with it 2017-08-30 19:55:35 -07:00
Michael Cook (mackal) 4e7870c634 Don't set reuse timer in UseDiscipline in case CastSpell fails 2017-08-30 15:17:02 -04:00
Michael Cook (mackal) 487dcc4459 Tweak down spellend_timer for delaytimer
400 ms is far too aggressive for normal game play
Set to 10 ms to hopefully not get in the way of legitimate game play

Also, why do we even do this? As far as I can tell, we need this to be
less than the users ping to not cause issues. What are the actual
reasons we do this and what can we do differently to solve them?
2017-08-30 14:35:01 -04:00
KimLS 0ba9b3fedc Fix for bug in pathing stuck detection 2017-08-29 22:03:22 -07:00
KimLS 46561b9cf5 Factor in size to actor offset 2017-08-28 23:48:05 -07:00
KimLS 545ac6b420 Some pathing tweaks, removed old quest functions that dealt with the old pathing code. Fixes to best z under new system 2017-08-28 22:01:08 -07:00
Michael Cook (mackal) 2146489740 Add rest of the avoidance skills to AA bonus 2017-08-26 00:15:01 -04:00
Michael Cook (mackal) 3746128014 Fix SE_IncreaseBlockChance stacking 2017-08-26 00:12:47 -04:00
Michael Cook (mackal) ca32e35ef6 More Zone struct commments 2017-08-26 00:12:34 -04:00
Akkadius c37e83e235 Remove some leftover debugging XD 2017-08-24 04:15:55 -05:00
Akkadius 00604722bb [Perl] Fix perl for later Linux releases v5.24.1 2017-08-24 04:13:52 -05:00
Akkadius 808654743c [Position Updates] Bulk updates when player has moved far enough - eliminates client ghosting on rez/gates/summon as well as npc ghosting 2017-08-22 02:13:56 -05:00
Akkadius bb2d8f6a4d [Position Updates] Always send position updates to group members - even when in raid 2017-08-22 00:48:55 -05:00
Akkadius 7a263c032d [Readability] Clean up some of the raid command code to be more understandable 2017-08-21 21:44:28 -05:00
Akkadius ad7dfc31a9 [HP Updates] Resolved an issue when a player is swapped to a group in a raid - mana and endurance shows empty to group members 2017-08-21 21:01:35 -05:00
Akkadius 0663e9cb6f [HP Updates] Resolve issue where clicking self in raid window would make characters health bar go down significantly 2017-08-21 19:49:19 -05:00
Akkadius b0a3e9205f [FixZ] Smooth out close combat npc/pet hopping 2017-08-21 02:42:50 -05:00
KimLS 0e8f6a32b1 Explicit RTreeValue decl because gcc didnt like it implicitly here 2017-08-20 17:40:37 -07:00
KimLS 17544d4577 Some tweaks to GCC errors, still think there's a couple 2017-08-20 15:37:46 -07:00
JJ b22a88eccc Fix sql in manifest [skip ci] 2017-08-19 16:40:49 -04:00
KimLS 563878f20e Compile fixes and some debugging messages in find path code. 2017-08-19 12:49:06 -07:00
Akkadius dd8d23be62 Merge branch 'master' into eqemu_config_json 2017-08-18 21:18:54 -05:00
Akkadius 4d3dda23f8 Make #repop work almost instantly 2017-08-18 20:53:26 -05:00
Akkadius 718a2c2205 FixZ on NPC initial spawn to keep NPC's from hopping 2017-08-18 20:23:16 -05:00
KimLS ffbee0ad1a Merge 2017-08-09 10:42:07 -07:00
Michael Cook (mackal) bb8c6da0b4 Update comment [skip ci] 2017-08-08 14:03:04 -04:00
KimLS 575ba28b62 Bug fixes with fear points and teleport jumps 2017-08-06 20:48:39 -07:00
KimLS 3afee1f841 Work on making the paths work well when being z corrected esp for nav meshes 2017-08-05 20:54:43 -07:00
Michael Cook (mackal) d5699fb68d Flush out RoF2 NewZone_Struct 2017-08-04 16:43:45 -04:00
regneq 519c049902 Merge pull request #8 from EQEmu/master
merge from eqemu
2017-08-04 09:06:08 -07:00
Michael Cook (mackal) 28fca1f8dc More OP_SpawnAppearance types 2017-08-01 20:14:10 -04:00
Michael Cook (mackal) 935dc7d8fb Add more OP_SpawnAppearance types (RoF2 at least) 2017-08-01 19:57:30 -04:00
Michael Cook (mackal) 771c3b175e Fix AffectedBySpellExcludingSlot 2017-08-01 13:09:18 -04:00
Akkadius b468945eb7 Merge pull request #649 from noudess/master
Fix  roam boxes to use dest Z to better integrate with FixZ changes.
2017-07-31 12:30:59 -05:00
Paul Coene 3554211233 Merge remote-tracking branch 'upstream/master' 2017-07-31 09:22:15 -04:00
Paul Coene 0fc72875b2 Modify roam boxes to correctly modify and use destination Z 2017-07-31 09:21:49 -04:00
Michael Cook (mackal) 2286203123 Fix invis in spawn structs 2017-07-29 23:31:47 -04:00
Michael Cook (mackal) 210655ddc7 More SpawnStruct comments 2017-07-29 19:15:27 -04:00
Michael Cook (mackal) 034ebab064 Fix some comments 2017-07-29 18:47:35 -04:00
Michael Cook (mackal) e32b6c55e4 Add enum GravityBehavior (FlyMode) from MQ2 2017-07-29 18:23:42 -04:00
Michael Cook (mackal) 4f016de277 More comments to RoF2 Spawn Struct 2017-07-29 18:15:56 -04:00
KimLS 832c31a41a work on navmesh loading 2017-07-29 15:05:56 -07:00
Michael Cook (mackal) 02b7e3fafb Comment spawn struct for RoF2
These should change anything, just useful comments for clean up
2017-07-29 15:37:35 -04:00
KimLS ff13f162ce Forgot to git add so missed a bunch of stuff 2017-07-29 00:12:21 -07:00
KimLS 80f1c65e1c Update fmt lib, add recast, wip on recast pathfinder interface (broken atm) 2017-07-29 00:11:57 -07:00
KimLS 7d3f35d48b Support for v3 path files, removed the movement log stuff, fix for a crash or two 2017-07-27 23:21:45 -07:00
Michael Cook (mackal) 0b11340c4e Forgot show_name for mercs too 2017-07-26 00:58:46 -04:00
Akkadius 898ec8fcf1 Slightly adjust some of the ServerScript pull down logic in world 2017-07-25 11:48:04 -05:00
Akkadius c4d7fb8724 Set indent on print to file 2017-07-25 11:23:13 -05:00
Akkadius b8c0b2c326 Set indent on print 2017-07-25 11:15:21 -05:00
Akkadius 8ec9f36954 Retain spacing on initial convert 2017-07-25 11:10:08 -05:00
Akkadius db0b4045a2 Retain spacing on convert 2017-07-25 11:07:37 -05:00
Akkadius b4a234b1c0 Clean alpha order to Installer JSON config 2017-07-24 23:13:08 -05:00
Akkadius dcfefee060 JSON Installer adjustments 2017-07-24 22:56:57 -05:00
Akkadius 6859d92716 Delete local eqemu_server.pl if force_download 2017-07-24 22:11:13 -05:00
Michael Cook (mackal) f6f3060c9d Fix trap removal 2017-07-24 22:58:58 -04:00
Michael Cook (mackal) 6bf2cf8cb8 Fix aura removal 2017-07-24 22:51:00 -04:00
Michael Cook (mackal) a0140ff943 Fix client UI when auras expire 2017-07-24 15:27:33 -04:00
Michael Cook (mackal) df1e486df6 Fix isquest issue with SQL 2017-07-24 14:35:22 -04:00
Michael Cook (mackal) a0cfba5b3e Fix show_name for bots 2017-07-24 12:32:58 -04:00
Akkadius 84b1a719f2 Few adjustments to maintenance script 2017-07-23 03:39:58 -05:00
Akkadius 734d79d540 Convert some of the installer routines to JSON 2017-07-23 03:36:09 -05:00
Akkadius 2c388117ad Remove db_dumper.pl in conversion and chmod the converter in linux 2017-07-23 03:16:38 -05:00
Akkadius 92a678d0b4 Load config in database_dumper 2017-07-23 03:13:14 -05:00
Akkadius ed1015fa89 Upload utils/scripts/database_dumper.pl 2017-07-23 03:10:36 -05:00
Akkadius 934450b749 Update database dumper script to use json config 2017-07-23 03:09:26 -05:00
Akkadius e025bfdb46 Password adjustment in config load 2017-07-23 02:59:56 -05:00
Akkadius 055daddcaf Read eqemu_config.json into eqemu_server.pl utility script 2017-07-23 02:55:02 -05:00
Akkadius 618252882c Merge branch 'master' into eqemu_config_json 2017-07-23 02:44:35 -05:00
Akkadius efda99c230 Delete old config 2017-07-23 02:41:54 -05:00
Akkadius 8a50039482 Perform a backup of the old config to the backups/ folder 2017-07-23 02:39:19 -05:00
Akkadius 79e825b7c7 How about the raw converters :) 2017-07-23 02:21:24 -05:00
Akkadius ec6b74aa7f Config XML to JSON conversion routines 2017-07-23 02:03:52 -05:00
Akkadius dad6f2ead5 Merge branch 'master' into eqemu_config_json 2017-07-23 00:55:06 -05:00
Akkadius 3b1c663e58 Merge pull request #644 from noudess/master
Repair so that mobs that are fleeing or feared use FixZ.
2017-07-23 00:15:38 -05:00
Michael Cook (mackal) 0624667572 Fix SQL 2017-07-22 21:54:40 -04:00
Michael Cook (mackal) 07c80f9560 Fix SQL 2017-07-22 21:52:51 -04:00
Michael Cook (mackal) 947341a5ee Rename SQL and add manifest 2017-07-22 21:21:15 -04:00
Michael Cook (mackal) 44eef6482c Implement custom aura exit trap type
I thought this type existed on live, but I guess it doesn't
2017-07-22 19:38:49 -04:00
Michael Cook (mackal) f534e69a90 Update SQL 2017-07-22 19:17:05 -04:00
Paul Coene 03399fe3fd Repair so that mobs that are fleeing or feared use FixZ. 2017-07-22 17:57:23 -04:00
Michael Cook (mackal) 51c9cec35a Limit position updates to those that care 2017-07-22 17:35:42 -04:00
Michael Cook (mackal) da660b461f Merge branch 'master' into auras 2017-07-22 17:20:53 -04:00
KimLS 69c6879ac9 Merge fix 2017-07-22 14:20:40 -07:00
KimLS a1ff12d9ab Fix for unreliable packets not being processed or sent correctly 2017-07-22 14:18:30 -07:00
Michael Cook (mackal) 24ab98be4b Merge branch 'master' into auras 2017-07-22 15:47:08 -04:00
Michael Cook (mackal) 49d0c308e8 Limit aura spawns
This is probably not the best performance, but it's the only solution
that is easy to implement.
2017-07-22 15:46:16 -04:00
Michael Cook (mackal) edf1cfefd3 Merge pull request #643 from noudess/master
My "fix" for the fear spell getting dropped caused many fleeing errors
2017-07-22 13:10:21 -04:00
Paul Coene 601e495da7 Merge remote-tracking branch 'upstream/master'
Conflicts:
	zone/fearpath.cpp
2017-07-22 12:48:08 -04:00
Paul Coene e84799e15b Went back to older fearpath, only kept change where pathing issues can't
cause the fear spell to be dropped.
2017-07-22 12:45:21 -04:00
KimLS bdc90ac3a7 Command changes and code cleanup 2017-07-21 20:22:33 -07:00
Akkadius dfdd775519 Merge pull request #640 from noudess/master
Repair fear pathing issues with Z and FEar resists now apply cha adjustments as they should.
2017-07-21 16:54:32 -05:00
Akkadius a36b37b1ea Adjust syntax 2017-07-21 16:53:27 -05:00
Michael Cook (mackal) ceb0fe22f1 Fix OP_UpdateAura handling 2017-07-21 16:25:13 -04:00
Paul Coene aa8a2ea41b Repair fear pathing to ignore Z aspects and allow FixZ and pathing to handle
it.

Added the true flag for ResistCheck.Charisma so the proper Charisma bonuses
are applied.
2017-07-21 14:56:51 -04:00
Akkadius 159fb62898 Merge branch 'master' of https://github.com/EQEmu/Server 2017-07-21 00:46:43 -05:00
Akkadius d8bbd85abb Fix issue with clients logging in locally on the same subnet 2017-07-21 00:46:12 -05:00
Michael Cook (mackal) 57d260f30a Add show_name to auras SQL 2017-07-20 15:18:27 -04:00
Michael Cook (mackal) ef74205503 Add OPs for the rest of the clients with support 2017-07-20 14:38:56 -04:00
Michael Cook (mackal) 89bbf05b63 Add OP_RemoveTrap support 2017-07-20 14:24:35 -04:00
Michael Cook (mackal) 7d5089f5e8 Call RemoveAura now instead of Depop when we need to 2017-07-20 13:24:55 -04:00
KimLS ab33148f81 Some tweaks to wp, basically works 2017-07-20 00:34:58 -07:00
KimLS c2766db89d Working on waypoint code, using boost graph libs 2017-07-19 19:54:26 -07:00
Michael Cook (mackal) f97693f8e1 Work on spawn filtering 2017-07-19 14:52:04 -04:00
Michael Cook (mackal) 034c076882 Merge branch 'master' into auras 2017-07-19 13:09:33 -04:00
Michael Cook (mackal) 12bed1462f Forgot to update manifest last night 2017-07-19 12:59:02 -04:00
Michael Cook (mackal) 79ff4dd944 Merge branch 'master' into auras 2017-07-19 02:19:13 -04:00
Michael Cook (mackal) ec77e3a6fd Add show_name and untargetable to npc_types fixes #637
Note the bodytype hack is still there since I was having issues with
some npcs still showing names
2017-07-19 02:17:08 -04:00
Michael Cook (mackal) 35977b02ed Merge branch 'master' into auras 2017-07-18 22:49:48 -04:00
Akkadius 20b6c2f556 One more NodeLoc compare adjustment 2017-07-18 19:16:41 -05:00
Akkadius 7cda4aaa2c Fix some pathing logic that is using Z to match a node reach when it is error prone in certain scenarios
Fixed a decent amount of path logging
2017-07-18 19:09:28 -05:00
Michael Cook (mackal) 07bdb3a632 Merge branch 'master' into auras 2017-07-18 17:53:04 -04:00
Michael Cook (mackal) fe8c55ac63 Auras now zone 2017-07-18 17:52:39 -04:00
Akkadius a83edb83ba Change eqemu_server.pl to use new map download methodology 2017-07-18 15:26:20 -05:00
KimLS 5f1063acb9 Add pathfinding interfaces, still heavily wip 2017-07-18 00:01:59 -07:00
Michael Cook (mackal) f917a38e1a Fix a few things with auras 2017-07-17 19:35:00 -04:00
Michael Cook (mackal) accc8aee57 Merge branch 'master' into auras 2017-07-17 15:23:50 -04:00
Akkadius 0977471201 Merge pull request #636 from xackery/eqemu_config_json
eqemu_config is now persistent after first load.
2017-07-17 01:13:37 -05:00
Xackery e61e7fd008 eqemu_config is now persistent after first load. 2017-07-16 23:05:09 -07:00
KimLS 596e3b28b5 Actually add the interface files 2017-07-16 22:30:19 -07:00
KimLS 077ba02004 Merge branch 'master' of github.com:EQEmu/Server into wp 2017-07-16 22:30:03 -07:00
KimLS 75ee3b30e2 Support for races up to waypoint node race, wip on interface for pathfinding to support both kinds. 2017-07-16 22:29:52 -07:00
Akkadius 10a27c2081 Merge pull request #635 from xackery/eqemu_config_json
Eqemu config json
2017-07-17 00:00:13 -05:00
Akkadius 78d95cab89 Fix logic loop issue with NPC pathing in zones with .path files, this creates a new rule in place of the old and a new one will be automatically created in the database 2017-07-16 23:55:15 -05:00
Akkadius 7881d6609a Make sure we send client updates for heading or animation changes while still 2017-07-16 22:34:22 -05:00
Akkadius b9336bad7e eqemu_config_json branch creation 2017-07-16 21:51:38 -05:00
Akkadius 84b3cff936 Merge branch 'master' of https://github.com/EQEmu/Server 2017-07-16 21:36:08 -05:00
Akkadius e265f7713c Fix eqemu_server.pl installer to use PEQ quests repo and fix new_server file count check 2017-07-16 21:35:50 -05:00
Michael Cook (mackal) 3312d8c05b Fix swarm pets too 2017-07-16 15:20:57 -04:00
Michael Cook (mackal) 8b5389e719 Fix pet aura 2017-07-16 15:19:10 -04:00
Michael Cook (mackal) 6f2de7d31b Add function for group pet type auras 2017-07-16 13:33:17 -04:00
Michael Cook (mackal) fb208657ea Merge branch 'master' into auras 2017-07-16 12:39:06 -04:00
Akkadius eab6bb8314 Merge pull request #632 from noudess/master
Change message from always saying Logging (In) to Logging in or Logging Out.
2017-07-16 04:53:45 -05:00
Akkadius 0b489bc507 LoS Drop when close adjustment 2017-07-16 04:36:36 -05:00
Akkadius b2b447516d Make a FixZ call at waypoint arrive so bad grids don't make NPC's hop 2017-07-16 03:31:26 -05:00
Akkadius f7cc23d415 Cracked the code on FixZ offsets 2017-07-16 03:21:13 -05:00
Michael Cook (mackal) 6fcd39b4f8 Merge branch 'master' into auras 2017-07-16 01:14:53 -04:00
Xackery 4ed6e20b35 Added xmltojson windows binaries 2017-07-15 21:59:50 -07:00
Akkadius 70a74d6615 Fix for mobs who are hailed while moving - this allows them to properly stop, and return on their grid after pause time 2017-07-15 23:57:08 -05:00
Xackery de7e6e8e66 added xmltojson binaries 2017-07-15 21:46:52 -07:00
Xackery b33f2e5989 added <locked/> and <zone></zone> (empty data) support, all json entries are string. 2017-07-15 21:27:55 -07:00
Michael Cook (mackal) 55c557f227 Add ProcessOnAllFriendlies 2017-07-16 00:26:18 -04:00
Michael Cook (mackal) ab5fe1e518 Merge branch 'master' into auras 2017-07-16 00:09:26 -04:00
Michael Cook (mackal) 10325fed8b Forgot to restore this part 2017-07-15 23:44:18 -04:00
Michael Cook (mackal) 58970282da Fix SQL for real 2017-07-15 23:37:54 -04:00
Xackery 4d12481822 added eqemu_config.json support 2017-07-15 20:29:55 -07:00
Michael Cook (mackal) ff005a22a3 Revert "Fix SQL"
This reverts commit 56c570fd19.
2017-07-15 23:24:11 -04:00
Michael Cook (mackal) 92031bbd70 Add remove aura functions 2017-07-15 23:10:25 -04:00
Xackery d0ef6a5293 added revisions to xmltojson based on source repo changes. 2017-07-15 17:17:36 -07:00
Akkadius f9480f2518 Taper down on non-moving client update spam 2017-07-15 17:05:28 -05:00
Michael Cook (mackal) 56c570fd19 Fix SQL 2017-07-15 14:52:57 -04:00
Paul Coene 0b647c7ae5 Added back SetOnline for logging clients. Not sure it's needed honestly,
but I left it as I found it + the better messages.
2017-07-15 12:09:47 -04:00
Paul Coene 91589eae34 Added back if_player_logging check. 2017-07-15 11:14:28 -04:00
Paul Coene 89a5a45d7e Fix logging in compare. 2017-07-15 10:27:51 -04:00
Paul Coene 06b91a6e01 Removed some instrumentation. Added a comment/observation. 2017-07-15 09:54:04 -04:00
Paul Coene 19bee763bd Make world messages about logging in and logging out more detailed.
Previously logging in (from desktop) and out (from game) both of which
land you at char select both said Logging (In).  Now it tells you which
is occuring.

There really is no Logging Out Compleetely message - not sure where that could
or should be added.
2017-07-15 09:36:43 -04:00
Michael Cook (mackal) b0710ff8d1 Add SQL to add all but rogue auras 2017-07-15 02:19:29 -04:00
Michael Cook (mackal) 2342caff32 Update for changes on master 2017-07-14 23:15:37 -04:00
Michael Cook (mackal) e05a45f6c7 Merge branch 'master' into auras 2017-07-14 23:14:13 -04:00
Michael Cook (mackal) c7e33eb6b9 Fix totems issue and add despawn
Despawn should tell client ... still TODO
2017-07-14 23:13:33 -04:00
Akkadius 6c1efd74cb Resolve an issue with NPC's not returning back to guard point when once engaged and dropped aggro 2017-07-14 21:45:38 -05:00
Akkadius 43204e52f8 Client position updates should be smoother (granted the client has a good connection)
Clients should also no longer randomly disappear
2017-07-14 20:49:57 -05:00
Michael Cook (mackal) 2a7a88ff47 Implement some trap functions 2017-07-14 18:27:57 -04:00
Michael Cook (mackal) 6580aad173 Merge branch 'master' into auras 2017-07-14 15:52:36 -04:00
Michael Cook (mackal) 574a5e303c Aura "OnAllGroupMembers" won't cast instant spells on entering area
Ex. The bard regen auras just cast on a timer
2017-07-14 15:50:57 -04:00
Akkadius 5c75a68715 HP Update tuning - HP Updates are now forced when a client is targeted 2017-07-14 14:23:35 -05:00
Michael Cook (mackal) ee618f70ab Add support for setting cast_time of aura 2017-07-14 13:49:32 -04:00
Michael Cook (mackal) 94038ebb75 WIP on auras
Lots to do still

Normal buffing auras currently work for the most part
2017-07-14 02:05:35 -04:00
Akkadius be0374d197 Performance adjustment to SendPosition update logic 2017-07-13 00:52:42 -05:00
Akkadius c8b20ecb1a Adjust switch case formatting in daybreak_connection.cpp 2017-07-12 22:01:59 -05:00
Akkadius 45b29aedf3 Bring back netcode to robust commit 34549a4 - proven and tested by PEQ and EZ as solid/stable with all of recent packet fixes 2017-07-12 21:49:30 -05:00
Akkadius 855796448c Raid/Group/XTarget HP/Mana/Endurance updates now only send when percentage changes
Raid/Group Mana/Endurance updates should now update real-time once again
Fixed an issue with clients looking like they are 'skipping' when they are moving in view of another client
Fixed an issue with NPC's who are ghosted in plain view of a client when they are not really there
2017-07-11 17:54:46 -05:00
Paul Coene 0153726755 Merge remote-tracking branch 'upstream/master' 2017-07-11 18:27:11 -04:00
Akkadius d47daa2857 Pointer removals 2017-07-11 02:42:06 -05:00
Akkadius d9a1cf8c7b Safeguard to npc aggro scanning 2017-07-11 02:08:00 -05:00
Akkadius 59a2f0cdde Refactor close_npcs to close_mobs for future implementations 2017-07-11 01:58:47 -05:00
Xackery a6e2110f3d Removed test config files 2017-07-10 22:49:33 -07:00
Xackery 9296f2bdc5 Added xmltojson 2017-07-10 22:48:00 -07:00
Akkadius ec00daa5be Mob position updates now completely only send to 600 units range defined by Range:MobPositionUpdates
Client updates nearby clients more often because they will disappear after 10 seconds without a position update to the client
This results in a massive reduction in unnecessary traffic as we only update clients of their relevance around them
This also resembles live-like packet sending behavior of positions
2017-07-10 23:03:40 -05:00
Akkadius dceb79ad69 Only send mana/endurance updates to self when they actually change 2017-07-10 22:57:58 -05:00
Akkadius a41c690a62 Another animation adjustment 2017-07-10 22:27:03 -05:00
Akkadius 62e4169e50 More animation packet reductions, DoAnim is called in many other places in combat than just AttackAnimation 2017-07-10 20:41:56 -05:00
Akkadius 122e71f4a3 Fix HP/Mana/Endurance updates for group/raids when entering-leaving zone and when initially being added to group/raid 2017-07-10 20:40:32 -05:00
Akkadius c6c6d00bad #path process file_name.path will actually push to the maps/ directory by default now 2017-07-10 10:42:07 -05:00
Akkadius ccdeb4d385 Fix HP update issues, rework logic for more accurate and responsive HP updates 2017-07-09 17:35:08 -05:00
Paul Coene b7338d5bf0 Merge remote-tracking branch 'upstream/master' 2017-07-09 09:43:13 -04:00
Akkadius 127f51e758 Massive reductions in unnecessary network traffic especially during high spam combat fights
- HP Updates now only send to others when HP percentage changes (0-100%)
		- HP Updates were sending excessively even during idle zones when HP wasn't changing at all
	- Attack animations now only send once per second versus up to a hundred times a second per Mob/Client
	- 17,000 OP_ClientUpdate packets per second have been observed in combat scenarios, some of the major culprits have been
		throttled without affecting what the client should see
	- Before and After packet differences under similar load/tests (Packets per second)
		- 7,000 - 8,000 	OP_Animation pps	After: 600-800 pps
		- 13,0000 - 17,000 	OP_MobHealth pps	After: 1-10 pps
		- 15,0000 - 20,000 	OP_ClientUpdate pps	After: 500-1,000 pps
	- Packet reports from a 46 client test here:
		https://gist.github.com/Akkadius/28b7ad2fdd82bdd15ea737c68f404346
	- Servers who use Marquee HP updates will also recieve far less packet spam as they will only be sent when HP changes
2017-07-09 02:51:01 -05:00
Akkadius aae1d2f049 Better Z compensation on hills, while engaged and NPC's quickly recover if they go underground 2017-07-08 22:17:39 -05:00
Paul Coene 9c88dda251 Merge remote-tracking branch 'upstream/master' 2017-07-08 17:20:23 -04:00
Michael Cook (mackal) 900a5f83da Merge pull request #628 from noudess/master
Allow pets to use the better of db/oocregen if oocregen rule on.
2017-07-08 17:16:40 -04:00
Akkadius 0c532236a5 Fix Server -> Client packet logging 2017-07-07 14:59:01 -05:00
Paul Coene bebab942cc Merge remote-tracking branch 'upstream/master' 2017-07-07 09:28:20 -04:00
KimLS 58c15b0287 Merge branch 'master' into eqstream 2017-07-06 18:15:11 -07:00
KimLS bfae4273c2 Merge branch 'master' of github.com:EQEmu/Server 2017-07-06 18:15:02 -07:00
KimLS 7300776a85 Fix for bug where packets were not combining when sent inside cwnd, altered some settings 2017-07-06 18:03:19 -07:00
KimLS 3878bd0c76 Move to an older implementation 2017-07-06 17:25:00 -07:00
Akkadius 786e03b0ac One more check 2017-07-06 10:33:03 -05:00
Akkadius f8b5637112 Fix close combat positioning issues 2017-07-06 10:13:33 -05:00
Paul Coene 2f4944ca21 Merge remote-tracking branch 'upstream/master' 2017-07-06 08:06:20 -04:00
KimLS a7c0e82c9e Tweaks and bug fixes 2017-07-05 20:24:39 -07:00
Paul Coene 5542107f02 Remove names 2017-07-05 21:26:10 -04:00
Akkadius 94b5684b42 Fix fighting on hill issues 2017-07-05 18:59:43 -05:00
Paul Coene 4a84c311b2 Change to allow pets to use better of db/oocregen if oocregen is turned
on in the rule_set.
2017-07-05 18:26:50 -04:00
KimLS 49505a7a45 Bug fix plus tweak to reset cwnd when no longer needed 2017-07-04 21:03:49 -07:00
KimLS 10b01e62df More tweaks 2017-07-04 12:45:23 -07:00
Michael Cook (mackal) eff8000196 Fix PB AE 2017-07-04 13:01:34 -04:00
KimLS c6bb4a6470 Some tweaks 2017-07-03 21:31:25 -07:00
Akkadius 3dcc2edceb Add rule Spells:ReflectMessagesClose - Live functionality is for reflect messages to show to players within close proximity, false shows just player reflecting 2017-07-03 19:55:28 -05:00
Akkadius cfd2f8776e More Z fixes 2017-07-03 19:36:35 -05:00
Michael Cook (mackal) d11e2410bf Don't need the center check anymore 2017-07-03 17:46:16 -04:00
Akkadius 83605831ec Remove some of the legacy Z adjust functions conflicting with newer changes 2017-07-03 14:27:11 -05:00
Akkadius aed1959dbe Fix issues with underground NPC corpses - add command #fixcorpses to fix nearby NPC corpses of the player (this should be a seldom need) 2017-07-03 01:53:41 -05:00
Akkadius c3c60b331a Resolve issues with NPC's hopping to the ceiling in small corridors
Improved grounding issues with NPC's during combat
Improved scenarios where NPC's need to be dragged out of the ground - they should correct themselves far more consistently
	- Scenarios where an NPC is coming up from the bottom floor, or from the top floor, they will correct much better
	- A video of these tests can be found here: https://www.youtube.com/watch?v=HtC7bVNM7ZQ&feature=youtu.be
2017-07-01 15:57:41 -05:00
KimLS 15606a99fc Merge branch 'eqstream' of github.com:EQEmu/Server into eqstream 2017-07-01 13:47:04 -07:00
KimLS eddc9c9baf Only increase cwnd when full, fiddled with formulas 2017-07-01 13:46:39 -07:00
Akkadius 7bbc4a6a44 Merge branch 'master' into eqstream 2017-07-01 03:15:18 -05:00
Akkadius 1f39a0cb3e Fix some NPC and Corpse falling through the ground issues 2017-07-01 03:07:45 -05:00
KimLS 8d680b2222 Some changes 2017-06-30 22:40:05 -07:00
Michael Cook (mackal) 21ef83bcbe Fix /invite xtarget raid issue 2017-06-30 13:50:43 -04:00
KimLS 6253162166 Change settings 2017-06-29 14:15:11 -07:00
KimLS 1110b284d8 Merge branch 'master' of github.com:EQEmu/Server 2017-06-29 14:14:24 -07:00
KimLS 5c6f684808 Some work on congestion avoidance now uses a sliding congestion window instead of a static one 2017-06-29 14:13:55 -07:00
Akkadius 9b1a449fba Fix Z when following during pull, not when engaged and stationary or moving slightly 2017-06-28 21:44:31 -05:00
Akkadius e4f337edb6 Merge branch 'master' of https://github.com/EQEmu/Server 2017-06-28 21:23:18 -05:00
Akkadius 5a9744b429 Add a fail-safe for dynamic zone shutdown timers 2017-06-28 21:23:02 -05:00
Michael Cook (mackal) e0237ce526 Quick fix for AE LOS issue 2017-06-28 19:58:28 -04:00
Akkadius 4d2825d817 Make sure we also fix Z when mobs flee up/down stairs 2017-06-28 16:43:38 -05:00
Michael Cook (mackal) 09ccd23d0b Fix syntax issue 2017-06-28 13:30:20 -04:00
Michael Cook (mackal) cbbd01b391 Quick fix for NPC attack skill issue 2017-06-28 13:28:08 -04:00
Akkadius 539fa8b262 Fixed issues with Z correctness when NPCs are pathing on normal grids
Fixed issues with Z correctness when NPCs are engaged with players following
NPC corpses should fall into the ground far less
2017-06-28 02:38:20 -05:00
Michael Cook (mackal) 592bbd3180 Target AEs don't always hit target 2017-06-27 20:38:46 -04:00
Michael Cook (mackal) b09792812a Final AESpell optimization pass 2017-06-26 15:01:06 -04:00
Akkadius 9154938827 Merge branch 'master' of https://github.com/EQEmu/Server 2017-06-26 00:13:23 -05:00
Akkadius 4f7b8e0934 Add Critical Hit range (default 80) to legacy_combat.lua and fix a variable in Pet Criticals 2017-06-26 00:12:56 -05:00
Akkadius c0f53647b8 Revert 5fac13075b until we don't creep client resend up to 4 seconds so quickly, this causes issues in higher traffic amounts and takes longer for clients to recover than needed 2017-06-25 20:37:37 -05:00
Michael Cook (mackal) 3e1b75b814 Fix Rain target limit (massive nerf)
Added rule Spells:OldRainTargets, set to true if you don't want the nerf
2017-06-25 18:18:27 -04:00
Michael Cook (mackal) 497170c453 Optimize Entity::AESpell
Probably could use more work, but quick testing had this method taking
the least amount of time in various situations
2017-06-25 16:30:37 -04:00
Akkadius 6773412e40 Merge branch 'master' of https://github.com/EQEmu/Server 2017-06-24 21:13:31 -05:00
Akkadius 1c8dea909e New rules made by developers are now automatically created when world boots up, this keeps from having to issue schema SQL updates every time rules are added.
- Whenever a rule isn't present in the database, it will be automatically created
- utils/sql/git/required/2017_06_24_rule_values_expand.sql required for avoid floating point value inserts
2017-06-24 21:11:46 -05:00
KimLS d6ac686a54 Merge branch 'master' of github.com:EQEmu/Server 2017-06-24 18:29:52 -07:00
KimLS 5fac13075b Up resend delay max a few seconds 2017-06-24 18:29:18 -07:00
Akkadius 6cc774faf4 Adjust netcode variables proven to be stable for players 2017-06-24 20:10:12 -05:00
Akkadius 8f4ec1b960 Merge branch 'master' of https://github.com/EQEmu/Server 2017-06-24 20:07:31 -05:00
Akkadius 357be65a69 Speed up saylink retrieval x 1,000 - helpful for dialogues, plugins with many saylinks 2017-06-24 20:07:01 -05:00
Michael Cook (mackal) f164833b00 Adventure Merchants don't change heading either 2017-06-24 15:07:58 -04:00
Michael Cook (mackal) 627859ba73 Merchants don't change heading 2017-06-24 14:58:40 -04:00
KimLS a7c239b801 Some changes to the outbound queue and default settings 2017-06-23 21:52:28 -07:00
KimLS 1cabb091e7 Added packet buffering for dbg connections to avoid connections sending a ton of packets at once 2017-06-22 22:26:12 -07:00
Akkadius d0e612b5ff Fix some lua calls/variables in legacy_combat.lua 2017-06-20 02:31:29 -05:00
KimLS 0a8b21d4ab Merge branch 'luamod' 2017-06-19 14:45:08 -07:00
KimLS b0cef869b5 Fix bot compile 2017-06-17 19:40:54 -07:00
KimLS 16cbf9bbf1 Allow rule access from lua, double checked and fixed up the spell mitigation stuff 2017-06-17 16:41:32 -07:00
KimLS 70b3a7ba84 Invert only spell bonus migitation 2017-06-17 12:46:57 -07:00
KimLS 8df8d7c3f6 Bugs in mod return values fixed 2017-06-16 23:12:54 -07:00
Akkadius 27fd6316f1 Merge pull request #624 from noudess/master
Fixed a typo in #object command query and fixed a fishing bug.
2017-06-15 17:15:34 -05:00
Michael Cook (mackal) 4e15364d42 Fix auto completing to wrong thing ... 2017-06-13 21:48:02 -04:00
Michael Cook (mackal) 35c194e2eb Fix SE_FcSpellVulnerability 2017-06-13 21:33:42 -04:00
Michael Cook (mackal) 0c5c6587e5 Fix resist focus issue 2017-06-13 21:30:34 -04:00
Michael Cook (mackal) b5a81fbd07 Fix life burn
Need to investigate more, but reuse
2017-06-13 14:00:09 -04:00
KimLS 233ce5cf03 Fix for bad signature on this func 2017-06-12 16:37:25 -07:00
KimLS f79f54920d Export needed fns 2017-06-12 14:14:39 -07:00
Michael Cook (mackal) 0a0d4fbb70 SE_SpellResistReduction should be RNG
I think before there was an implied 1 to base now it's base to base2
2017-06-12 16:57:35 -04:00
KimLS b29f70ad3f Add mod hook for CommonOutgoingHitSuccess 2017-06-12 13:01:01 -07:00
Michael Cook (mackal) c1669299aa Merge pull request #626 from Natedog2012/master
Add CrossZoneSetEntityVariableByClientName
2017-06-12 13:47:23 -04:00
Natedog2012 d62219d0ad Add CrossZoneSetEntityVariableByClientName to lua as well 2017-06-12 10:22:14 -07:00
Natedog2012 59ddf507e6 Add CrossZoneSetEntityVariableByClientName 2017-06-12 08:42:14 -07:00
KimLS b4837011ea Actually fix load order line ending bug 2017-06-11 16:13:03 -07:00
KimLS 995a4527da Some changes to directory code to help it compile on newer gcc compilers 2017-06-10 22:23:27 -07:00
Michael Cook (mackal) 4d94d5fe17 Merge pull request #625 from KinglyKrab/master
Implement EVENT_USE_SKILL in Perl/Lua.
2017-06-10 23:01:09 -04:00
Kinglykrab d64f2e40c5 Implement EVENT_USE_SKILL in Perl/Lua.
- Exports skill_id and skill_level in Perl/Lua whenever a skill is used (bash, kick, taunt, etc.)
2017-06-10 22:20:45 -04:00
KimLS 6575d106de Fix bug in critical hit for pets 2017-06-10 19:17:05 -07:00
KimLS 31d8336b4b Fix acceptmessages, added exp hooks to luamods 2017-06-10 15:12:31 -07:00
Paul Coene 75d7c40098 Merge remote-tracking branch 'upstream/master' 2017-06-10 11:28:12 -04:00
Paul Coene 7c377e8904 Fix typo on database call in #object.
Fix issue with fishing.. Search needs to search from my z for full line length
not for only the diff between my feet and the possible water location.
2017-06-10 11:25:09 -04:00
KimLS c83810be36 Add combat mod example implementation 2017-06-08 20:11:20 -07:00
KimLS 4d8f5df261 Merge branch 'master' into luamod 2017-06-08 19:55:48 -07:00
KimLS d6890ad76d More changes 2017-06-08 19:55:25 -07:00
Michael Cook (mackal) c25a5fa0ba AC/ACv2 negative affects don't affect stacking fixes #622
Unsure if these are the only SPAs that should act this way, but this
resolves the issues we were seeing
2017-06-08 00:54:22 -04:00
Natedog2012 decaa1f7b6 Fix mismatch on Popup2 for Buttons / Duration (oops)
$client->Popup2("Title", "Text", YesID, NoID, Buttons, Duration, Button0, Button1);

YesID / NoID are the "popupid" for EVENT_POPUPRESPONSE depending on the players choice
2017-06-03 16:41:34 -07:00
Natedog2012 daced25101 Add Popup2 .. allows for more customization of the popup window. Using PlayMp3 with the SoundControl option for Popup2 enabled will allow you to adjust sound volume as well. 2017-06-03 16:17:50 -07:00
Michael Cook (mackal) fd6387c830 Fix mana pres math 2017-05-25 12:45:17 -04:00
Michael Cook (mackal) c69df29345 Fixed some idiot's mistake 2017-05-24 22:15:54 -04:00
Michael Cook (mackal) b793f3d9ca Whoops, lets make use of the calced focus effect 2017-05-24 22:12:23 -04:00
Michael Cook (mackal) 7781dc6ffe Remove double RNG for mana pres
This still may not be 100% correct, but it may give us the correct average
savings, but for more work than we need to do, but I don't need to
rewrite code! Yet.
2017-05-24 22:04:43 -04:00
Michael Cook (mackal) 962fcc2e8a Modernize Specialization mana savings
No idea how it worked in the past, this matches live and our AAs
assume we're on new system so fuck the old code.
2017-05-24 20:34:15 -04:00
KimLS 7189994b78 Many lua things many many things 2017-05-19 22:50:08 -07:00
Michael Cook (mackal) 6bdcfaaa71 Forgot ST_SummonedPet 2017-05-18 12:59:23 -04:00
Michael Cook (mackal) 5eba112b7a Fix Crash introduced in last patch 2017-05-18 12:57:04 -04:00
Michael Cook (mackal) 5865948a8b Fix ST_Pet item/AA casts
Modern clients don't require the pet to be targeted
2017-05-17 15:20:27 -04:00
Michael Cook (mackal) 9277665f5f Fix consumption
Ahh not too sure why this is needed. We used the other field before
and the client is still displaying correct item clicky cast times
as well as food duration string ... Oh well
2017-05-17 15:03:14 -04:00
KimLS 4067397697 Merge branch 'master' into luamod 2017-05-15 23:18:28 -07:00
KimLS 28fd766278 Export many things 2017-05-15 15:46:19 -07:00
Natedog2012 abeeb80727 Fix SE_ResourceTap where 1000 base is 100% and math fix (ty kayen) 2017-05-13 07:30:57 -07:00
Michael Cook (mackal) 82776deb89 Pet commands only reply to master now (except leader) 2017-05-05 23:52:54 -04:00
Michael Cook (mackal) 6e70d12b0a Add Mob::SayTo_StringID so we don't have to spam 2017-05-05 23:45:14 -04:00
Michael Cook (mackal) d6b61b9163 Implement pet regroup
Tweaks to stop as well
2017-05-04 23:48:47 -04:00
Michael Cook (mackal) 0e96e6689a Pet stop does not clear aggro 2017-05-04 23:08:46 -04:00
Michael Cook (mackal) fe9fb72dff Update pet command messages 2017-05-04 22:55:17 -04:00
Michael Cook (mackal) 7e2136a5a8 Implement Pet Command Stop 2017-05-04 22:28:48 -04:00
Michael Cook (mackal) 9f8ad1a32c Fix pets ghosting if moving when you hit guard 2017-05-04 20:23:42 -04:00
Michael Cook (mackal) 15d81eee21 Remove unnecessary CastToNPC in PetCommands 2017-05-04 19:42:13 -04:00
Michael Cook (mackal) 84bcb3ac03 Use PetCommands SPA instead of GetAA 2017-05-04 17:48:32 -04:00
Michael Cook (mackal) 04cf511e4f Clean up older clients PetCommand translations 2017-05-04 15:41:00 -04:00
Michael Cook (mackal) 21f02f4ce4 Move pet command/button defines to common.h
I didn't want to include pets.h everywhere
2017-05-04 13:36:08 -04:00
Akkadius c1ee88a90e Update eqemu_server.pl to use wget for windows for more reliable web requests that don't hang infinitely [skip ci] 2017-05-04 01:57:27 -05:00
Michael Cook (mackal) 8435fa269d Pet Command hack for UF+ 2017-05-04 01:39:24 -04:00
Michael Cook (mackal) 797c35230f Screw bots! do later 2017-05-04 01:18:33 -04:00
Michael Cook (mackal) 2a97d980b7 Make TemporaryPets take into account pet power 2017-05-04 01:13:41 -04:00
Michael Cook (mackal) 9229ca4f79 Add OP_PetCommandState for ghold/hold 2017-05-04 00:27:42 -04:00
Michael Cook (mackal) b3d8bcab4a More pet command changes
Tweaks to attack
Initial implementation of ghold
Tweaks to hold
2017-05-03 23:41:06 -04:00
Michael Cook (mackal) 14c9ddf15a Change pet attack to be live like
Classic behavior will be restored as a rule at a later date
2017-05-03 17:27:29 -04:00
Michael Cook (mackal) 3ca8ddbff1 Nuke PET_SLUMBER since they're wrong 2017-05-03 17:05:58 -04:00
Michael Cook (mackal) baca139f9b /pet leader should only cause NPCs to respond
Client also checks if it's an NPC so we got other bugs here ...
Shouldn't ever be sending this packet with a client targeted ...
2017-05-03 16:35:04 -04:00
Michael Cook (mackal) 34c535ef81 Fix Pet Equipment Sets 2017-05-01 15:11:57 -04:00
KimLS 0fd6815f81 Mods get their own file so i can take the big chunks of code out of lua parser 2017-04-30 00:30:23 -07:00
Michael Cook (mackal) 682dc35d80 Update README.md [skip ci] 2017-04-29 16:30:52 -04:00
Michael Cook (mackal) cfd1b9a5ee SoS message is only if they would otherwise see you 2017-04-28 13:52:16 -04:00
Michael Cook (mackal) 89587970dd Add invis messages 2017-04-28 13:37:54 -04:00
Michael Cook (mackal) 4ab420ed99 Quick fix for RoF+ AugDistiller 0
This needs more work, but it works for now
2017-04-27 13:36:02 -04:00
KimLS 8d391a7e3f Daybreak connection setting tweaks 2017-04-26 22:58:36 -07:00
KimLS 6d59baffaf Basic mod setup only supports combat hooks for now I'll add a few more before i push this 2017-04-26 22:56:18 -07:00
Michael Cook (mackal) 34549a4bdb Change clientpackets to std::deque from LinkedList
This should be better performance, but I couldn't really
push local testing to hit the performance issues ...
2017-04-25 02:13:31 -04:00
Akkadius 757c7f5b00 Merge pull request #615 from N0ctrnl/patch-4
Sodium library install on Debian
2017-04-24 21:31:56 -05:00
Kurt Gilpin 8a6c37f2d4 Sodium library install on Debian 2017-04-24 21:29:36 -05:00
KimLS 78a73cab85 Work on lua parser 2017-04-23 21:58:56 -07:00
Akkadius 69fd5cd249 Merge pull request #613 from Natedog2012/master
Fix effects over int16 on items and fix aeduration spells
2017-04-23 19:49:56 -05:00
Akkadius 051fd1b77b Merge pull request #614 from N0ctrnl/patch-3
Update Fedora package install method
2017-04-23 19:36:47 -05:00
Kurt Gilpin 05ee69de55 Added Sodium libraries to Ubuntu/Debian 2017-04-23 15:53:29 -05:00
Kurt Gilpin 208918b57f Added Sodium libraries to FC25 2017-04-23 15:19:40 -05:00
Kurt Gilpin 3320207086 Install uuid dev package 2017-04-23 14:56:22 -05:00
Kurt Gilpin f75e48b1e7 Update Fedora package install method
Split each package install out to its own line. This will cause the install to iterate though the package manager for each package installation. This will take a bit longer but will be less stringent. A package can be missing and not cause the others to fail.
2017-04-23 12:52:47 -05:00
Michael Cook (mackal) e15f8a2cb6 Fix some OOZ group disband issues 2017-04-23 13:26:21 -04:00
Natedog2012 ba9f33cf56 Merge branch 'master' of git://github.com/EQEmu/Server 2017-04-23 02:04:50 -07:00
Natedog2012 36be32f36f Change item effects to int32
Check range on AEDuration spells
2017-04-23 01:57:08 -07:00
KimLS 7606ca2a0c Missed dir files 2017-04-22 16:40:34 -07:00
KimLS 3b62cf9fd5 Some work 2017-04-22 16:40:01 -07:00
KimLS 4d39c76c19 Remove some unused opts 2017-04-21 17:59:53 -07:00
Akkadius 77a2a249c2 Update README.md 2017-04-20 16:22:45 -05:00
Akkadius bba646a2c6 Merge pull request #612 from N0ctrnl/patch-2
Added wget to Debian/Ubuntu section
2017-04-19 19:45:12 -05:00
Kurt Gilpin f2b9c1a247 Added wget to Debian/Ubuntu section
Ubuntu 17 doesn't seem to have wget installed on a minimal installation. Added a line to install it.
2017-04-19 19:24:21 -05:00
KimLS cfd7e9f4d3 Crash fix for trying to write a 0 length packet to another packet. 2017-04-18 20:14:30 -07:00
KimLS a834ec92a5 Fix for openssl find on win 2017-04-18 20:06:40 -07:00
regneq 5a88ea6950 Merge pull request #7 from EQEmu/master
eqemu
2017-04-18 17:24:52 -07:00
KimLS da974e3b9e Merge branch 'master' of github.com:EQEmu/Server 2017-04-18 14:19:00 -07:00
KimLS 94f55d9304 OpenSSL for windows look in dependencies folder 2017-04-18 14:18:43 -07:00
Michael Cook (mackal) 6c6b1dcc98 Add a lua table overload for Lua_Client::QuestReward
This is a bit more user friendly :P
2017-04-18 14:09:28 -04:00
regneq 9841ca233d Merge pull request #6 from EQEmu/master
Fix for bug in clearance() world method
2017-04-16 21:13:41 -07:00
KimLS be2d65609b Fix for bug in clearance() world method 2017-04-16 21:06:05 -07:00
regneq 999677d314 Merge pull request #5 from EQEmu/master
eqmeu merge
2017-04-16 18:50:03 -07:00
KimLS 7fb3eaed65 Reduce travis threads 2017-04-16 18:44:12 -07:00
KimLS e0c9b6ded5 Change travis 2017-04-16 18:32:32 -07:00
KimLS 633b7e2a6c Added changelog for eqstream 2017-04-16 17:58:10 -07:00
KimLS cebda984b6 Sleep longer when zone not booted 2017-04-15 13:55:26 -07:00
KimLS 004c0f7858 Merge fix 2017-04-15 12:18:50 -07:00
Michael Cook (mackal) 7cedbb0b16 Take into account world object's item if it has one for TS
This might break some pre-existing combines ...
2017-04-15 14:31:36 -04:00
E Spause 1f065d7d3d Woops 2017-04-15 13:06:56 -04:00
E Spause cb8c3595b7 SoF-era con system. New rule, UseOldConSystem to disable this functionality. 2017-04-15 13:06:46 -04:00
KimLS 984b50504c Change zone timer resolutions based on zone having players or not 2017-04-14 16:59:37 -07:00
KimLS eec6687083 Modified default values a bit to be more agggressive 2017-04-14 16:24:29 -07:00
KimLS 6596dfeeba Tweaks to how resend is calculated to help our friends with smoke signal connections 2017-04-13 19:40:58 -07:00
Akkadius 989a638693 Merge pull request #608 from spdkils/BotXTarget
Adding AutoXTarget for bot owner when hate is added to bot's owner.
2017-04-13 18:20:28 -05:00
Akkadius 15f8683530 Merge pull request #606 from spdkils/master
** Fix for groups with multiple players and bots.
2017-04-13 18:13:56 -05:00
Unknown 21d3e5afac Adding AutoXTarget for bot owner when hate is added to bot's owner.
Bots did not add XTargets, but add hate to client(). This ensures when bots generate hate for client() they also add the mob to the XTarget of the owning Client().
2017-04-13 16:05:10 -07:00
Michael Cook (mackal) 1e61252445 Whoops 2017-04-13 13:28:18 -04:00
Michael Cook (mackal) 53978f0ef9 Exclude client pets from MQ2 target detection
Probably could use some PVP rules but what do I know :P
2017-04-13 13:27:55 -04:00
Michael Cook (mackal) 3098b11080 Limit scale check to only scaling items 2017-04-13 13:26:51 -04:00
Michael Cook (mackal) 6b8c39d388 Disable charm clicks at <= 0 2017-04-13 13:23:53 -04:00
Akkadius 474f59e269 Re-add variable client aggro scanning timers missing from merge 2017-04-12 16:44:49 -05:00
Akkadius fac75b6f16 Fix merge issue with Marquee check 2017-04-12 16:26:16 -05:00
Allen f88a6774a9 ** Fix for groups with multiple players and bots.
*  Fixes non-group leaders zoning with their bots.
*  Fixes non-bot owners attempting to load bots they don't own.
*  Sets bots that zone to follow owner not group leader.
*  Updates database call only load bots in group you own.
*  Tested on server 2 clients, 4 bots, all permutations of zoning.
2017-04-12 00:54:37 -07:00
KimLS db64e39651 Missing sleep def on linux 2017-04-11 22:04:49 -07:00
KimLS 95a8603a73 Error in console 2017-04-11 22:00:47 -07:00
KimLS 1d1ee1ccbf Merge fix 2017-04-11 21:48:01 -07:00
KimLS a632d60140 Redo timing on movement and missiles to better match our new tic rate 2017-04-11 21:47:00 -07:00
Akkadius 478a9d115b Merge branch 'master' of https://github.com/EQEmu/Server 2017-04-10 19:55:38 -05:00
Akkadius b5b6145786 Fix initialization issues with loading 'disable_timer' from the database for doors 2017-04-10 19:55:17 -05:00
Michael Cook (mackal) 08111ac176 Fix door functions 2017-04-10 14:52:44 -04:00
Akkadius 080f6c5c3e Merge pull request #605 from AthrogatePEQ/master
Graveyards!!!
2017-04-10 13:06:52 -05:00
Athrogate 421b3bb277 Graveyards!!! 2017-04-10 11:03:36 -07:00
KimLS 18d28ae8d3 Console initial implementation 2017-04-09 20:17:48 -07:00
Michael Cook (mackal) 11e56e72d0 Fix lua killed_merit issue 2017-04-09 02:16:23 -04:00
Uleat 6ae2ff2b75 Added disable_timer checks to doors override functions 2017-04-08 22:35:37 -04:00
Uleat 58e1d9501d Added 'disable_timer' to door objects (used for click once doors) 2017-04-08 21:08:15 -04:00
Michael Cook (mackal) d36f1159fb Add SendBeginCast to Lua API 2017-04-08 02:07:08 -04:00
Michael Cook (mackal) b4bab425f5 Refactor OP_BeginCast into it's own function 2017-04-08 02:06:49 -04:00
Akkadius 2030278116 Fix manifest for Robregen [skip ci] 2017-04-07 22:09:20 -05:00
Akkadius f9ecabfdcf Merge pull request #597 from regneq/master
Added ignore_despawn column to npc_types to have NPCs ignore the despawn timer.
2017-04-07 22:01:07 -05:00
regneq 09f5174299 added a missing version number in version.h 2017-04-07 19:54:13 -07:00
regneq 5ff271d583 fixed a copy and paste error from previous commit. 2017-04-07 19:49:18 -07:00
regneq 4600844336 Added ignore_despawn column to npc_types to have NPCs ignore the despawn column in spawngroup. 2017-04-07 19:45:26 -07:00
regneq 75d759fb77 Merge pull request #4 from EQEmu/master
Fix for Loginserver log messages
2017-04-07 16:05:30 -07:00
KimLS 3acd845a79 Remove some logging that's not needed anymore and fix a bug when data rollover happens that can cause the connection to not internally ack packets and then disconnect. 2017-04-05 19:51:06 -07:00
KimLS 8509f05f0a Console wip, change how we send acks back to some old behavior 2017-04-04 23:21:32 -07:00
Akkadius 9161921bf0 Fix for Loginserver log messages 2017-04-04 22:07:25 -05:00
regneq e3e6889a30 Merge pull request #3 from EQEmu/master
merge from eqemu
2017-04-04 17:53:41 -07:00
Michael Cook (mackal) 75950b0f2b Spell Reflect messages go out to everyone close 2017-04-04 15:00:54 -04:00
Uleat c3ce0a5df5 Added mob version lookup pointer to class InventoryProfile 2017-04-03 21:19:55 -04:00
KimLS 281483efc1 Merge of a monster 2017-04-02 20:03:51 -07:00
Uleat 5d9a89dcd1 Damn base values... 2017-04-02 16:21:13 -04:00
Uleat 23115ca177 Disabled deity checks in item swaps until issue is 100% resolved 2017-04-02 15:35:13 -04:00
Uleat 8133de4bb4 Merge branch 'master' of https://github.com/EQEmu/Server 2017-04-02 13:23:32 -04:00
Uleat 13af1bfe6f Added messages for item equip failures 2017-04-02 05:06:13 -04:00
Akkadius d7dfc18c54 Cleaned up some of the NPC to NPC aggro code, only do aggro checks to other NPC's when the NPC is flagged for it 2017-04-01 23:16:27 -05:00
Uleat e5e801dad5 Merge branch 'master' of https://github.com/EQEmu/Server 2017-04-01 23:00:24 -04:00
Uleat ea50543ffa First round fix for non NPC-on_NPC action 2017-04-01 23:00:16 -04:00
KimLS 9750d09635 Change default settings and removal of unacked packets for now 2017-04-01 17:25:48 -07:00
Michael Cook (mackal) 773932d8f6 Whoops 2017-04-01 17:55:17 -04:00
Michael Cook (mackal) c5e7b18637 Exclude client pets from MQ2 target detection
Probably could use some PVP rules but what do I know :P
2017-04-01 17:50:27 -04:00
Uleat 160cd609bf Merge branch 'master' of https://github.com/EQEmu/Server 2017-04-01 17:40:27 -04:00
Uleat 60d2c703b6 Hack fix for an outdated inventory function 2017-04-01 17:40:18 -04:00
Michael Cook (mackal) 484e60f142 Use do-while(0) trick for function like macros 2017-04-01 16:46:23 -04:00
Michael Cook (mackal) de52d2f64a You can skill yourself up in languages
This is very easy to test with mercs now
2017-04-01 14:26:35 -04:00
Akkadius 52a43a3edb Fix Travis 2017-04-01 03:59:24 -05:00
Akkadius 7aa1d243b0 [Performance] Reworked how all log calls are made in the source, see changelog.txt for more details 2017-04-01 03:51:46 -05:00
Michael Cook (mackal) 93a6efa95f Limit scale check to only scaling items 2017-03-31 14:41:45 -04:00
Michael Cook (mackal) e510608a3f Disable charm clicks at <= 0 2017-03-31 14:30:17 -04:00
Michael Cook (mackal) 9f199100e5 Initialize Client::Haste
Apparently it was possible to get this value referenced before CalcBonuses was
called leading to bad values being used.
2017-03-31 13:13:28 -04:00
Michael Cook (mackal) 4666c0c050 Don't go below 1 for caster level
This is also wrong as fuck.
2017-03-30 23:29:07 -04:00
Michael Cook (mackal) b5fe975aac Fix Lua GetPet/GetOwner 2017-03-30 21:46:28 -04:00
Akkadius a801f296b5 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-30 05:23:19 -05:00
Akkadius 9d0308c9bf [Performance] Fixed an overhead issue where many hot paths would trigger quest subroutines and beneath that the code would try to see if a quest existed perpetually (checking if file exists) even though it should have determined the quest didn't exist the first time.
- This caused a lot of overhead in an instance where an entire zone of NPC's is pathing, triggering EVENT_WAYPOINT_ARRIVE and EVENT_WAYPOINT_DEPART when there is no global_npc.pl/lua, or all NPC's pathing don't have a quest assigned, similar behavior would occur. This goes for any other type of quests: spells, items, encounters etc.
2017-03-30 05:22:47 -05:00
Michael Cook (mackal) 38e5cdb142 Reflect actually changes the caster
Or it at least changes the target of the recourse
2017-03-30 01:23:06 -04:00
Michael Cook (mackal) c67c303d0a Well, you can reflect NPC only spells...
Also unsure if single target limit is correct ...
2017-03-30 01:19:29 -04:00
Uleat f5f2cbc674 Fix for bot loss of aggro to client regardless of hate 2017-03-29 17:45:56 -04:00
Uleat f1bfd129af Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-29 15:10:05 -04:00
Uleat 34b50e0458 Excluded SE_AddFaction from bard instrument mod [fixes #589] 2017-03-29 15:09:40 -04:00
Akkadius af9a34e4e7 [Performance] Slow dynamic zones down when no clients are in them 2017-03-28 21:10:57 -05:00
Akkadius 01d7a2a0a7 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-28 19:07:30 -05:00
Uleat 8f9ac2c9ba Fix for bots db update circular reference in manifest [skip ci] 2017-03-28 19:11:20 -04:00
Akkadius fe8e907b08 [Performance] Remove unecessary log calls from EQStream hot paths (read/write) 2017-03-28 15:52:51 -05:00
Akkadius a06d5fab89 [Performance] Adjust HP marquee call checks 2017-03-28 15:49:13 -05:00
Michael Cook (mackal) 138ad99eea Make lua Get*List entity_list functions less silly 2017-03-28 14:31:10 -04:00
Michael Cook (mackal) d5004dfd55 Use better GetNPCList function for close_npcs 2017-03-28 13:45:41 -04:00
Michael Cook (mackal) eee8b0bf23 Add some const & GetList entity functions 2017-03-28 13:45:20 -04:00
Akkadius d777b1048d [Performance] Don't process ProjectileAttack checks for NPC's that are not engaged in any combat 2017-03-28 03:05:46 -05:00
Akkadius f931ef7bcb [Performance] Disabled enraged timer checks for NPC's that do not actually have enrage as a special attack 2017-03-28 02:45:07 -05:00
Akkadius 47691c2102 [Performance] Removed a timer where clients would constantly calculate light amount on equipment every 600ms, instead clients will update light when changing equipment or entering a zone 2017-03-28 02:36:51 -05:00
Akkadius bf45a5a44f [Performance] Fixed a large overhead issue where every single NPC in a zone was checking to depop themselves
as a swarm pet every 3ms regardless of being a swarm pet or not. Swarm pets now check to depop only when their timer is up
2017-03-28 02:30:06 -05:00
Akkadius 4b6ce1c19e [Performance] Reworked how client to NPC aggro checks are made
- Before when reverse aggro checks were done (client to NPC), checks would happen every 750 millseconds where a client would
		check an entire entity list with distance calcs and other checks for aggro, with many clients in a zone and many NPC's this would
		add a lot of unecessary overhead. A temporary adjustment on 3/25 was made and upped the check to 6 seconds.
	- Now, there is a new methodology to scanning. The client will build a cache list of NPC's within close range as defined in new rule:
		RULE_INT(Range, ClientNPCScan, 300) and will also get any NPC that has an aggro range beyond that defined range to use in
		the frequent checks for aggro, the result is far less overhead
	- Client scanning changes when moving versus not moving, the client will scan aggro every 500 milliseconds while moving, and
		3000 millseconds aggro check when not moving, with a 6000ms re-fetch for close NPC's
	- A demo of these changes can be found here:
		https://youtu.be/aGroiwLSTVU
2017-03-28 01:30:42 -05:00
KimLS de777fc90f Merge fix 2017-03-26 17:25:01 -07:00
Uleat 940f3b03e8 Fix for bot shadowknights casting ranger spells 2017-03-26 16:19:53 -04:00
Uleat 05e97f4c64 Oops! (don't attempt a commit when you have to go to the restroom...) 2017-03-26 13:51:03 -04:00
Uleat 8febc906a5 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-26 13:41:23 -04:00
Uleat 7309c11630 Updated glm library to 0.9.8.4 (from 0.9.6.1) 2017-03-26 13:41:14 -04:00
Akkadius aa25946dc2 [Performance] Reduced CPU footprint in cases where a client is checking for aggro excessively every 750 millseconds. This has
been adjusted to 6 seconds per new rule RULE_INT(Aggro, ClientAggroCheckInterval)
	- When zones have many players, with many NPC's, this adds up quickly
2017-03-26 00:03:51 -05:00
Akkadius 719098a97c [Performance] Reduced CPU footprint in non-combat zones doing constant checks for combat related activities 2017-03-25 23:32:49 -05:00
Uleat 9e41795594 Test fix for heal rotations crashing server surrounding player zoning 2017-03-25 15:44:38 -04:00
Uleat f77f996c3f Pass through zone code to fix uninitialized pointer declarations 2017-03-23 04:35:36 -04:00
Akkadius 8bdefa17b5 Fix README.md 2017-03-22 13:39:12 -05:00
Uleat e8a8647424 Fix for bots db update 9015 not triggering where update 9011 has not applied 2017-03-22 03:45:50 -04:00
Michael Cook (mackal) 1e1de3a48a Fix error 2017-03-20 19:49:35 -04:00
Michael Cook (mackal) 0ac70c5459 SE_Taunt is a flat chance not a bonus to taunt chance 2017-03-20 19:45:26 -04:00
KimLS cfdbca6f12 Fix for unreliable packets (kind of a hack but it works) being flagged as corrupt 2017-03-20 00:22:50 -07:00
Michael Cook (mackal) 9510e8fbe1 This should resolve leaks and shutdown lua issues 2017-03-18 16:59:46 -04:00
Uleat 803da509ce Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-18 16:12:04 -04:00
Uleat d882c5fbf6 Fix for glitchy mercenary unsuspend button behavior (report any abnormalities) 2017-03-18 16:11:07 -04:00
Michael Cook (mackal) f64e1644b1 Take 2 at fixing encounters 2017-03-18 14:11:30 -04:00
Michael Cook (mackal) bafb199d24 Fix encounters leaking?
I didn't actually test this ...
2017-03-18 01:30:59 -04:00
Michael Cook (mackal) 11e227756d Fix memory leak in raids 2017-03-18 01:15:08 -04:00
Michael Cook (mackal) 304d41e230 Fix fix memory leak fix 2017-03-18 01:09:48 -04:00
Michael Cook (mackal) 1ae66ce955 Fix uninit jump in Client::Process 2017-03-18 00:59:13 -04:00
Michael Cook (mackal) 13f49fe569 Fix uninit group value 2017-03-18 00:54:03 -04:00
Michael Cook (mackal) 3173c961fa Fix typo 2017-03-18 00:51:54 -04:00
Michael Cook (mackal) 16845c204c Fix leak in Group::SendHPPacketsTo 2017-03-18 00:34:49 -04:00
Uleat fa1edee790 Added clamp for EQEmuLogSys::LogSettings database values load 2017-03-17 20:37:48 -04:00
Michael Cook (mackal) 94d8db4691 clang-tidy said this was a use-after-free
Also, what is this code doing?
2017-03-16 14:10:36 -04:00
Michael Cook (mackal) 153e587cea Not sure how that happened 2017-03-16 12:56:21 -04:00
Michael Cook (mackal) fbb13ec416 bug found by clang 4 2017-03-16 12:52:58 -04:00
Michael Cook (mackal) e7785d5693 Bash dmg should return 0 with no item (slam) 2017-03-15 15:25:42 -04:00
Michael Cook (mackal) 23bc535e23 Tweaks to most likely wrong PVP damage reduction 2017-03-15 15:07:28 -04:00
Michael Cook (mackal) d04d6750a2 Allow base damage of 0 (ex slam) min damage done to 1 2017-03-15 13:22:45 -04:00
KimLS db210ba70e Merge fix 2017-03-14 21:18:35 -07:00
KimLS 1ce1073930 Change resend timeout to 1 min instead of 10 missed packets, added a close buffer for end of connection 2017-03-14 21:15:41 -07:00
Uleat 2d24237aac Added los movement logic to combat and follow code (los is rule-based and can by disabled by applying the optional 2017_03_14_mercs_use_pathing_rule.sql) 2017-03-14 23:23:42 -04:00
Uleat 750e65f847 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-14 23:21:24 -04:00
Uleat 31cc6f63d6 Added evade code to rogue mercs 2017-03-14 16:32:10 -04:00
E Spause 81cadf3bb2 Merge pull request #593 from EQEmu/2002_fixes
MaxClientsSimplifiedLogic rule. See commit for description
2017-03-13 14:59:30 -04:00
E Spause 54c28117a8 Merge remote-tracking branch 'refs/remotes/origin/master' into 2002_fixes 2017-03-13 06:27:01 -04:00
E Spause 79f9433dfa Merc logic fix for heal spells - allows mercs to select fast healing spells as a 'standard' healing spell & new rule for unsuspend 2017-03-13 06:26:48 -04:00
E Spause 67a95b59a7 Merge remote-tracking branch 'refs/remotes/origin/master' into 2002_fixes 2017-03-12 23:20:55 -04:00
E Spause 09b9d398e2 Rule itself for MaxClientsSimplifiedLogic. Defaults to disabled (false) 2017-03-12 23:19:50 -04:00
E Spause 3dd0d43e96 Add a rule, MaxClientsSimplifiedLogic which allows for P99-style IP restrictions if enabled. Opcode handler for OP_WorldLogout in char sel.
Only uses ExemptAccountLimitStatus and MaxClientsPerIP. Also adds in an
opcode handler so CLEs are cleaned up at char select when ESC is
pressed.
2017-03-12 23:19:24 -04:00
E Spause 8d1fe63e77 Merge pull request #592 from EQEmu/2002_fixes
Remove delay death from Mercs so they function like normal NPCs at 0 health.
2017-03-12 23:17:08 -04:00
E Spause 3fa72218a4 Remove delay death from Mercs so they function like normal NPCs at 0 health. 2017-03-12 23:08:59 -04:00
Uleat f3f034d948 Fix for a combat ability targeting error 2017-03-12 21:46:16 -04:00
KimLS 159706efa9 Merge branch 'master' into eqstream 2017-03-12 18:39:15 -07:00
KimLS 310d27c0bd Some changes to tic rates and default values 2017-03-12 18:38:33 -07:00
Michael Cook (mackal) bd364a4049 Merge pull request #591 from EQEmu/2002_fixes
Added an optional rule value that forces startzones to be the same as…
2017-03-12 19:21:05 -04:00
Akkadius 41b1634199 Update proper file name utils/sql/git/optional/2017_03_12_rule_values_range_update.sql [skip ci] 2017-03-12 17:19:42 -05:00
Akkadius 0159e1cc72 Fix some crapped out formatting [skip ci] 2017-03-12 16:42:26 -05:00
Akkadius ab372b0f6b - Implemented range rules for packets and other functions
RULE_INT ( Range, Say, 135 )
	RULE_INT ( Range, Emote, 135 )
	RULE_INT ( Range, BeginCast, 200)
	RULE_INT ( Range, Anims, 135)
	RULE_INT ( Range, SpellParticles, 135)
	RULE_INT ( Range, DamageMessages, 50)
	RULE_INT ( Range, SpellMessages, 75)
	RULE_INT ( Range, SongMessages, 75)
	RULE_INT ( Range, MobPositionUpdates, 600)
	RULE_INT ( Range, CriticalDamage, 80)

 - (Readability) Also cleaned up some formatting in messaging and packets so it is easier to understand what is going on with the code
2017-03-12 16:10:53 -05:00
Akkadius 14d09485eb Implement new rule based ranges for various range based packet operations (performance)
- the defaults are set in the code and can be tweaked by sourcing utils/sql/git/optional/rule_values_range_update.sql
- Thanks to mackal for gathering live ranges, thanks to takp for initial numbers
- We would send 200 for combat updates and the client will only display <= range 54 anyways, these should help a lot in spammy combat

RULE_CATEGORY( Range )
RULE_INT ( Range, Say, 135 )
RULE_INT ( Range, Emote, 135 )
RULE_INT ( Range, BeginCast, 200)
RULE_INT ( Range, Anims, 135)
RULE_INT ( Range, DamageMessages, 50)
RULE_INT ( Range, SpellMessages, 75)
RULE_INT ( Range, SongMessages, 75)
RULE_CATEGORY_END()
2017-03-12 14:38:14 -05:00
Uleat 8cd6416754 Added ItemData::CheckLoreConflict() 2017-03-12 14:20:22 -04:00
E Spause 4fad93824b Formatting fixes. 2017-03-12 03:49:41 -04:00
E Spause fe70834a6b Enabled a skill check bypass for OGRE, TROLL, and BARBARIAN races so the "Slam" skill works once more. 2017-03-12 03:49:07 -04:00
E Spause 17b5cc1fa5 Remove error message that has honestly bothered me since the dawn of time. Appears most often when doing loot all. EQLive does not have it. 2017-03-12 03:47:26 -04:00
E Spause 04ce4f66ed Added an optional rule value that forces startzones to be the same as the bind zone and enabled bind xyz once again. 2017-03-12 03:41:21 -04:00
KimLS 73dc6b090b Merge remote-tracking branch 'origin' into eqstream 2017-03-11 14:51:33 -08:00
KimLS 742806158c Some changes to sync sending, dont even bother sending them now just wait to reply 2017-03-11 14:50:10 -08:00
Uleat 5b24cbde5d Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-11 13:35:40 -05:00
Uleat 3555791e1f Multi-line remark statements wreck havoc on visual studio's parser (expensive) 2017-03-11 13:35:30 -05:00
KimLS 56fdc6aaac Change default settings 2017-03-10 23:31:51 -08:00
Michael Cook (mackal) 262bcf5c29 Fix merc attack delay 2017-03-10 19:17:04 -05:00
Uleat 226a49cb42 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-10 18:41:14 -05:00
Uleat bf3d9b2d02 Couple of critical fixes for bot trade code 2017-03-10 18:41:04 -05:00
Michael Cook (mackal) 3d229e1da1 Aggro Meter on by default now (seemed fine on PEQ) 2017-03-10 18:15:08 -05:00
Michael Cook (mackal) df5d58f43d Temp pets shouldn't spawn when they're targeting a corpse 2017-03-10 13:00:22 -05:00
Uleat 37d22e17a3 First step of implementing inventory v2.0 2017-03-09 02:46:09 -05:00
Uleat 999650d368 Fixed a few glitches related to bot trading and other affected code 2017-03-09 01:55:01 -05:00
Uleat 09bbfbcc31 Complete rework of the bot trading system (see changelog.txt) 2017-03-08 08:12:04 -05:00
KimLS d494048ff6 Tweaks to make server more lag tolerant and also send less packets. 2017-03-07 18:13:17 -08:00
Drajor f26b7a4adc Hacky fix for quantity wrapping when stacked items are sold that have a quantity greater than 255. A better solution will need to implemented long term 2017-03-08 06:22:17 +10:00
KimLS da81b7a76d No longer buffer ack packets to resolve an issue where the client was hanging slightly on connection termination 2017-03-05 19:09:27 -08:00
KimLS 93dcd34fa0 Fix for unset local address being sent to login server if not set by xml config 2017-03-05 14:11:40 -08:00
Uleat becd7b5c24 This probably resolves a long-term bug with bots who are conscientious objectors to fighting... (Had a rash of reports concerning this -- obscure attack timer bug within inherited NPC class ctor) 2017-03-05 05:12:54 -05:00
Uleat d559e9da10 Fix for bot auto-combat damage (please post any abnormalities) 2017-03-04 14:50:32 -05:00
Uleat 2690d8fed8 Added inspect buff cases for bots (ZombieSoul) 2017-03-03 17:51:02 -05:00
Michael Cook (mackal) 7d13475bac Fix ClearAggro xtarget issue 2017-03-02 14:31:48 -05:00
Uleat 2ab280bef0 Merge branch 'master' of https://github.com/EQEmu/Server 2017-03-01 19:16:09 -05:00
Uleat 15af28720a Bad logic..not used anyways 2017-03-01 19:16:02 -05:00
Akkadius 5213e4c7d4 Remove table that doesn't exist anymore (PEQ Dumps) [skip ci] 2017-03-01 15:19:56 -06:00
Uleat 12d7f242b4 Tweaked bot caster combat range code a little (they shouldn't pile up unless there are los issues...) 2017-03-01 16:11:17 -05:00
KimLS 0b4484b36b Some reverts and changes to default values and a bug fix 2017-03-01 13:00:48 -08:00
KimLS 25cbdf5f2c Merge branch 'master' into eqstream 2017-02-28 23:18:35 -08:00
KimLS 66c1fd9369 Revert some changes that were causing more harm than good 2017-02-28 23:17:30 -08:00
Uleat 7ac597270b Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-28 20:29:32 -05:00
Uleat 05ca4669a9 Fix for aberrant bot animations when using ^summon (i.e., swimming in air) 2017-02-28 10:39:26 -05:00
Uleat a7cbe2f60e Fix for npc corpse looting not updating appearance of looted items 2017-02-28 09:44:24 -05:00
Uleat 52d79f89a9 Bots should now /con correctly after a successful ^update 2017-02-28 08:49:25 -05:00
Michael Cook (mackal) a8a1c3f809 Better comment some group shit 2017-02-28 02:21:44 -05:00
Uleat 24bae49401 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-27 21:32:17 -05:00
Uleat bf239f9691 A 'hack' and a 'fix' (bot movement changes) 2017-02-27 21:32:07 -05:00
Michael Cook (mackal) 666513c4ab Better comment SendGroupCreatePacket 2017-02-27 15:21:50 -05:00
Uleat 1b2df18cea Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-26 22:14:34 -05:00
Uleat b1be667884 Update bot spell casting chances table and implemented 'pre-combat' mode for all bots (only bard is actively coded atm) 2017-02-26 22:13:41 -05:00
Michael Cook (mackal) 91ae6a6613 Secondary aggro meter fix 2017-02-26 19:13:47 -05:00
Uleat 303f056075 Forgot loader... 2017-02-26 07:02:20 -05:00
Uleat ec9af74dc9 Update bot spells entries for new npc spells id values 2017-02-26 07:00:24 -05:00
Uleat a49e3d6471 Update for saved bot data to use new spells id values 2017-02-26 06:26:59 -05:00
Uleat 9ae585dd81 Moved bot npc spells entries to the 3000 + class id range 2017-02-26 05:47:10 -05:00
KimLS 0d1e63c92a Merge remote-tracking branch 'origin/master' into eqstream 2017-02-25 15:31:40 -08:00
Uleat 0ee3168241 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-25 18:02:47 -05:00
KimLS 6033f48b47 Update libuv 2017-02-25 14:30:35 -08:00
Michael Cook (mackal) 3fd40e9449 Make ST_AreaNPCOnly skip faction check
The motivation for this is there a bunch of auras that use this target type
that all would require setting up faction for these NPCs so they would hate
everything.

Also allows Ward of Destruction to work.
2017-02-25 14:36:17 -05:00
Uleat c61c275221 Added position update packet in out-of-combat movement code when movement occurs (rule-based; default: false) - appears to help with rubber-banding effect 2017-02-25 09:02:20 -05:00
Uleat 7a6d5d46f4 Added node pathing to the bot movement dilemma... 2017-02-25 03:48:02 -05:00
Michael Cook (mackal) 14a5ff399a clear xtarget manager on death 2017-02-25 02:37:57 -05:00
Michael Cook (mackal) 31907382c8 Lets not aggro zonign clients 2017-02-25 02:21:48 -05:00
Uleat 5c6492bc0f Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-24 20:09:53 -05:00
Michael Cook (mackal) 0968ce0d60 Add petnaming type 5 (`s ward) 2017-02-24 15:28:22 -05:00
Uleat 171474f1d2 Fix for bot combat line-of-sight issue (let me know if this causes zone training again) 2017-02-24 10:02:50 -05:00
Uleat 3383f65ff7 Updated bot casting roles to not refresh with every spell cast (oversight in recent casting chances commit) 2017-02-24 04:48:33 -05:00
Michael Cook (mackal) 7621bf47c8 Quick fix to resolve some serious group issues
Group leader swapping didn't work and left the client in a bad state
This just disbands the group if the leader leaves

Also prevents a group leader from disbanding other groups ...
Which also lead to bad states

Group leader swapping not working is better than these issues :P
2017-02-24 01:12:46 -05:00
Uleat 72ed770037 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-23 19:16:54 -05:00
Uleat 4e8a03f7b4 Migrated bot spell casting chance data to the database 2017-02-23 19:16:36 -05:00
Michael Cook (mackal) 602381ebec copy paste fail 2017-02-23 12:27:44 -05:00
Akkadius e098836934 Upload table lists that PEQ uses in daily database dump 2017-02-22 22:49:23 -06:00
KimLS d402b25d69 Merge fix 2017-02-21 21:20:33 -08:00
KimLS af097caa52 Remove reuse addr from udp bind, it was hiding a configuration bug 2017-02-21 21:16:12 -08:00
Uleat ce3fc0f2c3 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-21 20:40:35 -05:00
Uleat 9adfe5b9ff Fix for bot wizard repeating familiar casting when pet is dead and buff is active 2017-02-21 20:40:04 -05:00
Michael Cook (mackal) b423ad0d80 Crash fix 2017-02-21 18:02:58 -05:00
Michael Cook (mackal) 9a157fa028 Turn aggro meter off by default until more tested
Reports of it being too spammy and causing DCs
2017-02-21 17:54:25 -05:00
Drajor 7db82a3b14 Fixes issue with calculating the value of items being sold. The loop was starting at 0 instead of 1. 2017-02-22 06:26:49 +10:00
Michael Cook (mackal) 056725b9bd Make timer for aggro meter not a magic number
you can edit AGGRO_METER_UPDATE_MS in common/features.h if you want to
see if a different number would work better
2017-02-21 13:38:00 -05:00
Akkadius 8bbf099636 Merge fix 2017-02-21 03:57:10 -06:00
Akkadius a884639534 Reduce the initial telnet console prompt timer 2017-02-21 03:55:21 -06:00
Uleat 8f67df1f4f Oops! (Won't affect any changes up to this point) [skip ci] 2017-02-20 22:50:43 -05:00
Uleat f851b1a3b4 Added combat-prep song buffing note [skip ci] 2017-02-20 21:47:47 -05:00
Uleat b41bb8e179 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-20 21:41:25 -05:00
Uleat d9633dfee4 Bard bot song twisting update 2017-02-20 21:41:15 -05:00
Michael Cook (mackal) 46b19e8e6f Disable the aggro meter timer if it's not enabled 2017-02-20 18:41:17 -05:00
Akkadius f0f5c41c30 Fixed an issue where clients would sell x1000 stacks of items where the price overflows data sizes, the code will now make sure not to sell too many items that go over this data size 2017-02-19 21:12:18 -06:00
Michael Cook (mackal) 08c2f73e37 Implement aggro meter for RoF2 (RoF wasn't tested)
I didn't test RoF, so it's disabled for now (change AggroMeterAvaliable if you want to test)

Group member meters probably buggy ... but do later

The "lock target" feature isn't working currently either
2017-02-18 22:27:34 -05:00
Michael Cook (mackal) 9f4604ec3e Rework how XTarget auto haters work
This should cause the auto haters to be shared with other toons who might be
interested (group/raid) like live.

There maybe some bugs since there is a lot of complex interactions here.
2017-02-17 21:04:48 -05:00
KimLS d1447107d3 Crash fix 2017-02-16 00:12:37 -08:00
KimLS d774de3a1b Add crazy logging to daybreak class 2017-02-16 00:02:17 -08:00
Uleat 8177f7d9bb Activation of bot_spells_entries table 2017-02-15 19:04:36 -05:00
Uleat 4ec3fda59d Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-15 18:38:45 -05:00
Uleat e3c8b75259 Moved bot spell entries out of npc spell entries (easier to manage bot changes by committing to non-bot manifest) 2017-02-15 07:42:17 -05:00
Uleat d62a449f9c Missed an npc spells type (or two..) 2017-02-15 07:03:43 -05:00
Michael Cook (mackal) d043c38f71 Make it so enraged NPCs can't be riposted
This should prevent infinite loops
2017-02-14 16:47:22 -05:00
JJ 5b8ad902ce Add character_tasks to the list when deleting a character. 2017-02-13 16:00:39 -05:00
Akkadius ef16522473 Implement Rule Zone:GlobalLootMultiplier (Default 1) - Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc. 2017-02-13 02:16:40 -06:00
Akkadius fe21564659 Apply KLS' tweaks to Log.Out (CPU saves) https://github.com/EQEmu/Server/commit/1d055b5364a4183a327683dfa13cf33954874616 2017-02-13 01:38:23 -06:00
Akkadius e3173d04d4 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-13 01:26:44 -06:00
Akkadius 92d4468326 Put a category enabled filter on default switch case so we're not chewing up extra cpu cycles 2017-02-13 01:26:19 -06:00
Akkadius 0f32f780a9 Revert previous change to keep installation memory safe and independent [skip ci] 2017-02-12 23:31:25 -06:00
Akkadius 955514c20f eqemu_server.pl Linux make routine compile with the amount of cores available [skip ci] 2017-02-12 23:16:38 -06:00
Uleat ed717add29 Added a few more SpellType enumerations (uncoded) 2017-02-11 18:33:58 -05:00
Uleat a7b159fe65 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-09 17:58:08 -05:00
Uleat 38651258fc Updated npc spell types to 32-bit mask 2017-02-09 17:57:55 -05:00
Akkadius 4605540955 Update login_opcodes.conf 2017-02-09 01:33:41 -06:00
Akkadius c83bc038f3 Fix issue with installer pulling down the wrong opcodes for SOD+ clients on Linux Loginserver 2017-02-09 01:32:26 -06:00
KimLS d8d77d88f2 Merge fix 2017-02-08 19:31:36 -08:00
KimLS ed813363a5 Fix for locked server bug, bandaid to fix stupid missile code. 2017-02-08 19:27:51 -08:00
Akkadius d3dff3760a Merge pull request #587 from N0ctrnl/patch-1
Update for Ubuntu 16.04
2017-02-08 19:04:29 -06:00
Kurt Gilpin 9e49b2ae0f Update for Ubuntu 16.04
This should be fully working with Ubuntu 16.04 Server.
2017-02-08 19:01:50 -06:00
Akkadius a81212e1b4 Allow admin telnet connections from localhost without requiring credentials to world 2017-02-08 18:00:38 -06:00
Akkadius 57d75572b2 Heavily reduce idle cpu footprint with many zone processes loaded simultaneously and not active 2017-02-08 17:28:54 -06:00
Uleat d1abe4a332 Added dev script for function to retrieve spell type description labels for spells from queries [skip ci] 2017-02-07 21:52:46 -05:00
Uleat cd11d7d1af Added dev script for function to retrieve spell category labels for spells from queries [skip ci] 2017-02-07 21:52:17 -05:00
KimLS 5fa8ffd3bc Compile error with msg callback any and no-sodium 2017-02-06 23:26:31 -08:00
KimLS 204e52c364 And another 2017-02-06 23:24:36 -08:00
KimLS d05d388b19 Readonlypacket found 2017-02-06 23:23:23 -08:00
KimLS a255f9f98b New json event sub linker error 2017-02-06 23:17:08 -08:00
KimLS 0736ce43bd Merge branch 'master' into eqstream 2017-02-06 21:46:34 -08:00
Uleat 3d1bb6bd08 Updated SpellAffectIndex enumeration remarks [skip ci] 2017-02-06 17:48:44 -05:00
Uleat e9c1681e2c Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-06 16:35:41 -05:00
Uleat 5dbbc5f21c Added some additional SpellAffectIndex declarations to the enumeration (no reference.) Added dev script for function to retrieve spell affect index id labels for spells from queries 2017-02-06 07:14:50 -05:00
Michael Cook (mackal) ef8b4754ea Fix min damage issue 2017-02-06 00:11:26 -05:00
Uleat a13694c859 Implemented cast restrictions in GetSpellTargetTypeToken() [skip ci] 2017-02-05 22:11:02 -05:00
Uleat 51eaf25ea0 Merge branch 'master' of https://github.com/EQEmu/Server 2017-02-05 16:18:16 -05:00
Michael Cook (mackal) 592f9a9cb9 Add rule to allow non-PC pet NPCs to crit
NPCs can't crit at all ever on live
2017-02-05 13:44:04 -05:00
Uleat 409dc3ad35 Added dev script for function to retrieve body type labels from queries [skip ci] 2017-02-05 07:56:37 -05:00
Uleat f8f783fa46 Added dev script for function to retrieve spell target type labels for spells from queries [skip ci] 2017-02-05 05:01:51 -05:00
Uleat 1d1382cb12 * Added dev script for function to retrieve race id labels from queries [skip ci] 2017-02-05 04:32:32 -05:00
Uleat 68680ac9d8 Created sub-d for database tools 2017-02-05 02:37:01 -05:00
Uleat df1d499da6 Imported RoF2 race names 2017-02-05 02:20:40 -05:00
Uleat a6a056ad0d Added rest of public spell effect list. Changed unimplemented effects to "NI_"##token format [skip ci] 2017-02-04 19:52:21 -05:00
Uleat b1f14e1e29 Added dev script for function to retrieve effect id labels for spells from queries [skip ci] 2017-02-04 05:55:10 -05:00
Uleat 1999982e6a Fix for bot load buffs instrument mod. More tweaks to bot movement hack 2017-02-02 19:10:10 -05:00
Uleat b0ad9524bc Bot movement behavior change..still in-work 2017-01-31 20:17:54 -05:00
Michael Cook (mackal) d8519bc270 Weapons allow NPCs to facestab 2017-01-31 17:25:05 -05:00
KimLS d5bd773a46 Will be redoing the event interface for subscriptions, some work for the wi and crash fixes 2017-01-30 23:22:52 -08:00
Uleat da9792160d Added Mob::HasTargetReflection() 2017-01-30 17:38:17 -05:00
Uleat dc308e2ecb Fix for null columns in books.language crash 2017-01-30 03:08:00 -05:00
Uleat 984a009fbb Temp fix for bot armor color issue - may break armor dying (not tested) 2017-01-29 04:35:03 -05:00
Michael Cook (mackal) 5d61cf5bcf Bots are dumb 2017-01-28 23:21:12 -05:00
Michael Cook (mackal) 2db6464d14 Fix last commit 2017-01-28 22:46:02 -05:00
Michael Cook (mackal) c17ac67296 Tweak #showstats so bots don't skip stuff 2017-01-28 22:43:07 -05:00
Michael Cook (mackal) 37e87e8cef Rework combat to make use of a struct to fix some bugs 2017-01-28 19:38:44 -05:00
Uleat e300f82c28 Added "rooted mob" conditional to rogue bot hate redux methods 2017-01-28 16:07:58 -05:00
Uleat 05cb9d56c2 Modded 2017_01_10_book_languages.sql to eliminate error message 2017-01-27 23:17:25 -05:00
Uleat ac0cba64f9 Merge pull request #585 from noudess/master
Use languages when reading books that are in a language other than common.
2017-01-27 22:48:43 -05:00
Uleat 0b3b3fdc88 Merge branch 'master' of https://github.com/EQEmu/Server 2017-01-27 21:28:32 -05:00
Uleat 104a0998ce Added rogue evade to bot combat (nothing is every really fixed until you do it a second time and add a timer...) 2017-01-27 21:28:25 -05:00
Michael Cook (mackal) cdf0d5deb0 Fix crash 2017-01-26 18:04:59 -05:00
Uleat 36300d6df1 Removed SE_NegateIfCombat movement spells from bot commands (i.e., Scale of Wolf) 2017-01-26 17:29:39 -05:00
Uleat 3d54a4edcb Eliminated Rogue Bot twirling combat behavior. 2017-01-26 14:37:51 -05:00
Michael Cook (mackal) 31de6a63cc Fix bot frenzy 2017-01-25 21:08:59 -05:00
KimLS a8699eb40c Remove front, want to work on it separately 2017-01-25 16:45:28 -08:00
KimLS ae78b00a6b And tell git to ignore it. 2017-01-24 22:12:39 -08:00
KimLS 7cf1e6955c Remove build folder for front duh 2017-01-24 22:12:24 -08:00
KimLS 729e3b4167 Mostly finished with backend data api poc 2017-01-24 22:11:13 -08:00
KimLS b6feb258b1 Rewrote search func 2017-01-24 18:58:37 -08:00
KimLS e715f5bfa2 Ability to retrieve all (limited to 1000 right now) 2017-01-23 00:22:41 -08:00
KimLS 73bd88dc62 Changed searching to be simplier since I don't think we'll need much more 2017-01-23 00:16:29 -08:00
KimLS 40edbc3b64 WI work 2017-01-22 22:26:34 -08:00
Uleat ae81ab8a12 Fix for obscure crash related to bots and GetNeedsCured() 2017-01-21 21:38:32 -05:00
Michael Cook (mackal) 7033d9d919 memleak fix 2017-01-21 01:47:06 -05:00
Michael Cook (mackal) 905e3acab3 Fix bots? 2017-01-20 23:27:19 -05:00
Michael Cook (mackal) 2c6e11b464 Have modify NPC stat AC/AGI recache AC 2017-01-19 23:17:14 -05:00
KimLS cd4d79c02b Changed sleep times on the less time sensitve servers 2017-01-18 22:39:39 -08:00
Michael Cook (mackal) 9aba993888 Add optional rule SQL for combat update [skip ci] 2017-01-17 23:34:52 -05:00
Michael Cook (mackal) f614c35f6e Combat Revamp -- BREAKING CHANGES -- see changelog
Changelog updated for combat revamp
2017-01-17 23:30:50 -05:00
KimLS c3f8e06e42 Legacy login off, changed broken loop in loginserver 2017-01-17 19:43:04 -08:00
Michael Cook (mackal) 8f21b01b7e Tweak to accuracy based on newer clients 2017-01-17 02:52:16 -05:00
Michael Cook (mackal) 591fa003c6 Merge pull request #586 from huffin/patch-1
Update 2017_01_16_NPCCombatRebalance.sql
2017-01-16 21:00:52 -05:00
huffin f3e09abf22 Update 2017_01_16_NPCCombatRebalance.sql 2017-01-16 19:33:33 -06:00
Michael Cook (mackal) 18e6e5e5e2 Rename Defense to Mitigation on sim (since that's what it is) 2017-01-16 17:05:57 -05:00
Michael Cook (mackal) 698a814fc3 Add KLS' combat sim
This will show you the distribution of hits for a given offense and mitigation

DI 1 is the min hit and DI 20 is the max hit
2017-01-16 17:02:34 -05:00
Michael Cook (mackal) fb820f4fec Add Creamo's SQL to rebalance NPCs 2017-01-16 16:58:32 -05:00
Michael Cook (mackal) 0d84a73e9f Clean up MonkSpecialAttack too 2017-01-15 22:54:50 -05:00
Michael Cook (mackal) b92d6c57a1 Rework OPCombatAbiltiy a bit
This is done to help remove some code duplication in the future
2017-01-15 22:19:32 -05:00
Michael Cook (mackal) 8c6fefa33e Update #showstats 2017-01-15 16:32:15 -05:00
Michael Cook (mackal) e03a90b05d Refactor CheckHitChance
Pulled the accuracy/avoidance spell bonuses into their own functions so
we can show the total values in #showstats
2017-01-15 16:08:22 -05:00
Michael Cook (mackal) c030e1ce8d Add rule Combat:LevelToStopDamageCaps
Setting this to 1 will effectively disable damage caps
Setting this to 20 will give similar results to old incorrect default rules
2017-01-15 15:39:12 -05:00
Michael Cook (mackal) 7e49a21b3b Change NPC skill AC bonus
Basically, live doesn't have an NPC's skill at the max for their class like we
do. So for now, we'll just set their SkillDefense bonus to value / 5
2017-01-15 13:54:10 -05:00
Michael Cook (mackal) 9e824876ba Combat Revamp - MAJOR BREAKING CHANGE
This commit makes combat much more live like. This is based on a lot of parses
done by TAKP and myself. There are numerous things based on dev quotes and
hints. Pretty much all combat has changed, spell effects correct, stacking
correct, etc.

This is the fist stage of the revamp, I will be trying to remove some code
duplication and make things generally cleaner.

Server ops will have to rebalance their NPCs. AC actually means something now.
Rough recommendations?
Level 50 "classic" trash should be no more than 115.
Classic raid mobs should be more 200+ etc
Other "classic" NPCs should be a lot lower as well.
PoP trash probably shouldn't exceed 120 AC
PoP raids should be higher
Devs have said the vast majority of NPCs didn't exceed 600 AC until very
recently. The exceptions were mostly raid encounters.

There really isn't a good "default" for every server, so this will be up to
the devs to find where they want their server stats to be.
2017-01-15 00:03:02 -05:00
KimLS b44e991035 Remove offending includes that caused login to stop compiling 2017-01-14 16:52:59 -08:00
KimLS e1e907e441 Missing sleep for eqlaunch 2017-01-14 16:37:52 -08:00
KimLS 01a04a63c3 Add uuid lib reference for unix 2017-01-14 16:20:44 -08:00
KimLS f7eb15bf53 This is throwing an error on gcc 2017-01-14 16:06:55 -08:00
KimLS f53bdaeb7e Changed tic rate to 5 seconds might be too long 2017-01-13 23:47:17 -08:00
KimLS 28325467da Add client and zone subscriptions 2017-01-13 23:46:20 -08:00
KimLS 83b51b04d3 Merge branch 'master' into eqstream 2017-01-13 21:53:21 -08:00
KimLS 1cafd6831d Basic work on subscriptions 2017-01-13 21:52:08 -08:00
Michael Cook (mackal) 891fa0411c Revert "Update travis-ci to use newer VM"
This reverts commit 0a4ccb11aa.
2017-01-12 18:25:32 -05:00
Michael Cook (mackal) a4fda2a951 Revert "Try newer GCC versions?"
This reverts commit 50a67c76e7.
2017-01-12 18:25:25 -05:00
Michael Cook (mackal) ffdc933ce0 Revert "Gotta update env vars too I guess"
This reverts commit da08a622f1.
2017-01-12 18:25:16 -05:00
Michael Cook (mackal) e3f15de1f8 Revert "Gotta set them actually"
This reverts commit 6cef5c6beb.
2017-01-12 18:25:06 -05:00
Michael Cook (mackal) 6cef5c6beb Gotta set them actually 2017-01-12 18:19:04 -05:00
Michael Cook (mackal) da08a622f1 Gotta update env vars too I guess 2017-01-12 18:10:45 -05:00
Michael Cook (mackal) 50a67c76e7 Try newer GCC versions? 2017-01-12 18:06:13 -05:00
Michael Cook (mackal) 0a4ccb11aa Update travis-ci to use newer VM 2017-01-12 17:55:08 -05:00
KimLS f24770489e WebInterface reference implementation 2017-01-11 23:19:00 -08:00
Paul Coene af4a432745 Missed version.h in original commit 2017-01-10 20:33:01 -05:00
Paul Coene df86e644f4 Now the actual code changes - lol 2017-01-10 20:18:16 -05:00
Paul Coene 80ff535215 Added code so that books/scrolls read that are in a language other
than common get language skill applied.

Added code to support ReadBook slots above and beyond main inventory slots
by decoding additional bag slot field.
2017-01-10 20:15:03 -05:00
Akkadius 30157a37a2 Merge pull request #583 from noudess/master
Alliance spell line for chanters was not working.
2017-01-10 14:09:02 -06:00
KimLS 124728e0c7 TCP cleanup, added basis of web interface 2017-01-08 19:00:39 -08:00
KimLS 08e72bbbdd UCS support decided to not rewrite it for now. Maybe later now that it's easier to work with 2017-01-06 00:21:59 -08:00
KimLS bf563e9c6a Merge branch 'master' into eqstream 2017-01-05 22:25:48 -08:00
KimLS b7c5de144a Launcher support added. Still missing UCS but thinking about maybe rewriting it completely 2017-01-05 22:25:01 -08:00
KimLS f6ca59fbc6 Working zone and world communication yay 2017-01-03 22:23:03 -08:00
KimLS 2447c38c82 Working on world <-> zone communication needs a ton of work really need to rewrite how world works with zones. 2017-01-02 22:38:47 -08:00
Michael Cook (mackal) f5827174ee Make CheckHitChance much more live like
This should be fairly close to live-like.

Based on client decompiling, Torven's write up and parses and more parses.

It will probably break your server.
2016-12-25 21:11:10 -05:00
Michael Cook (mackal) 1d19bd11d0 Add Random::Roll0
This has the same interval ((0,N]) that the client function does
The devs have referenced this in a few posts talking about
mechanics.
2016-12-25 21:06:02 -05:00
KimLS 0264c0d60a Merge branch 'master' into eqstream 2016-12-21 14:26:59 -08:00
KimLS b6d79e5af2 Query serv reimplement first steps 2016-12-21 14:25:33 -08:00
Paul Coene 6a2be94282 Alliance spell line for chanters was not working. 2016-12-21 14:38:24 -05:00
Michael Cook (mackal) 630ea0d3c6 Fix RoF2 OP_GMHideMe 2016-12-21 13:45:18 -05:00
Drajor 55e78cd8e9 Fix for error in previous change. ItemInstance::GetOrnamentHeroModel will return zero again when parameter material_slot is the default -1. 2016-12-21 13:28:05 +10:00
Drajor a13e32498a Hero Forge robes are now visible at character select. Items using a robe HF ID need use the actual ID in the DB i.e. 11607-12107. WearChange command modified to allow both shorthand HF IDs and explicit IDs. 2016-12-21 13:03:19 +10:00
Uleat 18693998b9 Added logging code to DropItem() 2016-12-19 20:58:38 -05:00
Drajor 908a7061cf Hero forge ID in OP_WearChange originating from a client is now set to the correct value prior to being broadcast to other clients. 2016-12-19 21:00:55 +10:00
Uleat 648078d76c More NoDrop-related hack abatement 2016-12-18 20:20:27 -05:00
Akkadius 06279b18a3 Fix Hero Forge model not showing up at character select 2016-12-18 05:36:30 -06:00
Michael Cook (mackal) f53b95d141 Rework look acking a bit
We should no longer kick from corpse if the quest says to not loot an item
Need to investigate autoloot behavior with respect to everything still
So other cases will still kick you from the corpse (lore conflict etc)
2016-12-16 17:11:44 -05:00
Michael Cook (mackal) e680a0f704 Change LottingItem_Struct::auto_loot to signed 2016-12-16 16:09:31 -05:00
Michael Cook (mackal) 019586abbd Clang-format Corpse::LootItem 2016-12-16 16:03:44 -05:00
Michael Cook (mackal) 8f5ba05e75 Minor Corpse::LootItem refactoring 2016-12-16 16:02:42 -05:00
Michael Cook (mackal) 427fb08561 Merge pull request #582 from SCMcLaughlin/master
Additional LS config parser fixes:
2016-12-16 02:14:23 -05:00
SCMcLaughlin 343c23cc6c Additional LS config parser fixes:
* use auto
* fix some questionable uses of string.append() that were broken by the use of int/auto
2016-12-15 20:58:53 -08:00
Michael Cook (mackal) ac0332c020 Merge pull request #581 from SCMcLaughlin/master
Fix potential infinite loop in loginserver's config file reader
2016-12-15 20:55:43 -05:00
Michael Cook (mackal) c1fbfc0f44 Add support for kicking epic loot locks
Returning non-0 (no return in a lua/perl function = return 0 so this is best)
will prevent the client from looting the item

I still need to figure out how to make it so we don't have to kick
the player from the corpse, but maybe that's just a difference on live
2016-12-15 18:31:08 -05:00
SCMcLaughlin d305d67279 Fix potential infinite loop in loginserver's config file reader 2016-12-15 14:47:58 -08:00
Michael Cook (mackal) 3cc7d0db63 Fix fizzle message being the wrong color 2016-12-14 22:06:05 -05:00
Uleat 1b1d8700ae Merge branch 'master' of https://github.com/EQEmu/Server 2016-12-09 20:12:51 -05:00
Uleat 6994157184 Added optional bots rule 'CasterStopMeleeLevel' 2016-12-09 20:12:08 -05:00
Michael Cook (mackal) bf25c65868 Merge pull request #579 from noudess/master
Add check for mob spell based defensive procs.
2016-12-09 19:14:05 -05:00
Paul Coene 6311d82095 Add check for mob spell based defensive procs (as per DB entry) for attacking
clients.  Got coaching and testing from demonstar55.
2016-12-09 18:59:44 -05:00
Michael Cook (mackal) 491cabfe8b Fix SE_Destroy breaking respawns 2016-12-09 13:36:09 -05:00
Michael Cook (mackal) fddb6f67ab Update IsPartialCapableSpell based on Torven's findings 2016-12-09 13:29:46 -05:00
Michael Cook (mackal) 26985496d1 Fix Shield Specialist related SPAs 2016-12-08 22:36:47 -05:00
Michael Cook (mackal) ab0f883191 Merge pull request #578 from noudess/master
Add fish names to fishing messages as per live for non junk items,
2016-12-08 16:42:27 -05:00
Paul Coene 538ff873ee Fix alignment 2016-12-08 16:19:17 -05:00
Paul Coene d0e6bb6e07 more undos 2016-12-08 16:17:10 -05:00
Paul Coene 6cbb4bcf47 Remove defensive proc changes 2016-12-08 16:15:58 -05:00
Paul Coene d99df2540d Fix typo 2016-12-08 16:07:33 -05:00
Paul Coene f5a0b994dc Make message based on item type. Learned that non fish items can come from
both tables.
2016-12-08 16:07:33 -05:00
Paul Coene 246f770e8f Fix fishing messages so when actual fish are caught, name is in message. 2016-12-08 16:07:33 -05:00
Paul Coene 95efc3a66c Undo changes 2016-12-08 16:06:32 -05:00
Michael Cook (mackal) baf9336617 Fix RoF+ OP_InterruptCast 2016-12-06 14:12:11 -05:00
Uleat 0ab0c5c117 Added trade hack detection code 2016-12-03 18:17:10 -05:00
KimLS 48412087e8 Merge branch 'master' into eqstream 2016-12-03 15:05:20 -08:00
KimLS 7ce382396b Compile fix 2016-12-03 15:04:46 -08:00
Akkadius c482738d79 Merge branch 'master' of https://github.com/EQEmu/Server 2016-12-01 22:42:35 -06:00
Akkadius a4c9fa6a65 eqemu_server.pl windws_server_latest - now grabs both pdb's and regular binaries [skip ci] 2016-12-01 22:42:22 -06:00
Michael Cook (mackal) bb8fc17189 Quick fix for PP buff issue
This may break buffs zoning, but I don't have time to look at
2016-12-01 22:57:50 -05:00
Uleat b61c7d0b14 Merge branch 'master' of https://github.com/EQEmu/Server 2016-12-01 22:34:51 -05:00
Uleat 0d9af27a03 Exploit abatement for item duplication involving augments 2016-12-01 22:34:43 -05:00
Akkadius 3e50491619 Update eqemu_server.pl to use new AppVeyor build link [skip ci] 2016-12-01 19:46:43 -06:00
Akkadius de92c277e0 Update eqemu_server.pl to use new AppVeyor build link
Adjust pet zoning to occur before zone spawns are sent in bulk
2016-12-01 19:41:12 -06:00
Michael Cook (mackal) ffbc913b9d Rename some spell fields 2016-12-01 13:35:19 -05:00
Michael Cook (mackal) 286bfa7af6 Implement the PC/NPC only flag 2016-11-30 20:53:39 -05:00
Akkadius b5e324af83 eqemu_server.pl windows_server_latest - Now pulls down latest unstable binaries built from AppVeyor (x86) [skip ci] 2016-11-28 16:46:38 -06:00
Michael Cook (mackal) d9e0708331 Merge pull request #576 from AthrogatePEQ/master
Add GetAppearance() to lua.
2016-11-28 16:53:56 -05:00
Athrogate a121675161 Add GetAppearance() to lua. 2016-11-28 13:50:24 -08:00
KimLS 0db70218e9 Merge fix 2016-11-19 15:54:31 -08:00
KimLS c77e65c07d More HC work, almost fully logs in 2016-11-19 15:50:22 -08:00
Michael Cook (mackal) bbd2796ea4 Add ParticlePoint enum for OP_LevelAppearance 2016-11-18 13:55:04 -05:00
Michael Cook (mackal) 5a08e0ffd9 Adjust Rogue Evade drop
Live seems to be inconsistent with how much hate is dropped, but I parsed
~69% drop on the highest and ~39% for the lowest. So round to 70 and 40.

It was also fairly obvious there was a min hate it could drop you to,
which parsed out to ~100 hate.
2016-11-16 02:36:20 -05:00
KimLS c86d4be1ae Headless client work 2016-11-15 21:30:43 -08:00
Michael Cook (mackal) 3dec02881a Revamp Buff slots
Server side we now have 63 total buff slots for clients
They match RoF/RoF2 and are mapped as 42 long, 20 short, 1 disc

The player is limited to what their clients supports, so
Tit players can have 25 buffs and 12 songs, while other can have more

When you log in, we only load up to the max your client supports,
the rest of the buffs are thrown away

Also changed is the default Max Buff slots for NPCs, they now match Tit (60)
If you are thinking about raising that, here are what some other clients support
Tit - SoF 60, SoD - UF 85, RoF - RoF2 97 (although UI only has 85 slots, you can
edit it if you want more)

Also SoD+ the pet limits match the NPC limits.

This will increase memory usage a bit, but I don't see a solution to that
Plus I think most people want this.
2016-11-15 01:37:58 -05:00
KimLS 84367e1f77 Added headless connection stuff, fixing connecting with daybreakconnections 2016-11-13 23:28:25 -08:00
Akkadius 04c8fe7d2c Fix map loading paths for both platforms 2016-11-11 22:39:08 -06:00
Akkadius e8d80a436e Add map debugging [skip ci] 2016-11-11 22:31:54 -06:00
Uleat 3447c86562 Fix for windows compile (stat-use related) 2016-11-11 18:59:47 -05:00
Michael Cook (mackal) 71e641c882 Merge pull request #572 from KinglyKrab/master
Fixed #npcspawn update.
2016-11-10 15:57:31 -05:00
Kinglykrab cb1d0a0bef Fixed #npcspawn update. 2016-11-10 15:47:18 -05:00
Akkadius 34ffb5b908 Create shared_memory directory from the config file if it doesn't exist on launch of shared_memory.exe 2016-11-10 12:00:44 -06:00
Akkadius e7e379c71b Fix map loading logic so that case sensitive checks are made in the following order: maps, Maps, and if neither of those two exist, then <maps> value would take precedence.
- Added some log messages for what version of map is being loaded versus MMF
2016-11-10 11:28:06 -06:00
Michael Cook (mackal) b3842ba72a Fix indent 2016-11-09 12:14:24 -05:00
Michael Cook (mackal) a3c16ecdbe Merge pull request #571 from AthrogatePEQ/master
Expose GetLowestLevel() to Lua.
2016-11-09 12:13:15 -05:00
Athrogate 72e7465e16 Lua GetLowestLevel() 2016-11-09 04:41:09 -08:00
Athrogate 4af996e359 Adding GetLowestLevel() 2016-11-09 04:28:57 -08:00
KimLS f07b5d9032 Legacy connection wip 2016-11-07 21:03:06 -08:00
Akkadius 462dea67e1 Merge pull request #566 from N0ctrnl/hott-test
Optional rule to grant HoTT to newly created characters
2016-11-06 16:11:02 -06:00
Akkadius e23fd269d5 Merge pull request #570 from zerosum0x0/potential_makeplat
fix potential plat creation exploit
2016-11-06 16:10:43 -06:00
KimLS 3e38055f20 Fix for how servers are removed and added to loginserver 2016-11-05 17:02:54 -07:00
KimLS bdf6f6da99 Fix for opcode manager not being set to anything (messes up release builds doh) 2016-11-05 16:39:51 -07:00
KimLS d83e8b7d8f Added back in eq stream ident timeout, also fixed bug with opcode manager 2016-11-05 16:38:57 -07:00
KimLS 1ada60b611 Added write baton to tcp sends so we follow spec 2016-11-05 16:18:39 -07:00
Michael Cook (mackal) 06e2f76c05 Implement SE_SummonToCorpse 2016-11-05 14:08:00 -04:00
Michael Cook (mackal) b1f97712f1 Quick fix for bulk XTarget updates
This needs to be investigated more, but a 0 here for a valid mob
is bad.
2016-11-03 14:31:09 -04:00
KimLS 53beefd19b Fix for how uv writes work on linux (they don't copy the buffer automatically) which should enable actually logging in on linux now 2016-11-02 18:45:05 -07:00
Michael Cook (mackal) cbe53951f8 Add missing ITEMTransfig1HB 2016-11-02 13:36:04 -04:00
KimLS 90443891d6 Fix for logs crash 2016-11-01 00:04:34 -07:00
KimLS 8d729d4ea0 Changed args to const string 2016-10-31 21:38:13 -07:00
KimLS d8da52796b Rework login credential functions 2016-10-31 21:19:48 -07:00
zerosum0x0 66f253553a Added an f like a dummy 2016-10-30 22:12:46 -06:00
zerosum0x0 7f4ce3faf5 fix potential plat creation exploit 2016-10-30 22:04:10 -06:00
Michael Cook (mackal) a29177de9e Fix zone/embparser.h header guard 2016-10-30 22:51:50 -04:00
Michael Cook (mackal) a15df2ec2c Switch Master Wu to modern live implementation
Classic Master Wu still exists setting Combat:ClassicMasterWu to true
2016-10-30 22:41:24 -04:00
Ubuntu 7f7a4b0f2d Compile fixes for linux cpp++11 2016-10-30 19:42:28 +00:00
KimLS f3e2af7e42 Working on login / world connection mostly there, fixed a few crashes with encryption on 0 length packets 2016-10-29 23:23:04 -07:00
KimLS 0b8b41d91f World <-> Login connection reworked 2016-10-28 19:02:03 -07:00
Michael Cook (mackal) cbb7090615 Fix SNEAK_RESTRICT Message Type 2016-10-28 20:45:05 -04:00
Michael Cook (mackal) b9fefc95e8 Enforce 4 sec Sneak Attack rule fixes #569
Spells flagged with SNEAK_ATTACK requires you to be hidden for
about 4 seconds before you can cast them
2016-10-25 23:19:20 -04:00
Akkadius 60406ebcc1 Test build notification 2016-10-25 02:52:31 -05:00
Michael Cook (mackal) a6f5571750 Fix infinite loops 2016-10-24 13:29:07 -04:00
KimLS fab8765c2f Test authentication 2016-10-23 18:01:39 -07:00
KimLS 1d1df3bf7a Servertalk implementation wip, added optional support for pub-key authenticated encryption (via libsodium), not backwards compatible. 2016-10-23 17:55:19 -07:00
Uleat aabf7b9b5a Switched NPC::QueryLoot() from ItemData model to ServerLootItem model (allows saylinks with augments) 2016-10-23 20:51:07 -04:00
Uleat aa56e8aac4 Merge branch 'master' of https://github.com/EQEmu/Server 2016-10-23 15:28:27 -04:00
Uleat db7f0cc977 Fix for model glitches resulting from a recent patch 2016-10-23 15:28:20 -04:00
Michael Cook (mackal) 95064947b6 Hack to fix long recast bard songs 2016-10-21 20:48:18 -04:00
KimLS e29ca88a76 Removal of openssl stuff 2016-10-20 21:32:48 -07:00
Uleat 714464481f Merge pull request #568 from KinglyKrab/master
Augment support for adding items to NPCs in quests.
2016-10-20 22:08:13 -04:00
Kinglykrab 6abed18eb9 Added augment support for NPC AddItem() and quest::addloot in Perl/Lua. This will allow you to add items to NPCs with scripts that already have augments in them. 2016-10-20 21:12:47 -04:00
Uleat 752821f22b Added proximity data report to npcstats command 2016-10-20 16:36:46 -04:00
Akkadius 409bad8108 Update eqemu_server.pl [skip ci] - not sure why formatting is getting thrown off 2016-10-18 16:52:51 -05:00
Akkadius 97999a63b7 Update eqemu_server.pl [skip ci] - Fix eqemu_config.xml tag parsing scenarios 2016-10-18 16:49:47 -05:00
Akkadius fe968f83a3 Update eqemu_server.pl [skip ci] - undo previous quote commit 2016-10-18 16:21:21 -05:00
Uleat 9545684883 Merge branch 'master' of https://github.com/EQEmu/Server 2016-10-18 17:09:14 -04:00
Uleat 6e0cba566f Added 'sow' argument to bot_command_movement_speed 2016-10-18 17:09:07 -04:00
Akkadius 16fa32e65b Update eqemu_server.pl [skip ci] 2016-10-18 14:16:53 -05:00
Kurt Gilpin e3e20a947b Create 2016_10_17_GrantHoTTOnCharacterCreate.sql 2016-10-17 19:00:08 -05:00
Kurt Gilpin d1f7448b25 Rule for HoTT grant. Defaults to false 2016-10-17 18:58:52 -05:00
Kurt Gilpin d62ceaefcc Rule to grant HoTT ability on character create 2016-10-17 18:57:35 -05:00
Uleat ec548874cc Another windows laxity... 2016-10-17 11:06:16 -04:00
Uleat 9a225bc396 Merge branch 'master' of https://github.com/EQEmu/Server 2016-10-17 10:59:45 -04:00
Uleat 101002d635 Renamed enum class InventoryVersion to MobVersion 2016-10-17 06:32:51 -04:00
Uleat 04f4fd652b Renamed class Inventory to EQEmu::InventoryProfile 2016-10-17 04:59:00 -04:00
Uleat 1cb79c8c1f Separated class Inventory from item_instance files into inventory_profile files 2016-10-17 02:41:09 -04:00
Akkadius 195bc03645 Update eqemu_server.pl [skip ci] - Make eqemu_config.xml parsing more strict to look inside the database section 2016-10-17 00:56:17 -05:00
Uleat 3438247904 Moved namespace ItemField from item_instance.h to shareddb.cpp 2016-10-17 01:03:40 -04:00
Uleat 9f01d14c64 Real fix for travis-ci build failure (thanks demonstar55!) 2016-10-16 23:18:12 -04:00
Uleat 7071b27183 Fix for travis-ci build failure 2016-10-16 21:59:35 -04:00
Uleat bfd07b1010 Added class EQEmu::InventorySlot 2016-10-16 21:36:39 -04:00
KimLS 960da66b87 Fix for crash on bind 2016-10-16 17:03:02 -07:00
Uleat 8b5dd58e96 Renamed struct EQEmu::ItemBase to EQEmu::ItemData and class ItemInst to EQEmu::ItemInstance 2016-10-16 05:10:54 -04:00
Uleat decaadfe7d Merge branch 'master' of https://github.com/EQEmu/Server
# Conflicts:
#	changelog.txt
2016-10-15 22:27:14 -04:00
Uleat e29ec16759 Missed 2 reference changes 2016-10-15 22:23:50 -04:00
Uleat 16642b7c4c Filename changes to facilitate future updates 2016-10-15 22:14:03 -04:00
Akkadius 2188be24e4 Merge pull request #559 from TheGrandPackard/master
Fix Random Ground Spawn Z
2016-10-15 14:56:49 -05:00
Akkadius 70b9ff384c Merge pull request #562 from noudess/master
Fix rogue merchant usage under sneak.
2016-10-15 14:55:28 -05:00
Akkadius 56babc1801 Update client_process.cpp 2016-10-15 14:54:57 -05:00
Akkadius 3ba199e052 Merge pull request #558 from Xackery/master
Exp Raw Value / % Gain
2016-10-15 14:53:27 -05:00
KimLS 23120bcde6 Added keep alive to relay link for backwards compat with emu_tcp_connection (they disconnect you after about 45 seconds if you don't send keep alives even if the tcp connection is fine...) 2016-10-14 21:19:14 -07:00
KimLS 44b9c99781 Relay link improvements, considering changing it. 2016-10-14 19:48:49 -07:00
Akkadius 8496bf16ff eqemu_server.pl [skip ci] Make the internet connection check more multi-lingual friendly 2016-10-14 14:37:25 -05:00
Michael Cook (mackal) e86fca3aff Add NPC NPC faction check to BeamDirectional 2016-10-14 13:59:45 -04:00
Michael Cook (mackal) 46cbd147b5 clang format BeamDirectional 2016-10-14 13:58:20 -04:00
Michael Cook (mackal) 05ed623056 Add NPC NPC faction check to ConeDirectional 2016-10-14 13:55:04 -04:00
Michael Cook (mackal) c90a436db3 Clang format ConeDirectional 2016-10-14 13:52:01 -04:00
Michael Cook (mackal) 1e865a5246 Take in elem/bane dmg in BS calc 2016-10-13 23:55:44 -04:00
Michael Cook (mackal) 343c41bb18 Elemental dmg shouldn't allow you to hit bane only 2016-10-13 23:54:56 -04:00
KimLS 4ba0aa8e7f Basic relay link connection 2016-10-11 21:34:26 -07:00
Joshua Packard a5b19d0c0d Added 0.1 to calculated Z so that objects show better above ground 2016-10-10 09:39:55 -07:00
Paul Coene c263c4ef07 2nd check for faction not needed - had to either check for sneaking again
or remove un-needed 2nd check.
2016-10-09 11:12:09 -04:00
Paul Coene 7b5ea9e99c Fix rogue merchant usage under sneak. 2016-10-09 10:22:55 -04:00
Michael Cook (mackal) 013f7cfd21 Set no_target_hotkey in Mob ctor
Fixes UBSan error
2016-10-03 01:35:11 -04:00
KimLS 7a3147a3b3 Streams work on all of the servers now 2016-09-29 22:21:39 -07:00
Joshua Packard 379ef7eed3 Added optional SQL to apply max z updates 2016-09-29 16:49:05 -07:00
KimLS a76149c8e3 Some work on compression, the way the client does it is... bizarre and not how i orig thought it would be. 2016-09-28 23:51:37 -07:00
Joshua Packard 329c9c8d98 Reordered zone initialization
Needed to reorder zone init so that the zonemap is loaded before ground spawns are made, otherwise the best Z won't calculate.
2016-09-28 19:26:44 -07:00
Joshua Packard 4fa8c89e5c Added Best Z Calculation to Ground Spawn Loc 2016-09-28 19:24:09 -07:00
KimLS f2be05f47f Working on compression, still needs work 2016-09-26 14:51:12 -07:00
Xackery 19b6a96063 Changed lost exp message to all be 15. 2016-09-26 02:11:50 -07:00
Xackery 6079b34a2a Added Ruleset AA:ShowExpValues. 2016-09-26 02:09:39 -07:00
KimLS 95d4e95400 Compression needs work but finished the eqstream abstraction layer otherwise. 2016-09-25 22:24:28 -07:00
KimLS 5cad3f62d0 EQStream abstraction layer 2016-09-25 15:10:34 -07:00
KimLS 751e61d6e5 Converted all the EQStreams into EQStreamInterfaces, dear god help us. 2016-09-24 22:43:29 -07:00
Michael Cook (mackal) 4cb7d9a352 Remove ability for charmed NPCs from summoning
These rules do not appear to be true on live
They also don't look to have ever been true?
2016-09-22 00:32:01 -04:00
Michael Cook (mackal) b04844aa94 Fix merge [skip ci] 2016-09-21 23:54:51 -04:00
Akkadius b15ada974f Merge pull request #555 from noudess/master
Task experience based on % of level did not take into effect hell level rule
2016-09-18 20:38:08 -05:00
Paul Coene e2587b78f5 Merge remote-tracking branch 'upstream/master'
Conflicts:
	changelog.txt
2016-09-18 21:32:09 -04:00
Akkadius 06dfba3c81 Merge pull request #557 from KinglyKrab/master
Added quest global support for zone_controller.
2016-09-14 15:34:16 -05:00
Kinglykrab 8aa942cd27 Added quest global support for zone_controller. 2016-09-14 16:31:52 -04:00
Akkadius a9070b1327 Merge pull request #556 from KinglyKrab/master
#summon will now work when you are in an instance.
2016-09-12 01:42:53 -05:00
Akkadius 745510ea75 Massive overhaul of the update system and EQEmu Server management utility framework
(known as eqemu_update.pl) now known as eqemu_server.pl
	- eqemu_server.pl is now a general EQEmu Server management utiltiy framework that can be used
		to extend to many purposes. It's main purpose is to simplify server management
	- eqemu_server.pl changes:
		- Menu has been completely changed, instead of a number based (enter number and hit enter)
		you now type commands within the menu (Ex: 'database')
		- Handles last mile installation for Windows Servers (See Github Readme)
		- Handles last mile installation for Linux Servers (See Github Readme)
			- Ubuntu
			- Debian
			- Fedora
			- CentOS
		- Now checks for Internet connection before performing web requests
		- Database:
			- Regular schema updates now happen automatically, if new binaries present updated
				database schema changes, script will backup first, auto update database, and continue
				world bootup
			- Regular bots database schema changes now happen automatically similarily to the above
			- Database checks can also be ran manually via the script menu
		- CLI Arguments
			- Arguments passed to eqemu_server.pl can execute the same name-based operations that
				are present in the interactive menu
					- Example: "perl eqemu_server.pl opcodes" will download opcodes
					- Example: "perl eqemu_server.pl backup_player_tables" will backup and export player tables
		- Bots
			- Bots can now be automatically setup in Linux or Windows via the 'setup_bots' command
				- Windows will auto download binaries and install, along with installing bots db schema
				- Linxu will auto compile binaries and install, along with installings bots db schema
		- Utility scripts
			- Linux now has the following utility scripts for download, available via menu 'utility_scripts'
				and via Linux default install:
					- server_launcher.pl
					- server_start_dev.sh
					- server_start.sh
					- server_status.sh
					- server_stop.sh
		- Usage analytics
			- eqemu_server.pl now collects usage analytics, this is very helpful for our developers
				- Example: We can see how many installs have been performed:
					https://github.com/EQEmu/Server#server-installs
				- This helps us see how often certain utilities are used as well
		- Console Messages
			- All script messages have been prefixed with a bracket action Ex: [Update] [Database] [Info]
				to be more consistent with our log conventions
		- 'New Server' Utility
			- Running 'new_server' from the main menu or 'perl eqemu_server.pl new_server' while in
				a completely new folder with just the script present, will allow a server operator
				to initiate a full clean PEQ install in that folder. Pulling down all assets and
				installing a PEQ database with the name the server operator gives the prompts in the
				script
2016-09-12 01:31:35 -05:00
Kinglykrab f6d721dd72 #summon will now work when you are in an instance. 2016-09-11 19:25:41 -04:00
Paul Coene 0503e85fd3 Updated changelog 2016-09-10 14:26:47 -04:00
Paul Coene 0232f4f672 Merge remote-tracking branch 'upstream/master' 2016-09-10 14:21:59 -04:00
Paul Coene 56d355935b Fix task experience by level % to take into account hell level rule. 2016-09-10 14:21:19 -04:00
Natedog2012 d260bb5cd4 Merge pull request #554 from KinglyKrab/master
Added support for server-wide marquee messages.
2016-09-10 10:10:18 -07:00
Kinglykrab 4816c1fc9a Added support for server-wide marquee messages. 2016-09-09 23:59:23 -04:00
Michael Cook (mackal) 50469b858b Merge pull request #553 from KinglyKrab/master
Added GetAAPercent() to Perl and Lua.
2016-09-08 22:08:47 -04:00
Kinglykrab 64998a398d Added GetAAPercent() to Perl and Lua. 2016-09-08 21:59:15 -04:00
Akkadius 9a3af63f65 Update readme [skip ci] 2016-09-07 15:10:16 -05:00
Akkadius 5679f45f5b Update readme [skip ci] 2016-09-07 12:45:14 -05:00
Akkadius 66c0da85e6 Take out Linux source build from the install.sh file since eqemu_server.pl is flexibly taking care of it 2016-09-06 22:51:29 -05:00
Akkadius 4246e4f79b Fix linux installs when in new_server routine [skip ci] 2016-09-06 22:44:37 -05:00
Akkadius 90dc7a4e38 Fix linux installs [skip ci] 2016-09-06 22:36:50 -05:00
Akkadius bf28354301 Upload Linux installer for Debian/Ubuntu/CentOS/Fedora utils/scripts/linux_installer/install.sh [skip ci] 2016-09-06 22:14:14 -05:00
Akkadius 5f1141dfb1 eqemu_server.pl - Auto update bots database on world bootup if bots enabled [skip ci] 2016-09-06 22:04:38 -05:00
Akkadius 5b03fba463 Update eqemu_server.pl - Fix windows installs [skip ci] 2016-09-06 20:04:21 -05:00
Akkadius 0efd0c5f73 Update eqemu_server.pl [skip ci] 2016-09-05 15:26:12 -05:00
Akkadius 2947e3f39f Update eqemu_server.pl [skip ci] 2016-09-05 02:33:18 -05:00
Akkadius 77974c83d7 Update eqemu_server.pl [skip ci] 2016-09-05 02:31:28 -05:00
Michael Cook (mackal) d0bb3047f0 Let's fix the fear pathing flags right away after SE_ImmuneFleeing
This speeds up the response to spells like Call of Challenge
Before it would fix the flags the next tick, which makes the spell
mostly useless
2016-09-04 20:59:39 -04:00
Michael Cook (mackal) 739b1bfaa3 Fix target buffs showing PC songs 2016-09-03 21:54:59 -04:00
Uleat fb308eaa01 Rule-based update to 'Bind Wound' behavior 2016-09-03 17:08:48 -04:00
Michael Cook (mackal) 7c40bcff53 Fix enrage for NPC classes that can't ripo 2016-09-02 18:16:09 -04:00
Akkadius ec87656d58 Add rule Spells:NPCInnateProcOverride, defaults to true 2016-09-01 01:05:06 -05:00
Uleat 159ba9f487 Fix for BotDatabase::SaveEquipmentColor crash 2016-08-31 23:02:16 -04:00
Michael Cook (mackal) d8fe5124ff Fix some spell set loading issues 2016-08-29 19:23:40 -04:00
Michael Cook (mackal) fa337d441e Use StopCasting when we send SPELL_RECAST error 2016-08-29 14:08:22 -04:00
Michael Cook (mackal) ea1ae1a0a4 Use StopCasting instead of Interrupt on SpellFinished failure
Most of these failures already show a message, live doesn't double
up on failure message + interrupt message, so lets not

There are a few logic error returns, but those really shouldn't happen
2016-08-29 13:27:42 -04:00
Michael Cook (mackal) 95ea61114a Merge pull request #551 from N0ctrnl/patch-1
Added rule to allow MQ2 targeting without filling up the hackers table
2016-08-28 17:34:19 -04:00
Kurt Gilpin 585e5830f7 Update client_packet.cpp 2016-08-28 12:23:59 -05:00
Kurt Gilpin bfb77803d8 Update client_packet.cpp 2016-08-28 07:03:00 -05:00
Kurt Gilpin 364ab42c49 Add rule to ignore MQ2 targeting 2016-08-28 07:00:20 -05:00
Michael Cook (mackal) 89183cf8b7 clang-format LoadZoneObjects 2016-08-27 22:26:44 -04:00
Michael Cook (mackal) aaa116d97c Add support for object display names
Ex. Kejek Forge in Stonebrunt Mountains
2016-08-27 22:24:08 -04:00
Michael Cook (mackal) 4360021fc9 Merge pull request #550 from KinglyKrab/master
World:EnableIPExemptions should be false by default. (Woops.)
2016-08-27 21:45:17 -04:00
Kinglykrab b7b233d46f World:EnableIPExemptions should be false by default. (Woops.) 2016-08-27 21:44:04 -04:00
Akkadius 5c43f2d80e Merge pull request #549 from KinglyKrab/master
Fixed quantity in merchant purchase.
2016-08-27 16:59:58 -05:00
Kinglykrab ed9b6db369 Added optional IP-based account exemptions. 2016-08-27 17:49:04 -04:00
Akkadius dd0d15e134 More testing [skip ci] 2016-08-27 03:20:22 -05:00
Akkadius 29d6817019 More testing [skip ci] 2016-08-27 03:19:33 -05:00
Akkadius 46bb559af1 Updated db_dumper.pl script print output formats [skip ci] 2016-08-27 01:41:09 -05:00
Akkadius 031a37baa1 Set eqemu_server.pl to check database manifest for only updates that are higher than the local database version - this will prevent false previous match conditions [skip ci] 2016-08-27 01:25:22 -05:00
Akkadius 62a4ce76b6 Merge branch 'master' of https://github.com/EQEmu/Server 2016-08-27 01:23:23 -05:00
Akkadius d85e6ae495 Set eqemu_server.pl to check database manifest for only updates that are higher than the local database version - this will prevent false previous match conditions [skip ci] 2016-08-27 01:23:03 -05:00
Akkadius 32c4c360bd Add IsHorse to default false in Mob constructor 2016-08-27 01:21:23 -05:00
Akkadius f2a075d432 Keep eqemu_server.pl from chown'ing the script to a pre-fixed user [skip ci] 2016-08-27 00:52:48 -05:00
Akkadius 2dee62c850 Refactor didn't save (oops) 2016-08-27 00:47:55 -05:00
Akkadius db380944ac Prevent horses (player mounts) from being depopped during a #repop 2016-08-27 00:46:45 -05:00
Kinglykrab 28c5b32624 Modified quantity in Merchant_Sell_Struct to be uint32 in accordance with Merchant_Purchase_Struct. This will allow you to buy stacks of items beyond 255. (Tested with a stack of 1,000 Arrows.) 2016-08-26 18:46:22 -04:00
Akkadius 6db350790e Merge branch 'master' of https://github.com/EQEmu/Server 2016-08-26 15:02:43 -05:00
Akkadius 3f8ff1373c Fix script call issue [skip ci] 2016-08-26 15:02:12 -05:00
Akkadius d6ee505c63 Merge pull request #548 from Natedog2012/master
Add TiltX and TiltY manipulation to objects (Perl)
2016-08-26 14:28:28 -05:00
Akkadius e84b2ba224 Merge pull request #546 from noudess/master
Mobs that path and then despawn do so whether zone idle or active
2016-08-26 14:26:50 -05:00
Natedog2012 4de9b2c53e Add TiltX and TiltY manipulation to objects (Perl)
Translate OP_GroundSpawn for Titanium

#perl plugin http://wiki.eqemulator.org/i?Module=Pastebin&Paste=u9IbA6Ql
2016-08-26 06:39:39 -07:00
Akkadius 385823461b Update eqemu_server.pl [skip ci] 2016-08-25 18:30:04 -05:00
Akkadius 85c28185a2 Update eqemu_server.pl - Add internet connection checks for people who are using EQEmu locally [skip ci] 2016-08-25 18:01:17 -05:00
Akkadius 25de25a777 Update eqemu_server.pl - Add internet connection checks for people using EQEmu locally [skip ci] 2016-08-25 18:00:13 -05:00
Akkadius 357a92dfee Update eqemu_server.pl [skip ci] 2016-08-25 16:46:34 -05:00
Akkadius 35c83db432 eqemu_server.pl - Run script after self upgrade regardless of OS [skip ci] 2016-08-25 16:43:35 -05:00
Akkadius f7cc1053f1 eqemu_server.pl - Update regardless of run condition [skip ci] 2016-08-25 16:39:35 -05:00
Akkadius d5864aea3e Few more adjustments [skip ci] 2016-08-25 16:36:48 -05:00
Akkadius 2b2d6e1ef5 Less fail [skip ci] 2016-08-25 16:33:50 -05:00
Akkadius f99523dc48 Migration to new EQEmu Server management script interface 2016-08-25 16:32:21 -05:00
Akkadius 69913c0897 Update eqemu_server.pl [skip ci] - More cleanup 2016-08-25 15:01:59 -05:00
Akkadius 75694e8797 Update eqemu_server.pl [skip ci] Testing self update 2016-08-25 13:00:57 -05:00
Akkadius 24856b6a2d Update eqemu_server.pl [skip ci] Testing self update 2016-08-25 12:56:30 -05:00
Akkadius a70291f20f Update eqemu_server.pl [skip ci] 2016-08-25 12:50:26 -05:00
Akkadius 6e1a5eac94 Update eqemu_server.pl [skip ci] 2016-08-25 12:17:24 -05:00
Akkadius 37b87e98f4 Update eqemu_server.pl [skip ci] 2016-08-25 01:18:03 -05:00
Michael Cook (mackal) 55d2e9b842 Only correct spell slots when we're sending to self
This will fix display issues with lots of buffs on NPCs
2016-08-24 23:15:31 -04:00
Akkadius 3afc5d0890 Update eqemu_server.pl [skip ci] 2016-08-24 21:03:23 -05:00
Akkadius f6b6fcc2c5 Update eqemu_server.pl 2016-08-24 20:38:56 -05:00
Paul Coene 5039aa07a5 updated changelog 2016-08-23 14:50:29 -04:00
Paul Coene 8048239a81 Merge remote-tracking branch 'upstream/master' 2016-08-23 13:55:52 -04:00
Paul Coene ecdc0f7096 Fixed so mobs that depop at end of pathgrid still path and depop
whiel zones are empty.  This makes these mobs no longer always appear
at start locations for the 1st person in a zone after long idle.
2016-08-23 13:54:51 -04:00
Akkadius 2c3107fbe9 Uploading initial eqemu_server.pl (was eqemu_update.pl) to start deprecrating of eqemu_update.pl and re-working of the structure of the script, more to come. 2016-08-22 16:07:44 -05:00
Michael Cook (mackal) c2b31bd6e2 Fix EVENT_ATTACK crash (thanks image)
Note: I guess we need to check if it's null in the actual quest too
2016-08-21 20:26:54 -04:00
Akkadius a8ba563632 Update eqemu_update.pl [skip ci] 2016-08-20 23:50:59 -05:00
Akkadius 4065df7930 Update eqemu_update.pl [skip ci]
Add option 21) Dump DB Player tables (Exports to backups\player_tables_export_(date).sql)
Player table list is referenced/maintained in utils/sql/character_table_list.txt
2016-08-20 23:49:51 -05:00
Akkadius 0b06044dce Update db_dumper [skip ci]
Fix issues with file name output when no compression is set
Add option to set backup_name="backup_name" to prefix backup outputs
2016-08-20 23:47:53 -05:00
Akkadius 93464e3963 Remove duplicate table [skip ci] 2016-08-20 23:32:01 -05:00
Akkadius 8dd18a43a0 Update db_dumper [skip ci] 2016-08-20 23:31:34 -05:00
Akkadius afe42ccdaf Update db_dumper.pl 2016-08-20 23:23:17 -05:00
Akkadius f5a7117bdf Add character_table_list.txt for database backup script reference 2016-08-20 23:13:16 -05:00
Michael Cook (mackal) 696c02c0f0 Move instrument mod outside of the EFFECT lop in SpellEffect 2016-08-20 14:30:54 -04:00
Akkadius 6daf207323 Quick test 2016-08-19 16:31:46 -05:00
Michael Cook (mackal) f67cd057f3 Fix issue with linked spell timers 2016-08-18 21:09:02 -04:00
Michael Cook (mackal) 0789d10d3e Add logging message for setting linked reuse 2016-08-18 20:51:58 -04:00
Akkadius a07149919d Pets now don't actually spawn until the player has fully entered the zone (Live-like) 2016-08-18 17:28:32 -05:00
Michael Cook (mackal) f9f3a8f3bd Expendable Arrows ignore EQ 2016-08-17 01:10:37 -04:00
Akkadius 1def512b4c One more test 2016-08-16 21:56:43 -05:00
Akkadius b85d5a6d98 Discord final test 2016-08-16 20:44:04 -05:00
Akkadius 94fabc87f0 Travis Discord test 2 2016-08-16 19:50:12 -05:00
Akkadius d3afde1aa1 Travis Discord test 2016-08-16 19:36:26 -05:00
Michael Cook (mackal) 5a0d2b527b Add a StopCasting function and make some use of it
Unsure if all of these cases should use interrupt or stop casting
2016-08-16 17:52:14 -04:00
Michael Cook (mackal) 3d64878e60 Skip OP_BeginCast for discs 2016-08-15 15:23:37 -04:00
Michael Cook (mackal) 26772b721c Fix overhaste stack check 2016-08-15 14:21:39 -04:00
Michael Cook (mackal) 3c95545ea3 Remove IsCasting check from Client::SendManaUpdatePacket 2016-08-15 01:23:47 -04:00
Michael Cook (mackal) ae5689ffb4 Clean up OP_ManaChange 2016-08-15 01:17:53 -04:00
Michael Cook (mackal) e894e96404 Implement Linked Spell Reuse Timers
They started linked spells at OoW launch (I think)

At least canni was linked then.

This is rather user unfriendly, but that's live like.
Ex. the spells aren't actually put on cool down so you can attempt to cast them
still but you will be interrupted.

Titanium is particularly unfriendly with large differences in reuse times
2016-08-14 23:32:27 -04:00
Akkadius ed5715ccd9 Merge pull request #540 from KinglyKrab/master
Added optional avoidance cap rules. Check changelog.txt.
2016-08-13 21:27:25 -05:00
Uleat 7f9af238f8 Fix for potential crash in ItemInst::GetTotalItemCount() 2016-08-13 19:51:12 -04:00
Michael Cook (mackal) fd1e425abc Fix potential crash in ucs/clientlist.cpp 2016-08-13 17:19:20 -04:00
Michael Cook (mackal) 35c1eccbe1 Fix potential crash in zone/worldserver.cpp 2016-08-13 17:15:57 -04:00
Michael Cook (mackal) 69f06f736c Fix potential crashes in zone/spells.cpp 2016-08-13 17:15:00 -04:00
Michael Cook (mackal) 48fb483de6 Fix typo 2016-08-13 17:05:48 -04:00
Michael Cook (mackal) 8ce2921e3d Fix potential crashes in Mob::SpellEffect 2016-08-13 16:45:32 -04:00
Michael Cook (mackal) f06a9b3dce use std::abs in Map::FindClosestZ 2016-08-13 15:58:02 -04:00
Michael Cook (mackal) 3efc925264 And another 2016-08-13 15:47:44 -04:00
Michael Cook (mackal) a8db4532d0 Fix potential crash in #iteminfo 2016-08-13 15:46:35 -04:00
Michael Cook (mackal) ab35f8b842 Fix memset in QuestReward 2016-08-13 15:39:08 -04:00
Michael Cook (mackal) ef3cf099b8 Fix potential crash in Sacrifice 2016-08-13 15:35:28 -04:00
Michael Cook (mackal) 00cfe2d25f Fix potential crashes in attack.cpp 2016-08-13 15:26:07 -04:00
Michael Cook (mackal) 7a4c9b36a8 Fix logic issue in SendAlternateAdvancementRank 2016-08-13 15:20:48 -04:00
Michael Cook (mackal) 488c4941d2 Fix potential crash 2016-08-13 15:19:10 -04:00
Michael Cook (mackal) 97dc0a84dd Fix logic paren issue 2016-08-13 15:14:31 -04:00
Michael Cook (mackal) f01c890966 Crash fix
The other thing needs to be looked at too, but I guess we never run
into an issue where this actually is a nullptr because bad things
would happen here ...
2016-08-13 15:09:43 -04:00
Kinglykrab 50de63117d Added optional avoidance cap rules. Check changelog.txt. 2016-08-13 07:19:58 -04:00
Michael Cook (mackal) 4e4d82857c Move OP_BeginCast above instant cast shortcut
For casted seplls, we should always see this. Mostly this shortcut breaks
spell awareness for NPC spells. (most of them are instant cast)
2016-08-12 22:07:03 -04:00
Michael Cook (mackal) 039e0fbb83 NPC innate procs overwrite TargetType to ST_Target 2016-08-12 21:53:14 -04:00
Michael Cook (mackal) e1a02455d8 Merge pull request #539 from clucksoft/crash_fix
Prevent crash in spell casting when group doesn't exist
2016-08-11 14:22:51 -04:00
Russell Kinasz c1c9ec2790 Prevent crash in spell casting when group doesn't exist 2016-08-11 11:04:03 -07:00
Michael Cook (mackal) e90e141a79 std::unordered_map::count is much slower than find 2016-08-10 23:51:06 -04:00
Michael Cook (mackal) 38d3f9b7c0 Client checks song flag first
This fixes bugs with buffs marked as disc and song (they go to the song window now)
Before the client got confused and gave up displaying them at all!
2016-08-10 13:16:32 -04:00
Michael Cook (mackal) 7d62b208ca Revert "Rate limit saving to at most once a second"
This reverts commit f26dce39c3.

No easy mode I guess
2016-08-09 21:30:10 -04:00
Michael Cook (mackal) 27f6826fd3 Add rule Spells:AllowItemTGB for custom servers 2016-08-08 20:21:38 -04:00
Michael Cook (mackal) 051f9ffab9 fix bard song mods on instant spells (nukes, procs) 2016-08-08 15:22:26 -04:00
Michael Cook (mackal) bdb083eac7 Previous disc buff check incorrectly excluded Savage Spirit AA line
This still doesn't fix Untamed Rage ... unsure on that one :(
2016-08-07 18:55:02 -04:00
Michael Cook (mackal) 4b93ef0a98 Fix SE_CastOnFadeEffect 2016-08-07 18:17:39 -04:00
Michael Cook (mackal) e86d11250b Actually remove expendable AAs from the DB 2016-08-07 14:32:30 -04:00
Michael Cook (mackal) e5746c3b2e Fix EVENT_LOOT broken by b43cfa126 2016-08-05 22:14:20 -04:00
Michael Cook (mackal) 6a7ea65dd0 Ask water map if we're in a zoneline to prevent false positives
I don't think this should open up any chance to exploit
Trying to use a ZL to go somewhere else is still detected etc

This should really cut down on false positives and we really can't
see real cheater from all the noise this creates
2016-08-05 01:07:12 -04:00
Michael Cook (mackal) 68df09a570 Implement PVP regions 2016-08-04 23:56:08 -04:00
Michael Cook (mackal) d53d569020 Port EQMacEmu's improved NPC stat scaling formula
Old formula can be used by setting NPC::NewLevelSacling to false
2016-08-04 22:12:33 -04:00
Michael Cook (mackal) 1d12f92934 Level 50+ NPCs will now respond to yells for help regardless of con color 2016-08-04 20:36:15 -04:00
Michael Cook (mackal) e89fa01d89 Port Aggro:UseLevelAggro from EQMacEmu
This will make level 18+ mobs braver
2016-08-04 20:33:29 -04:00
Uleat 4c49397ef6 Merge branch 'master' of https://github.com/EQEmu/Server 2016-08-04 16:12:58 -04:00
Michael Cook (mackal) 8dc8e53218 Added some more comments to PassCastRestrictions 2016-08-04 13:50:20 -04:00
Uleat d0fbbed20d Added a trap for Bot::GetNeedsCured() random crash (bot server admins: watch your logs!) 2016-08-04 07:09:34 -04:00
Michael Cook (mackal) 33407ee0da Forgot divination 2016-08-03 23:14:02 -04:00
Michael Cook (mackal) c81a5e0783 Limit casting skill ups to casting skills 2016-08-03 23:06:00 -04:00
Michael Cook (mackal) 66fec40169 Move Enrage check to after the immune ripo check 2016-08-03 22:38:33 -04:00
Michael Cook (mackal) 60f2d14caa Rework bash/kick stun based on client
This is what the client is doing. It doesn't reuse all the old rules, so those
can't be tweaked unless someone wants to add them back in
2016-08-03 17:37:09 -04:00
Michael Cook (mackal) 538d6a2a33 Hack to fix RNG Nature Veil line 2016-08-03 01:44:33 -04:00
Michael Cook (mackal) f26dce39c3 Rate limit saving to at most once a second
There are A LOT of unneeded saves ...

This will prevent a lot of excessive database hits at least
with very little room to exploit
2016-08-03 01:13:51 -04:00
Michael Cook (mackal) acb5bb3e3e If this flag is set, we JUST saved
Also saved due to an OP_Save very recently ...
2016-08-03 00:33:22 -04:00
Michael Cook (mackal) 16125c38af Lets not save here if we're zoning 2016-08-03 00:13:47 -04:00
Michael Cook (mackal) 69db67efe5 Remove extra save 2016-08-02 23:32:37 -04:00
Michael Cook (mackal) 37ecc69088 Update UF packet stuff to have 30 BUFF_COUNT 2016-08-02 21:10:32 -04:00
Michael Cook (mackal) d68a3b191e Give pets 30 buff because that's what they got 2016-08-02 21:08:05 -04:00
Michael Cook (mackal) 64cf613189 Update GetCurrentBuffSlots() for TSS free slots
The client also checks if you have any bonus from spells and items
so why not check that as well
2016-08-02 19:00:33 -04:00
Uleat f3da7773d3 Merge branch 'master' of https://github.com/EQEmu/Server 2016-08-02 17:49:17 -04:00
Uleat 7c9bd80c1e Changed SendZoneSpawnsBulk to a more like-like behavior 2016-08-02 17:49:08 -04:00
Michael Cook (mackal) 2bae779a9b NPCs don't have separate buff windows 2016-08-02 16:48:58 -04:00
Michael Cook (mackal) e862994716 RoF/RoF2 spell gem refresh in PP
This fixes issues with long recast spells
2016-07-31 18:09:04 -04:00
Michael Cook (mackal) f612f8be42 Fix typo 2016-07-31 17:35:33 -04:00
Michael Cook (mackal) ef2c17748e Implement extra spell gems!
New limits:
    Tit: 9
    SoF: 9
    SoD: 10
    UF: 12
    RoF: 12
    RoF2: 12

The SoF client doesn't actually support 10 like SoF should
RoF/RoF2 actually have 4 extra broken spell gems in the UI. They don't work and
will likely crash your client

Quest stuff assumes you are passing in valid slots.
(note the old default of 10 should be 22)

There are still somethings to do like clean up the memmed spells if one switches
to an older client that doesn't support as many as their previous client.
2016-07-31 17:16:23 -04:00
Michael Cook (mackal) 4c4b0aba0c Switch trading to call CommonBreakInvisible() 2016-07-30 12:51:17 -04:00
Uleat 4decdb3e4d Added zone map mmf discovery message 2016-07-29 21:58:42 -04:00
Uleat 6b3078d0f7 Fix for 64-bit Zone MMF compiles 2016-07-29 18:26:23 -04:00
Michael Cook (mackal) 3a4b341ad6 Allow quest controlled TS to have no returns 2016-07-29 15:29:28 -04:00
Michael Cook (mackal) 2a2ce6da5d Fix item clicks being TGBable 2016-07-29 15:14:26 -04:00
Michael Cook (mackal) 239c478f31 Add some comments to target types [skip ci] 2016-07-29 02:55:43 -04:00
Michael Cook (mackal) f6c62af82e Update comment [skip ci] 2016-07-29 02:26:26 -04:00
Uleat 84db0ec2c5 Zone MMF Implementation (for map files) 2016-07-28 22:50:06 -04:00
Michael Cook (mackal) 345f3d6301 Fix Tit OP_Buff decode 2016-07-27 19:58:24 -04:00
Michael Cook (mackal) de5170c5cb Fix mana burn 2016-07-26 17:10:06 -04:00
Michael Cook (mackal) 7674b3a077 Fix some same spell stacking issues 2016-07-26 16:25:19 -04:00
Michael Cook (mackal) 11e017ccb9 Fix bard mod in PP for UF 2016-07-25 16:37:27 -04:00
Michael Cook (mackal) bda4fcfb26 Fix up SpellBuff struct
Please report any bugs you find. There shouldn't be unless I messed up the struct
for a client I didn't throughly test for
2016-07-25 16:22:48 -04:00
Michael Cook (mackal) a7fd9312d0 Fix syntax error 2016-07-24 22:58:48 -04:00
Michael Cook (mackal) 3963897fe4 There is a different rez spell depending on race 2016-07-24 22:53:57 -04:00
Michael Cook (mackal) f42b0351fd Improve list of skipped effects in stacking code
This is the list according to the client (RoF2)

Please report any stacking anomalies
2016-07-24 22:24:53 -04:00
Uleat 37cb9f00f6 Removed another unneeded slash 2016-07-24 18:01:14 -04:00
Michael Cook (mackal) 343b781e74 Implement cast_not_standing and fix Cazic Touch
No idea why this spell field does this, but that's what the client
is doing with it ...
2016-07-23 18:40:17 -04:00
Michael Cook (mackal) f428a8a56a Add a CastWhileInvis check and fix some issues 2016-07-23 18:07:56 -04:00
Michael Cook (mackal) cd9a7f1d5d Cap tic diff to 0 for duration based calcs
This will match Splurt with the double 191
2016-07-23 17:52:30 -04:00
Michael Cook (mackal) 83548ee405 Fix buff tics
This will not fade buffs at 6s :P
2016-07-23 17:41:16 -04:00
Michael Cook (mackal) 5f588934a9 Make decaying spell bonuses not depend on CaclBonuses being called some other way
This just sets a flag that will tell us we need to recalc bonuses every tick

Before these kind of depended on it being caused some other way
2016-07-23 13:55:36 -04:00
Michael Cook (mackal) 1f5dcb6965 Make SE_SpellResistReduction not complain 2016-07-21 20:27:08 -04:00
Michael Cook (mackal) 5f111f159b Update comment [skip ci] 2016-07-21 14:05:29 -04:00
Michael Cook (mackal) 527ee56fb2 Fix Distance Mod scaling
The client clamps the distance between the min/max
2016-07-20 17:49:33 -04:00
Michael Cook (mackal) 8396f19e85 Add buff level restrictions for pets 2016-07-20 16:27:22 -04:00
Akkadius aadc4b5e6b Update eqemu_update.pl 2016-07-20 14:15:00 -05:00
Michael Cook (mackal) ccb5427b45 Make VS debug mode happy
This actually hurts microbenchmarking

I couldn't get the ModelEntry::polys vector to play nice with benchmarking
so it will just be using push_back so I don't have write a new ctor
(writing a new ctor and using emplace_back vs push_back were equal)
2016-07-18 21:57:25 -04:00
Michael Cook (mackal) 8983f3c5dc Merge pull request #537 from noudess/master
Fix for BuffDurationPacket on movement speed buffs.
2016-07-18 16:05:28 -04:00
Paul Coene 9349d5d473 Another fix for when BuffDurationPacket breaks client effects on spells.
In this case run speed spells like SoW.
2016-07-18 15:30:55 -04:00
JJ ae6ceddab7 Merge pull request #536 from noudess/master
Fix Voice Graft to work only when targetting pet.
2016-07-18 14:54:43 -04:00
Paul Coene 84c90715be Reverse checks for voice graft to short curcuit when no pet. 2016-07-18 14:37:21 -04:00
Michael Cook (mackal) aeff31ba7a Fix error with /setstartcity 2016-07-18 13:57:14 -04:00
Michael Cook (mackal) f431e820ef Optimize Map::LoadV2 a bit
Microbenchmarking showed ~33% increase in loading moors
Real world testing showed ~48%
2016-07-17 23:35:18 -04:00
Michael Cook (mackal) c41521c310 Fix saving binds on charcreate 2016-07-17 22:50:00 -04:00
Akkadius f437232db1 Overhauled worldserver logging
- Now displays account logins
 - Zoning from character select
 - Zoning from zone to zone
 - When any other server process connects to world
 - Adjust some zone bootup messages etc.

Adjusted logging code bits all over and refactored variables for readability etc.
2016-07-17 20:45:58 -05:00
Akkadius 3ed43d50f2 Resolving glitchy/choppy mob pathing issues 2016-07-17 19:07:48 -05:00
Michael Cook (mackal) 7cd613e5f2 Comment spell struct with official names for each field 2016-07-17 02:13:13 -04:00
Michael Cook (mackal) 921136c987 Exclude in other Perma Illusion spot 2016-07-16 19:40:20 -04:00
Michael Cook (mackal) d4df2e7351 Exclude Minor Illusion and Illusion: Tree from perma 2016-07-16 19:33:36 -04:00
Michael Cook (mackal) 9cf553232d Tweak spell dot stacking exempt based on client 2016-07-16 18:18:41 -04:00
Uleat 6cb2fdd737 Changed constructor call for stringstream in ClientTaskState::EnableTask/DisableTask (write position issues) 2016-07-15 19:32:46 -04:00
Michael Cook (mackal) bbf4d19de3 Revert "Changed tuple use to struct in maps.cpp (LoadV2) (should help in client drops where slow zone boot-ups are a factor)"
This reverts commit 02cedce54e.

This is breaks moors!
2016-07-15 15:20:36 -04:00
Uleat 02cedce54e Changed tuple use to struct in maps.cpp (LoadV2) (should help in client drops where slow zone boot-ups are a factor) 2016-07-14 13:22:36 -04:00
Uleat 871fcd1fc8 Fix for quest enabletask/disabletask api queries 2016-07-14 12:47:55 -04:00
Uleat 7457d832f8 Changed query in BotDatabase::LoadGroupedBotsByGroupID() to use standard table query over view use (should help in cases where players time-out when zoning) 2016-07-12 20:22:14 -04:00
Michael Cook (mackal) a9ff407657 Optimize Mapp:RotateVertex()
This function can get rather expensive and waste a surprisingly
large amount of time. Using moors as a test zone simply switching
from the C math API cos/sin to std::cos/std::sin seemed to help

11.11% Map::RotateVertex(glm::tvec3<float, (glm::precision)0>&, float, float, float)
4.16% Map::RotateVertex(glm::tvec3<float, (glm::precision)0>&, float, float, float)
2016-07-10 23:18:26 -04:00
Paul Coene 1ba7f0cd65 Fix so you can still speak to NPCS (patch to last patch for voice graft) 2016-07-09 16:35:57 -04:00
Paul Coene 56fcabc119 Fix Voice Graft to allow you to speak by targetting yourself. 2016-07-09 15:40:19 -04:00
Uleat 402353affa Important fix for mob pathing (see changelog.txt) 2016-07-09 03:10:54 -04:00
Uleat bc196f2e50 Changed world server zone boot-up failure message to 'General' level to facilitate world-initiated zone boot-up issues 2016-07-08 16:19:14 -04:00
Uleat 148eaf7048 Merge branch 'master' of https://github.com/EQEmu/Server 2016-07-08 15:33:42 -04:00
Uleat b44da7c13a Fix for command #traindisc not saving disciplines when not used on self 2016-07-08 15:33:36 -04:00
Michael Cook (mackal) 4b57f69cba Fix illusions on zone 2016-07-07 16:17:13 -04:00
Uleat 542d454fe0 Added rule 'NPC:UseClassAsLastName' to second spawn packet handler 2016-07-05 15:20:46 -04:00
Uleat 3d61df253d Added rule 'NPC:UseClassAsLastName' to allow certain npcs' class names to be hidden 2016-07-03 19:44:45 -04:00
Akkadius dcd276a5ce Merge pull request #534 from fzzzt/master
Add FreeBSD as a peer with Linux in eqemu_update.pl OS detection
2016-07-03 15:56:11 -05:00
Josh Endries bacaf6453e Add FreeBSD as a peer with Linux in eqemu_update.pl OS detection 2016-07-03 15:13:34 -04:00
Michael Cook (mackal) 860ee81a38 Break invis for AA casts 2016-06-30 21:59:50 -04:00
Michael Cook (mackal) bcec9501b7 Fix issue with invis not dropping for new item clicks
Clients using OP_ItemVerifyRequest couldn't break the invis
themselves, so we gotta for them
2016-06-30 21:49:20 -04:00
Michael Cook (mackal) 37b46d1289 Make more usage of CancelSneakHide 2016-06-30 21:49:00 -04:00
Michael Cook (mackal) 54de212214 Implement OP_CancelSneakHide
Didn't test every client, but they should all work
2016-06-30 17:50:31 -04:00
Michael Cook (mackal) a64343689c Refactor loot response a bit
Invis is dropped after ALL error checking now
Identified all the response types
2016-06-30 14:00:18 -04:00
Michael Cook (mackal) 3e0af2928b Remove duped code from CommonBreakInvisibleFromCombat 2016-06-30 01:30:51 -04:00
Uleat a5d79b25db Grr... 2016-06-28 16:56:42 -04:00
Uleat cb8843926c Merge branch 'master' of https://github.com/EQEmu/Server
# Conflicts:
#	changelog.txt
2016-06-28 16:20:17 -04:00
Michael Cook (mackal) 59ec184208 Merge pull request #533 from noudess/master
Res effects now block certain buffs like on live.  Blocked spells generate message like on live.
2016-06-28 13:34:39 -04:00
Paul Coene 9a010a90a9 Added Client:UseLiveBlockedMessage rule 2016-06-28 08:27:31 -04:00
Uleat 3d6fe8acba Fix for bot inventory save failure involving items with unlimited charges 2016-06-28 07:58:38 -04:00
Paul Coene 02ec76d2aa Res effects now block certain buffs like on live.
Blocked spells generate message as on live.
2016-06-27 11:14:33 -04:00
Natedog2012 8615df0a03 Bot names skip player name filter to allow for longer bot names.
RoF/RoF2/UF item packets allow for 1000 stack items again.. not capped at 254
2016-06-25 18:05:44 -07:00
Uleat 951f3239f1 Added rule Bots:AllowCamelCaseNames 2016-06-23 22:25:57 -04:00
Akkadius fe630bf7ca Adjust default lootdrop max level 2016-06-20 14:27:01 -05:00
Akkadius 1a2537f5d8 Adjust default lootdrop max level 2016-06-20 14:25:05 -05:00
Natedog2012 7b04b9ef4a Fix for #bot command crashing the zone when sent with no text following "#bot" 2016-06-18 23:37:17 -07:00
Michael Cook (mackal) 30b516e7bd Merge pull request #530 from EQEmu/luarocks
Add luarocks support
2016-06-17 21:09:40 -04:00
Akkadius c72749790d Update eqemu_update.pl 2016-06-16 13:14:27 -05:00
Akkadius 05780a9316 Update eqemu_update.pl 2016-06-16 02:17:11 -05:00
Akkadius 3889da7301 Update eqemu_update.pl [skip ci] 2016-06-15 02:02:32 -05:00
Michael Cook (mackal) 57ebfd2675 Merge pull request #532 from noudess/master
Changed personal faction earned min/max values to -2000/2000.
2016-06-13 14:30:39 -04:00
Paul Coene b10187f9de Changed personal faction earned min/max values to -2000/2000. 2016-06-13 14:04:23 -04:00
Michael Cook (mackal) af99db7287 Merge pull request #531 from noudess/master
Fix for detrimental/beneficial spell overwrite and/or block.
2016-06-13 13:27:41 -04:00
Paul Coene 306ecf003a Spells like listless power and dread touch should be taking down/blocking
spells like augmentation and strenthen respectively.  The stacking code
was being bypassed when a beneficial spell and a detrimental spell for the
same effect were being compared.

With this code removed, the spells are compared and the stonger of the two
spells wins and replaces or blocks the other.

Without this change, for example, dread touch takes down strengthen on the
client, but the server still things strength is up, causing a mismatch.

With this change, client/server match.
2016-06-13 09:06:44 -04:00
Michael Cook (mackal) 2b2ebc75b0 Add luarocks support
This allows one to use the lua_modules folder as their luarocks tree
ex (from the server folder with lua_modules using default location)

luarocks --tree=lua_modules install luasql-mysql MYSQL_INCDIR=/usr/include

This will install the luasql mysql module so you can now do queries from lua
2016-06-11 15:59:46 -04:00
Michael Cook (mackal) 83bb10b32b Add support for sub folder style lua modules
Ex. lua_modules/?/init.lua will work (which some lua modules do use)
2016-06-11 13:23:52 -04:00
Drajor d9bdcf2aec Merge pull request #529 from EQEmu/currency
Currency
2016-06-11 21:04:38 +10:00
Drajor 3e25a3df5c Implemented RoF2 encoder for OP_CrystalCountUpdate (0x467f) 2016-06-11 20:24:36 +10:00
Drajor 73e91be281 Fixed vulnerability in handling of OP_CrystalCreate 2016-06-11 19:53:19 +10:00
Michael Cook (mackal) 471d7ec42d Merge pull request #528 from EQEmu/altcurr
Fixes #527
2016-06-10 23:31:43 -04:00
Drajor 1b6974ade3 Alternate currency sell price now matches RoF2 client calculation 2016-06-11 13:29:56 +10:00
Drajor c1a6a23e06 Fixes #527 2016-06-11 12:48:16 +10:00
Uleat 9ec299247c Reworked EQEmuDictionary to use class LookupEntry 2016-06-06 21:59:42 -04:00
Uleat 79549ba330 Merge branch 'master' of https://github.com/EQEmu/Server 2016-06-04 20:05:04 -04:00
JJ 4b15121f70 No need to have extra slash anymore due to b997a040d7 2016-06-04 19:53:22 -04:00
Uleat c29219f214 Split InventoryVersion::Pet into discrete sub-types 2016-06-04 07:04:31 -04:00
KimLS 51d8f00418 Add appveyor badge to readme (wip but still). 2016-06-02 20:12:41 -07:00
Uleat e843f66135 Cosmetic fix to match existing naming conventions 2016-06-02 20:19:40 -04:00
Uleat 542dc16752 Fix for bandolier 2H-weapon exploit 2016-06-02 20:07:25 -04:00
Uleat 62888170b0 Better the second time around... 2016-06-02 07:14:54 -04:00
Uleat ca0b26f89f Implementation clean-up 2016-06-01 09:34:16 -04:00
Uleat cd8cd90a38 Implemented EQEmu::TextureProfile 2016-06-01 08:54:26 -04:00
Uleat ae3c98c692 Implemented EQEmu::TintProfile 2016-06-01 04:58:52 -04:00
Uleat 767dfaef70 Another penguin bite... 2016-05-31 22:28:31 -04:00
Uleat c07fe35908 Fix for gcc failure 2016-05-31 22:17:58 -04:00
Uleat ea8f81feec Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot 2016-05-31 22:07:02 -04:00
Uleat a38417bf54 More eq_dictionary work - added invtype persistence checks 2016-05-31 19:12:54 -04:00
Uleat 0f54984966 Missed a few out of my working stash... 2016-05-31 01:52:51 -04:00
Uleat 6c1af93f58 Another lightsource/saylink/skills pass 2016-05-30 08:39:49 -04:00
Uleat 16895910e4 Another eq_dictionary pass 2016-05-30 06:52:25 -04:00
Uleat b155a603aa Added multi-type EQEmu::ValueWithin function 2016-05-30 03:32:01 -04:00
Uleat ecc9e41ab2 Fix for server crash related to deleting a bot with a spawned pet 2016-05-30 03:03:55 -04:00
Uleat 2a74d04635 Added offline client inventory version definitions and convertors 2016-05-29 20:30:03 -04:00
Uleat a089820464 Merged client_version and inventory_version into emu_versions files 2016-05-28 04:44:14 -04:00
Uleat 579efe83af Renamed EQEmu::Item_Struct to EQEmu::ItemBase to coincide with new inventory naming conventions (re-run shared_memory.exe) 2016-05-27 22:22:19 -04:00
Uleat a37a811014 Imported memory_buffer files from inv2 branch 2016-05-27 20:39:11 -04:00
Uleat 0ecc702612 ItemPacketType updates 2016-05-27 03:38:13 -04:00
Uleat a144ecd21b ItemPacketType note update 2016-05-26 17:23:57 -04:00
Uleat 772fa200ac Update to client limits 2016-05-26 05:27:21 -04:00
KimLS 4c3947efa6 Changes to UF and above clients on how spell buff tics are synced. 2016-05-25 22:00:28 -04:00
Uleat b5f09d435f Updated argument type..but, forgot to change methodology 2016-05-25 19:45:16 -04:00
Michael Cook (mackal) 56cb719d1a Merge pull request #522 from 9thsector/FreeBSDFixes
FreeBSD Compile Fixes
2016-05-25 18:53:56 -04:00
Michael Cook (mackal) e2a5ffe59e Merge pull request #525 from 9thsector/configfile-patch-location-fix
reording includes fixes patch file location problem
2016-05-25 18:53:46 -04:00
Uleat 71f128731f Renamed and moved SkillUseTypes enumeration to EQEmu::skills::SkillType; eq_dictionary work 2016-05-25 18:50:26 -04:00
phredi a715accc5f reording includes fixes patch file location problem 2016-05-25 17:35:47 -05:00
Michael Cook (mackal) 615158e701 Make EQStreamIdentifier::Record ctor take advantage of move semantics [clang-tidy] 2016-05-25 16:29:39 -04:00
Michael Cook (mackal) 60da544d3a clang-tidy modernize-use-auto 2016-05-25 16:10:28 -04:00
Michael Cook (mackal) cdbeb24a05 Change emptiness checks to empty() from size() [clang-tidy]
This has two benefits, it's clear what we are checking and
size() isn't always constant time, where empty is (performance!)
2016-05-25 14:57:47 -04:00
Michael Cook (mackal) c43d436b1f Fix more windows.h/winsock.h/winsock2.h issues
We want to use winsock2.h rather than winsock.h. This was mostly enforced
from the global_defines.h file, but I wanted to make it consistent.

Most of these includes can be removed since they're included via
global_defines.h, but someone on windows should clean that up
2016-05-25 13:46:47 -04:00
KimLS a9ef83c597 Missed config cause I'm totes not on gcc right now 2016-05-24 23:58:19 -07:00
KimLS 290bcc5720 Merge branch 'master' of github.com:EQEmu/Server 2016-05-24 23:49:36 -07:00
KimLS 9894c1b186 Compile fixes, needs cleaning up 2016-05-24 23:49:25 -07:00
Michael Cook (mackal) c059ff01ba Nuke unused COLLECTOR defines 2016-05-25 02:38:06 -04:00
Akkadius 477bf1ba45 Few more windows compile fix adjustments 2016-05-25 01:20:09 -05:00
phredi fd693a671b FreeBSD Compile Fixes 2016-05-24 23:24:49 -05:00
Akkadius ca2ad5b049 Add eqemu_config_extern.h to cmake - add header blockers 2016-05-24 22:57:12 -05:00
Akkadius b4ee5c8515 Merge pull request #521 from 9thsector/ConfigFileUpdate
Config file update(take2)
2016-05-24 22:27:26 -05:00
phredi 455223df1c fix to pass tests 2016-05-24 22:17:50 -05:00
phredi 5cd052458a fix for bin/tests to compile with configfileupdate 2016-05-24 21:53:37 -05:00
phredi a628dee2b7 Merge branch 'master' into ConfigFileUpdate 2016-05-24 20:47:52 -05:00
phredi 109de62916 eqemu_config.xml.full update 2016-05-24 20:45:32 -05:00
phredi 11b3571965 small fix for logdir 2016-05-24 20:18:11 -05:00
phredi 40845adbae initial logdir work(incomplete) 2016-05-24 20:00:54 -05:00
Michael Cook (mackal) 12905a3771 Fix Item_Struct::IsEquipable issue 2016-05-22 18:02:46 -04:00
Uleat 5f1b2475fb Picky penguins... 2016-05-21 15:01:29 -04:00
Uleat afd306f8ce Fix for GCC compile 2016-05-21 14:55:43 -04:00
Uleat b28930b2ea Fix for (possible) shared bank errors 2016-05-21 05:21:03 -04:00
Uleat 3031365e1f Moved struct Item_Struct into namespace EQEmu 2016-05-21 04:54:18 -04:00
phredi b997a040d7 Config File Update Initial Update 2016-05-20 21:03:34 -05:00
Uleat ebe6f95e6e LightSourceProfile relocation and some more formatting changes 2016-05-20 04:26:32 -04:00
Uleat 04f47f1e32 Formatting and GPL updates 2016-05-19 22:50:08 -04:00
Uleat d61e7446bb Missed a couple of EQEmu::OutBuffer reference changes 2016-05-19 07:21:10 -04:00
Uleat ffb88e0a8f Added EQEmu::OutBuffer() - stringstream-derived class with a few additional methods 2016-05-18 22:38:41 -04:00
Uleat 67c92bf171 Changed client 'constants' files to 'limits' 2016-05-18 04:45:31 -04:00
Michael Cook (mackal) 0c311ad3fe Fix Client::ChangeMailBox 2016-05-17 18:22:44 -04:00
Michael Cook (mackal) a8a4712fce Remove unused header 2016-05-17 17:47:26 -04:00
Michael Cook (mackal) 981d3e6b60 Refactor Clientlist::Voiced to std::vector 2016-05-17 17:42:34 -04:00
Michael Cook (mackal) f185257415 Refactor ChatChannel::Invitees to std::vector 2016-05-17 17:38:08 -04:00
Michael Cook (mackal) 1a7a5aa8c8 More UCS refactoring 2016-05-17 16:52:04 -04:00
Michael Cook (mackal) 29da15f38c Rename CL to g_Clientlist 2016-05-17 15:11:23 -04:00
Michael Cook (mackal) 38af484368 Fix mismatch new/delete 2016-05-16 23:47:01 -04:00
Michael Cook (mackal) 046dfe3e12 Add missing continue to Clientlist::Process 2016-05-16 23:25:27 -04:00
Michael Cook (mackal) 52bee3e8a0 Rework Clientlist::Process to not skip clients ... 2016-05-16 23:22:42 -04:00
Michael Cook (mackal) d2888e6cca Fix mismatched new/delete 2016-05-16 23:22:23 -04:00
Michael Cook (mackal) edc42bf5b6 Add small chrono timer object
This is just so if someone wants a quick way to measure how long
something takes for benchmarking purposes they don't have to
reinvent anything. See examples in comments
2016-05-13 21:33:03 -04:00
Uleat cb39a35f3f Fix for stringstream failure 2016-05-11 19:11:25 -04:00
Uleat 915f22d564 Added 'ItemInst::Serialize()' overload to make use of std::stringstream implementation 2016-05-11 00:30:04 -04:00
Uleat 3e0574630b Reworked server 'BulkSendInventoryItems()' to use single buffer methodology 2016-05-10 21:27:40 -04:00
Uleat 37b84c4db1 Reworked client translators' SerializeItem() to recursive, single buffer methodology 2016-05-10 20:16:27 -04:00
Michael Cook (mackal) de48d79b27 Need to account for null byte 2016-05-09 21:46:05 -04:00
Michael Cook (mackal) c159b89e79 Rewrite VarCache_Struct
Basically just remove manual memory management
2016-05-09 14:25:54 -04:00
Uleat 59728c5115 Tweak for Titanium::SerializeItem() rework 2016-05-08 23:43:47 -04:00
Uleat 1a1f5ae619 Titanium::SerializeItem() rework 2016-05-08 20:21:50 -04:00
Michael Cook (mackal) 907bc68e1c Mismatched delete statement 2016-05-06 23:14:48 -04:00
Michael Cook (mackal) 47c9182ba3 Fix potential memory leaks (clang-tidy) 2016-05-06 22:58:45 -04:00
Michael Cook (mackal) 74b3fe9d61 Potential memory leak fix 2016-05-06 22:42:19 -04:00
Michael Cook (mackal) 20a36151b3 Make Client::TradeskillSearchResults take a reference 2016-05-06 22:04:21 -04:00
Michael Cook (mackal) f85add14db Fix some undefined behavior issues?
MakeAnyLenString results in UB (I think?) and is aggressively optimized out with clang
GrantAlternateAdvancementAbility were missing return statements and clang had fun times with those functions too
2016-05-06 21:31:46 -04:00
Michael Cook (mackal) 3bf13c5349 Run the timeout_manager in loginserver (thanks image) 2016-05-06 13:34:13 -04:00
Uleat e304fe6558 Clang appeasement 2016-05-04 22:33:52 -04:00
Michael Cook (mackal) a49aef24c5 Fix luabind::adl::object forward declare for clang
clang didn't like this, and GCC likes both :P
2016-05-04 03:01:53 -04:00
KayenEQ 9ab459292b Merge pull request #519 from KayenEQ/Development
Special attacks hit chance fix
2016-05-03 12:50:21 -04:00
KayenEQ bee5f316b7 Fix for special attacks that was causing most of them do
to do the HitChance roll twice.
2016-05-03 12:49:05 -04:00
KayenEQ 3c8eda599f Merge pull request #518 from KayenEQ/Development
ExtraAttackOptions (for npc special attacks) additions.
2016-05-03 08:26:58 -04:00
KayenEQ 57b483f697 ExtraAttackOptions (for npc special attacks) additions.
melee_damage_bonus_flat //(+/-) damage percent applied to out going damage
skilldmgtaken_bonus_flat //(+/-) mitigation percent applied to out going damage

*Note: These have not been applied to any ingame functions set.
2016-05-03 08:25:36 -04:00
Natedog2012 705295f4c4 Fix perl version of GetBuffSlotFromType 2016-04-27 21:49:17 -07:00
Michael Cook (mackal) 2fde9edb41 Fix null bind issues 2016-04-26 16:06:24 -04:00
Uleat e212368965 Revert (and proper fix) of 'size_t' issue (sneaky little gcc 4.6'es) 2016-04-22 20:51:22 -04:00
Uleat a1ea2052bf Fix for travis-ci failure - attempt 3 2016-04-22 20:03:36 -04:00
Uleat 7c0eb54df6 Updated EQEmu::deity naming conventions 2016-04-22 19:41:11 -04:00
Uleat f36e041176 Fix for travis-ci failure - attempt 2 2016-04-22 19:30:32 -04:00
Uleat 26aeeac1ce Fix for travis-ci failure 2016-04-22 18:29:25 -04:00
Uleat 1890d006a2 Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition 2016-04-22 07:34:55 -04:00
Uleat b3475d7b50 Reworked ClientVersion into EQEmu::versions; Added EQEmu::versions::InventoryVersion 2016-04-22 03:49:17 -04:00
Uleat 6bc60391fb Update to EQEmu::saylink function linkage 2016-04-21 21:43:58 -04:00
Uleat e87e4d07f0 Update to EQEmu::lightsource function linkage 2016-04-21 19:55:46 -04:00
Uleat 57b3652819 Update to EQEmu::limits function linkage 2016-04-21 19:45:52 -04:00
Uleat 59e601733e Update to EQEmu::constants function linkage 2016-04-21 19:16:30 -04:00
Uleat 1693797adb Update to EQEmu::deity function linkage 2016-04-21 18:36:22 -04:00
Uleat 1ee32b4a30 Removed type dec from EQEmu::legacy::InventorySlots 2016-04-20 17:40:41 -04:00
Uleat 8edb6e9595 Eliminated the nested class design of recent EQEmu work; Some more inv2 convergence work 2016-04-19 04:02:53 -04:00
Natedog2012 53c7abf16e Fix for ModifyNPCStat when checking PhR as it would never be true as the check is set to lowercase 2016-04-17 16:27:29 -07:00
Uleat 1b3cfc9a5c Reworked EQDictionary into namespace EQEmu 2016-04-15 22:11:53 -04:00
Uleat 3a339a6646 EQ Dictionary rework 2016-04-14 08:40:11 -04:00
Uleat 1e05ee76f1 Fix for Bot::AI_Process() not advancing the heal rotation when member is currently casting for said heal rotation 2016-04-13 19:29:00 -04:00
Akkadius c33ccb138f Fix for marquee's crashing clients on zone 2016-04-12 23:49:44 -05:00
Akkadius 9673d8c34d Merge pull request #516 from ngdeao/master
Fix for RoF2 clients connecting and sometimes not appearing in the zone to others.
2016-04-12 23:38:07 -05:00
ngdeao 096dd21234 Fix for RoF2 clients connecting and don't appear in the zone to others. 2016-04-12 21:41:14 -06:00
Uleat 149a3c2e82 Would real 'Fix for BotDatabase::LoadBotGroupIDForLoadBotGroup() failures when more than one bot-group exists and requested bg is not primary in retrieval order' please stand up.. 2016-04-12 18:29:09 -04:00
Uleat aafa840d61 Merge branch 'master' of https://github.com/EQEmu/Server 2016-04-12 16:46:53 -04:00
Uleat 3ef98c9411 Added bot command 'inventorywindow' 2016-04-12 16:46:45 -04:00
Michael Cook (mackal) 700e801821 Fix mismatched delete in QueryServ 2016-04-12 13:44:33 -04:00
Uleat 89f46144e6 Fix for BotDatabase::LoadBotGroupIDForLoadBotGroup() failures when more than one bot-group exists and requested bg is not primary in retrieval order 2016-04-11 23:08:27 -04:00
Uleat daeec0f5ec Rework of some existing spell AI code 2016-04-11 16:51:30 -04:00
Akkadius a5119d1a9f Remove some instances of std::cerr 2016-04-11 14:29:45 -05:00
Uleat d47d72f2f2 Merge branch 'master' of https://github.com/EQEmu/Server 2016-04-08 20:58:27 -04:00
Uleat 6e11128cbc Added HealRotation HOT methodology (Heal Override Target) and load/save/delete capabilities 2016-04-08 20:58:17 -04:00
Michael Cook (mackal) 761c2be722 Style changes (auto, post-inc to pre-inc) 2016-04-08 14:14:09 -04:00
Michael Cook (mackal) 1551e5d908 Add mutex to EQStream::Decay to prevent threading issues 2016-04-08 14:11:02 -04:00
Akkadius f69b72f85f Merge pull request #515 from ngdeao/master
Netcode and Zoning Improvements
2016-04-07 21:48:27 -05:00
ngdeao fb23d961c1 Changed where queued packets are sent while zoning. Moved where zoneinpacket_timer is started to assist in not dropping needed packets.
Added better netcode support for handling out of order acks, to preclude excessive resending of same packets.

Changed how timeout checks are performing on individual packets, for re-sends, so they do not happen more often than the client can respond.

Improved how the data rate limit for throttling packets for compressed stream, so the size reduction in packets are accounted for better.
2016-04-07 20:26:47 -06:00
Uleat e75a53b775 Rework of eq_dictionary 2016-04-07 17:21:55 -04:00
Uleat 6ea061dc55 Added missing argument descriptor to 'bot_subcommand_heal_rotation_adjust_safe' usage. 2016-04-06 15:38:26 -04:00
Uleat 28b7e0e208 Fix for bot pet names showing up as numbers 2016-04-05 20:04:31 -04:00
Uleat b07f3d04df Fix for version 9003 trigger criteria 2016-04-05 19:04:06 -04:00
Uleat 51c97211a8 Fix for "ISO C++" taboo 2016-04-05 18:54:40 -04:00
Uleat e759bb6da8 Moved class Bot database code into class BotDatbase 2016-04-05 18:37:19 -04:00
Akkadius 22b7e76537 Added "nolock" argument option, allows database backups while server is online 2016-04-05 14:23:49 -05:00
Akkadius 620ac2a685 Merge pull request #514 from hateborne/master
Exported GetSpellIDFromSlot into Perl
2016-03-31 14:02:36 -05:00
hateborne 1f5eeda79e Exported GetSpellIDFromSlot into Perl
Exported the GetSpellIDFromSlot into Perl. Currently, there are numerous
Perl objections that can accept buff slot info, but nothing that can
return the buffs a mob/client currently has. This lets us iterate over
them with a loop, returning -1 if the slot requested doesn't exist.
2016-03-31 13:09:36 -04:00
Michael Cook (mackal) ba5b3c2796 Update fling struct and add Fling to lua opcode enum 2016-03-29 15:11:59 -04:00
Akkadius 5cbf4aca4f Slight adjustment to wearchange commit 2016-03-28 21:53:46 -05:00
Akkadius a82f5f8bf6 Allow heroforge textures to be manipulated via perl 2016-03-28 21:13:37 -05:00
Uleat 6c5d686b22 Merge branch 'master' of https://github.com/EQEmu/Server 2016-03-27 15:32:56 -04:00
Uleat 9f6e4dd8e7 More appropriate for bot owner targeting issue. Fix for self-following issue using bot_command_follow 2016-03-27 15:32:45 -04:00
KayenEQ 9f0a0a6d9f Merge pull request #512 from KayenEQ/Development
Removed unneccessary entitylist check from ApplySpellBonuses
2016-03-27 11:19:47 -04:00
KayenEQ 365a08ee86 Removed unneccessary entitylist check from ApplySpellBonuses
Fixed an issue with FCBaseEffects not applying bonus when cast on targets from runes.
2016-03-27 11:08:08 -04:00
KayenEQ b8972e0215 Merge git://github.com/EQEmu/Server into Development 2016-03-27 10:58:20 -04:00
KayenEQ d1facd9368 Kayen: delete bad test files accidently merged 2016-03-27 10:57:29 -04:00
KayenEQ 097da2d0af Merge pull request #511 from EQEmu/revert-510-Development
Revert "Removed unneccessary entitylist check from ApplySpellBonuses"
2016-03-27 10:37:05 -04:00
KayenEQ cc554be1df Revert "Removed unneccessary entitylist check from ApplySpellBonuses" 2016-03-27 10:36:49 -04:00
KayenEQ 9f7b67417f Merge pull request #510 from KayenEQ/Development
Removed unneccessary entitylist check from ApplySpellBonuses
2016-03-27 10:28:45 -04:00
KayenEQ 5d9ec0c4bf Removed unneccessary entitylist check from ApplySpellBonuses
Fixed an issue with FCBaseEffects not applying bonus when cast on targets from runes.
2016-03-27 10:27:23 -04:00
Uleat ebbc6b3f6a Cosmetic update for bot_command_actionable 2016-03-26 21:46:33 -04:00
Uleat 84460e3a1f Fix for self-targeting issue in bot_command_follow 2016-03-26 20:14:22 -04:00
Uleat dc09d6dfbd Added positive evaluation break 2016-03-26 18:18:40 -04:00
Uleat 3623fe28ea Merge branch 'master' of https://github.com/EQEmu/Server 2016-03-26 18:09:17 -04:00
Uleat 51879e0276 Missed a rework for actionable criteria botgroup 2016-03-26 18:09:09 -04:00
Michael Cook (mackal) 5585ddb80b Add OP_Fling stuff so devs can play with 2016-03-25 20:26:21 -04:00
KayenEQ 03ae89b628 Merge pull request #509 from KayenEQ/Development
Fix to have better sync server side spell range check to client check.
2016-03-25 18:26:45 -04:00
KayenEQ 1cfd1d478a Fix to have better sync server side spell range check to client check. 2016-03-25 18:25:54 -04:00
Uleat d36ec8c066 Fix for certain Berserker characters not being able to train Piercing skill 2016-03-25 14:19:49 -04:00
Uleat a09e9b479a Merge branch 'master' of https://github.com/EQEmu/Server 2016-03-25 13:19:43 -04:00
Uleat cdf5293ee2 Backport subcommand_list methodology to VS2012 compatibility - VS2013 code left in situ 2016-03-25 13:19:36 -04:00
KayenEQ 1e795c0199 Merge pull request #508 from KayenEQ/Development
Defensive proc rate fix
2016-03-25 13:04:21 -04:00
KayenEQ b369bb1793 Fixed defensive procs so they now only trigger once per attack round like live.
Added live like proc chance modifer based on level difference to target.
"Anything above your level will receive full mod. Starting 6 levels below PC level there is a negative 10 % mod applied each level until it reaches 0 and will not proc on anything 15 levels below you or lower."
Thanks to Huffin from PEQ for the parse data
2016-03-25 13:02:59 -04:00
Uleat a99befebfe Added code blocks for non-BOTS build failures 2016-03-25 12:29:31 -04:00
Uleat 817d8ceb64 Fix for heal rotation 'Stack Overflow' error 2016-03-25 02:04:25 -04:00
Uleat 3b6889d5d3 Changed PreferNoManaCommandSpells check from pre-processor to rules-based criteria 2016-03-25 00:39:11 -04:00
Uleat 66ca522e62 Another fix for portability issues 2016-03-24 20:33:37 -04:00
Uleat 698ef56df9 Few more portability fixes 2016-03-24 19:35:23 -04:00
Uleat 90c87a05e6 Fix for implementation reference failure 2016-03-24 19:23:12 -04:00
Uleat b327da7092 Activation of the new 'Bots' command system 2016-03-24 18:50:31 -04:00
KayenEQ 747895cbe5 Merge pull request #507 from KayenEQ/Development
AE Taunt range fix
2016-03-24 16:27:41 -04:00
KayenEQ fc5d6bd792 Fix for AE taunt to use correct range and hate modifier.
Fix for spell effect version of taunt to use correct range.
2016-03-24 16:26:29 -04:00
Uleat 8cbcd48461 Backport EQEmu::GetSkillUseTypesMap() methodology to VS2012 compatibility - VS2013 code left in situ 2016-03-24 16:07:17 -04:00
regneq fa10b3b183 Merge pull request #2 from EQEmu/master
merge from master
2016-03-22 13:52:47 -07:00
Uleat 1e344f2ad2 Added 'Open Chest' animation for LDoN chest death (thanks Natedog!) 2016-03-21 18:35:11 -04:00
Uleat 4842583426 Added some markers for skills.h and eq_constants.h enumerations 2016-03-20 20:09:14 -04:00
Uleat 5c812fb824 Fix for gcc fail 2016-03-20 17:51:09 -04:00
Uleat 87d92fe809 Update to #myskills to show proper 'Piercing' skill - 1HPiercing will still show if there is a value..but, will not be available for use if your class doesn't support it. 2016-03-20 17:27:08 -04:00
Uleat e2e1298523 Removed all bot command spell scripts but 'template' query 2016-03-08 16:25:05 -05:00
Michael Cook (mackal) 2189569312 Merge pull request #506 from clucksoft/master
Zone crash fix
2016-03-07 02:03:25 -05:00
Russell Kinasz 9291318a85 Fix formatting in last commit 2016-03-06 19:35:21 -08:00
Russell Kinasz 5881eabce9 Merge branch 'master' of https://github.com/EQEmu/Server 2016-03-06 18:37:14 -08:00
Russell Kinasz 6382ec2cb8 Prevent crash in spell casting when raid doesn't exist 2016-03-06 18:36:57 -08:00
Michael Cook (mackal) 9599501ace Implement extra bind points (secondary recall)
For SE_Gate, base2 is which bind to use (starting at 1)
For SE_BindAffinity, base1 is which bind to set (starting at 1)
For SE_GateCastersBindpoint, base1 is which bind to use (starting at 1)
    here was actually no spells that don't send to the main bind,
    but it uses a base1 of 1 which matches with SE_Gate
    This also doesn't break anything

The quest stuff for now hasn't been updated to be able to make use of the extra binds

There are a total of 5 bind points, with the 5th being your starting city
2016-03-05 16:28:53 -05:00
Natedog2012 655d2d47ba Fix the typo in this change. Pets size should scale up properly until 3x normal size. 2016-03-01 22:31:58 -08:00
Uleat 09589edcdd Fix for LDoN treasure npcs poofing - please report any issues 2016-03-01 18:23:36 -05:00
Uleat 141d6e3e8b Fix for two possible crash points in NPC::Death() 2016-03-01 16:55:31 -05:00
Akkadius 66b62303e4 Fix for shared_memory and clearing out hotfix_ when ran 2016-02-29 22:01:33 -06:00
Uleat acda4c7444 Merge branch 'master' of https://github.com/EQEmu/Server 2016-02-29 21:47:03 -05:00
Uleat abedfd3918 Add MainAmmo slot check for AddItemBonuses - only includes skill mods 2016-02-29 21:46:53 -05:00
KayenEQ b802a1cb1e Merge pull request #505 from KayenEQ/Development
Fix for ammo weapon damage not calculating when launching projectiles
2016-02-29 02:31:32 -05:00
KayenEQ 02e0431a79 Fix for ammo weapon damage not calculating when launching projectiles with rule enabled. 2016-02-29 02:29:41 -05:00
Uleat 63cce6875f Rework of NPC::PickPocket() - added stacking ability 2016-02-27 20:27:11 -05:00
Natedog2012 2268e6ed34 Fix up Object packet for UF / RoF / RoF2. SolidType was incorrect as those fields are the XY tilt for the object. Need database values for these fields so they will actually be useful. 2016-02-27 01:42:07 -08:00
KayenEQ 114c6b72bb Merge pull request #504 from KayenEQ/Development
Backstab with bane weapons will now hit immune to all but bane targets
2016-02-12 18:21:42 -05:00
KayenEQ a8f353518e Allow backstabs done with bane weapons to hit targets immune to all melee except bane.
Skill attacks will now give appropriate immune messages.
2016-02-12 18:19:03 -05:00
Akkadius 42933aaa8b Merge pull request #503 from hateborne/master
IgnoreSpellDmgLvlRestriction Rule Added (re-resubmitted)
2016-02-11 17:57:01 -06:00
hateborne b432830dfc IgnoreSpellDmgLvlRestriction Rule Added (re-resubmitted)
Added IgnoreSpellDmgLvlRestriction rule (boolean) to ignore the 5 level
spread when checking to add SpellDmg. Resubmitting due to the change
Natedog made ::shakefist::
2016-02-11 17:37:32 -05:00
Natedog2012 31b6346f03 Fix the math so berserkers aren't left out in spell related checks. 2016-02-11 13:10:22 -08:00
Akkadius a14b3117e9 Merge pull request #500 from hateborne/master
FlatItemExtraSpellAmt Custom Rule Addition
2016-02-10 16:00:39 -06:00
hateborne cdd56ec0e1 FlatItemExtraSpellAmt Custom Rule Addition
Added FlatItemExtraSpellAmt rule (boolean) to allow SpellDmg on items to
be added as raw damage versus scaled.
2016-02-10 16:51:58 -05:00
Michael Cook (mackal) 306586fa7e Exclude discs from buff slot stealing logic 2016-02-06 19:33:44 -05:00
JJ 33c7016a0e Simple spelling fix. [skip ci] 2016-02-04 19:17:17 -05:00
Natedog2012 7efccad13e GetFreeGrid should no longer crash when trying to #wpadd in a zone that has no grids 2016-02-02 01:53:30 -08:00
Akkadius 43ed5a325f Merge pull request #498 from Xackery/master
table schema for character_corpses is zone_id, not zoneid.
2016-01-30 02:10:45 -06:00
Xackery 65b44248fb table schema for character_corpses is zone_id, not zoneid. 2016-01-30 00:01:06 -08:00
Michael Cook (mackal) 3bbf337c24 Merge pull request #497 from daerath/master
Changed Item_Struct's CastTime member to uint32 (was uint16)
2016-01-28 19:35:40 -05:00
Natedog2012 09d6ed6bd9 Merge branch 'master' of https://github.com/EQEmu/Server 2016-01-28 13:26:28 -08:00
Natedog2012 3ce3f591a8 UF and ROF2 spawn packet packet for chests now working properly. 2016-01-28 13:26:15 -08:00
Tim DeLong c19a5d7c75 Casttime was too small for the possible data values. The Potion of Serious Healing has a cast time of 90.0 sec (90000), but this was downcast to a lower value. Updated Casttime from uint16 to uint32. This change also makes CastTime have the same data type as Fulfilment which is notable as they are in a struct union and should have the same type. 2016-01-28 08:15:38 -05:00
Uleat f98c04ca7a Fix for false triggering of warning message for command alias processing 2016-01-27 17:39:36 -05:00
Uleat 430be0f2b7 Follow-up for Titanium client - item weight fix (WARNING: re-run shared_memory; Note: re-run cmake; see changelog.txt) 2016-01-26 19:02:07 -05:00
Uleat 09739942c6 Merge pull request #496 from daerath/master
(Fix for) Item weights being downcast to uint8
2016-01-26 16:55:54 -05:00
Tim DeLong 52541c6532 Item weight was being downcast to uint8 which impacted any item with weight over 255. For SoD, SoF, and UF, prior to sending item info to the client we now cap weight at 255 to ensure the item remains heavy instead of being made (in most cases), super light. 2016-01-26 16:44:11 -05:00
Uleat 1b7841f683 Fix for Berserker 'Piercing' skill issues 2016-01-26 15:08:41 -05:00
Michael Cook (mackal) 15c92f019a Mob::Charmed() should be useful now
We should really clean this up, but this is quicker
2016-01-25 14:01:03 -05:00
Akkadius c4cdf811e3 Fix for zone controller spawn events where npc isn't inserted into entity list yet 2016-01-22 13:42:14 -06:00
Alex 211306f9be Merge pull request #493 from daerath/master
Loadlootdrops (shareddb.cpp) not exiting on error
2016-01-21 21:46:50 -08:00
Alex a22df6da33 Merge pull request #487 from lwahlmeier/master
fixed else error case for eqtime table
2016-01-21 21:46:36 -08:00
Tim DeLong b4b28e5eb8 If an error occurs (!results.Success()) in loadlootdrops the method continues processing instead of exiting. 2016-01-21 11:53:14 -05:00
Michael Cook (mackal) d86307c720 Rework say links
We now consume 1 item ID for say links, this means you will be able to create
more items! We used ID 0xFFFFF for this, which is the max ID an item can be
in the item links. You have the rest to play with!

Normal say links pass the ID in the first aug slot and silent say links
in the second aug slot. This means we can have MANY more say links as well!
2016-01-20 22:31:35 -05:00
Uleat 04b7ba7a1d Added proxy accessors for all TextLink fields 2016-01-20 21:54:18 -05:00
Michael Cook (mackal) 1ddbfdf4e9 Fix ItemInst::GetItemElementalDamage 2016-01-16 18:46:32 -05:00
Michael Cook (mackal) 600866f573 Rewrite Bane and Elemental Dmg stuff and GetWeaponDamage (client version) 2016-01-16 18:29:17 -05:00
Michael Cook (mackal) ad1c91f204 Fix bots 2016-01-16 17:52:21 -05:00
Michael Cook (mackal) 8f0d9015be Fix rec/req level issues 2016-01-16 17:17:09 -05:00
Michael Cook (mackal) 281344b049 Add various GetItemStat totallers to ItemInst
The intent of these functions is to simplify various locations in the
code where we need to get a total of some stat on an item, including augs
and we can not just grab the total from the itembonuses struct.

This will also centralize where we need to add the powersource aug scaling
when we implement them. Since they will need the Purity stat from the
item it is in.

Notes:
    - These functions recurse if the augments flag is true, which is false by
      default to make it so you have to be explicit about recursing or not
    - These functions don't take into account if you can equip or if you are
      below recommended level, you will have to do that where you call these
      functions.
2016-01-16 17:10:11 -05:00
Michael Cook (mackal) d7e44643b5 Fix resist display issue for RoF/RoF2
These need to be found for the other clients
They are most likely a similar amount of bytes away from
the potionbelt in all clients
2016-01-15 17:20:48 -05:00
Michael Cook (mackal) 42f7e03b04 Fix typo in last commit 2016-01-15 17:00:10 -05:00
Michael Cook (mackal) f33f3bd4f5 Fix Drakkin base resists and some missing class bonuses 2016-01-15 16:09:23 -05:00
Uleat e161805bc9 Added changelog entry for #summonitem [itemlink] change 2016-01-13 15:25:22 -05:00
Uleat 6db397f07d Added item link functionality to #summonitem (thanks Kinglykrab!) 2016-01-13 15:10:21 -05:00
Uleat 23758d5e90 Merge pull request #491 from KinglyKrab/master
Modified #flag functionality for target-based account status refresh.
2016-01-13 15:00:21 -05:00
Kinglykrab f8ce556acb Modified #flag functionality for target-based account status refresh. 2016-01-13 08:08:23 -05:00
Michael Cook (mackal) 3048eca5ad Merge pull request #490 from AthrogatePEQ/master
Lua_Client::ClearCompassMark()
2016-01-12 22:56:18 -05:00
Athrogate 11a61f3e35 Merge branch 'master' of github.com:AthrogatePEQ/Server 2016-01-12 19:40:46 -08:00
Athrogate 192dadad8c Merge branch 'master' of github.com:AthrogatePEQ/Server 2016-01-12 19:40:19 -08:00
Athrogate 092fa4a3bc Merge branch 'master' of github.com:AthrogatePEQ/Server 2016-01-12 19:34:04 -08:00
Athrogate 0fec2fdfdd Add Lua_Client::ClearCompassMark(). 2016-01-12 19:33:49 -08:00
Athrogate 09b6adf726 Add Lua_Client::ClearCompassMark(). 2016-01-12 19:19:07 -08:00
Athrogate edeb7d79d1 Add Lua_Client::ClearCompassMark(). 2016-01-12 19:19:07 -08:00
Uleat 21fc487c33 World tradeskill objects should now exhibit pre-RoF behavior to all clients 2016-01-12 18:44:51 -05:00
Natedog2012 acb1d14fbd Cap Underfoot material / IDFile in the spawn packet to 99,9999 MAX. Anything higher will crash client 2016-01-11 13:32:00 -08:00
Michael Cook (mackal) 2cb58e9d02 Merge pull request #488 from daerath/master
* LightProfile_Struct::TypeToLevel.  Incorrect comparision in case statement.
2016-01-11 12:34:44 -05:00
Tim DeLong 1711b06836 * LightProfile_Struct::TypeToLevel. The case statement for lightLevelCandle should be lightTypeCandle as the check is on light types, not light levels. Light levels are used for the return value. 2016-01-11 09:11:38 -05:00
Michael Cook (mackal) 6fc5f8fba2 Fix stacking issues with SE_DamageModifier and SE_MinDamageModifier 2016-01-10 15:31:04 -05:00
Uleat 1aa98d34ca Fix for manifest boo-boo 2016-01-08 17:35:50 -05:00
Uleat 2b0ee55752 Add command #findaliases 2016-01-08 17:19:10 -05:00
regneq fac51f2007 Merge pull request #1 from EQEmu/master
merge from EQEmu
2016-01-06 12:59:31 -08:00
Michael Cook (mackal) 2f129da08a Add GetAttackDelay to lua's NPC API 2016-01-06 15:48:10 -05:00
Michael Cook (mackal) 17c45c8d36 Move triggered on cast things to after the spell
This appears how live does it
2016-01-06 13:30:50 -05:00
Luke Wahlmeier 3a20bbd834 fixed else error case for eqtime table 2016-01-05 14:18:31 -07:00
Michael Cook (mackal) 20f5c42c3e Fix 60+ resist caps 2016-01-05 02:54:09 -05:00
Akkadius 9174ccd635 Another slight adjustment [skip ci] 2016-01-04 17:11:59 -06:00
Akkadius 2155a53a0d Another slight adjustment [skip ci] 2016-01-04 11:16:26 -06:00
Akkadius 6a404a5a26 Put the zone controller somewhere where people can't see it even with a terrible GlobalLoad.txt [skip ci] 2016-01-04 11:04:56 -06:00
Michael Cook (mackal) 5bcb9f0b35 Fix classic h2h dmg/delay also support for revamp
The revamp was implemented during SoF
Set Combat:UseRevampHandToHand to true to enable
2016-01-03 14:38:50 -05:00
Michael Cook (mackal) 05de206ace Rework quiver haste 2016-01-03 01:58:37 -05:00
Michael Cook (mackal) 28848fa913 Merge pull request #486 from noudess/master
Added runspeed to #mystats window
2016-01-02 17:39:02 -05:00
Paul Coene 51b74f47e3 Merge remote-tracking branch 'upstream/master' 2016-01-02 17:28:23 -05:00
Paul Coene f754f06bec Added runspeed to mystats window. 2016-01-02 17:26:59 -05:00
Alex d1d963df10 Merge pull request #485 from noudess/master
More fixes for SendBuffDuration
2016-01-02 13:43:27 -08:00
Paul Coene a56f17a9e5 Merge remote-tracking branch 'upstream/master' 2016-01-02 09:17:09 -05:00
Paul Coene 11f3e30245 Fixed a ton of buffs when using an EE item (SendBuffDurationPacket). 2016-01-02 09:16:13 -05:00
Akkadius 707d2c8635 Merge branch 'master' of https://github.com/EQEmu/Server 2016-01-01 01:13:37 -06:00
Akkadius dfdfb18a7e VS2012 fix 2016-01-01 01:12:49 -06:00
Akkadius 647fbcd6b6 Adjust an incredibly spammy log message 2016-01-01 01:11:32 -06:00
Akkadius 50a8a3017b Merge pull request #484 from daerath/master
* CheckNameFilter minimum surname check incorrect
2016-01-01 00:55:55 -06:00
Akkadius 9ea9ed2590 Update eqemu_update.pl to include loginserver setup in normal installer routine [skip ci] 2015-12-31 21:45:42 -06:00
Michael Cook (mackal) 3996a70037 2h DB should match client closer
I think the dev missed something when making it pretty for the forums
This should match it better.
2015-12-31 01:08:04 -05:00
Tim DeLong aad1396c73 * CheckNameFilter was enforcing minimum surname length of 3 instead of 4.
* Minor refactoring of CheckNameFilter to eliminate redundant code.
2015-12-30 23:30:52 -05:00
Akkadius 45d81b71d6 Merge pull request #483 from daerath/master
* AddReport's who and against strings were not being escaped properly.
2015-12-30 12:05:55 -06:00
Michael Cook (mackal) e70b34f245 Merge pull request #482 from af4t/master
MSVC 2015 wants <algorithm> #included for std::min.  If any other com…
2015-12-30 12:46:51 -05:00
Tim DeLong fe61abc3cd * AddReport's who and against strings were not being escaped properly. 2015-12-30 11:42:49 -05:00
af4t 2d375eb565 MSVC 2015 wants <algorithm> #included for std::min. If any other compilers require the same, feel free to alter the #if test. 2015-12-30 02:17:09 -05:00
Michael Cook (mackal) 7045581fdc Cap big bags to 10 slots for now 2015-12-29 15:22:09 -05:00
Akkadius 7bf114a0bc Fix Travis 2015-12-29 06:06:12 -06:00
Akkadius 2bf6c2788e eqemu_update.pl - Implement 14) [Remove Duplicate Rule Values] :: Looks for redundant rule_values entries and removes them 2015-12-29 05:40:34 -06:00
Akkadius 8b35ae9921 Change how rules are loaded and inherit values
- When a custom ruleset is loaded, it will always first look for a value present in the ruleset id for that zone, when it is not present, it will load from the default ruleset instead of immediately falling back to the source value. This is to eliminate the excessive amount of duplicate entries in the rule_values tables
2015-12-29 05:21:27 -06:00
Akkadius 8425607460 Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
	- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
	- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
	- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
		- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
			$spawned_entity_id
			$spawned_npc_id
		- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
			$killer_id
			$killer_damage
			$killer_spell
			$killer_skill
			$killed_npc_id
2015-12-29 04:08:10 -06:00
Akkadius f25246e1a0 Adjust eqemu_update.pl [skip ci] 2015-12-29 01:47:21 -06:00
Akkadius 3af9aeeeaf Adjust manifest [skip ci] 2015-12-29 01:45:53 -06:00
Michael Cook (mackal) c2c08b85f1 Merge pull request #481 from KinglyKrab/master
Added GetInstanceTimerByID(instance_id) to Perl and Lua.
2015-12-29 02:35:19 -05:00
Akkadius 9757c38017 Adjust manifest [skip ci] 2015-12-29 01:30:20 -06:00
Kinglykrab 34e1dc9829 Added UpdateZoneHeader(type, value) to Perl and Lua. 2015-12-29 02:28:31 -05:00
Kinglykrab ff876bd558 Added GetInstanceTimerByID(instance_id) to Perl and Lua. 2015-12-29 00:56:32 -05:00
Akkadius b9d00f91de Merge pull request #480 from KinglyKrab/master
Added GetInstanceTimer to Perl and Lua.
2015-12-28 22:42:14 -06:00
Kinglykrab ce71b6d9f0 Added GetInstanceTimer() to Perl and Lua. 2015-12-28 22:13:54 -05:00
Akkadius 17c41a1364 Merge pull request #479 from KinglyKrab/master
Revert accidental change to SetPseudoRoot in lua_mob.cpp.
2015-12-28 19:18:39 -06:00
Kinglykrab bda39c4f77 Revert accidental change to SetPseudoRoot in lua_mob.cpp. 2015-12-28 20:07:59 -05:00
Akkadius e423165bcb DB Update System :: Implement SVN updates into the manifest (To support older databases) [skip ci] 2015-12-28 02:25:01 -06:00
Akkadius 1b4dbd1ce7 Adjust import_13th_floor.pl to flip slots 21 and 22 [skip ci] 2015-12-27 17:26:39 -06:00
Michael Cook (mackal) 3a7d7c727f AA updates [skip ci] 2015-12-26 13:29:34 -05:00
Akkadius dc58173f15 Remove unused script since we have a newer one now [skip ci] 2015-12-22 01:04:27 -06:00
Akkadius f883e085e3 Merge pull request #477 from KinglyKrab/master
Added GetMeleeMitigation() to Perl and Lua for Mobs (Clients/NPCs).
2015-12-21 15:47:16 -06:00
Akkadius 4b2f12cd67 Linux-ify 13th floor script [skip ci] 2015-12-21 15:32:59 -06:00
Akkadius 7223f2da06 Add 13th floor item import script (Natedog/Akkadius) [skip ci] 2015-12-21 15:31:38 -06:00
Kinglykrab 9a1271805a Added GetMeleeMitigation() to Perl and Lua for Mobs (Clients/NPCs). 2015-12-21 15:45:25 -05:00
Michael Cook (mackal) c168d7b7b6 Fix macro hack? [skip ci] 2015-12-21 12:41:49 -05:00
Michael Cook (mackal) 7ad33f2445 Fix formatting 2015-12-21 12:33:32 -05:00
Natedog2012 fc33a10ec0 Change GetSkill to use SkillModMax for clients 2015-12-21 07:37:43 -08:00
Natedog2012 8133f5312f First step into implementing evolving items, added fields to database that were missing. 2015-12-21 05:39:39 -08:00
Michael Cook (mackal) dfc5699403 Merge pull request #476 from KinglyKrab/master
Exported several Mob-based methods to Perl and Lua.
2015-12-19 19:54:17 -05:00
Kinglykrab 0177c8d7d9 Exported several Mob-based methods to Perl and Lua. 2015-12-19 19:42:35 -05:00
Uleat b4b1324ace Updated client version bitmasks 2015-12-19 12:42:55 -05:00
Michael Cook (mackal) 03592e58f9 Port EQMacEmu's Assist Aggro code
This code also allows you to toggle on Tick Pulling (Aggro:AllowTickPulling)
which was a pulling technique (exploit) fixed sometime in 2006

This code also implements assist caps to cut down on trains (5 by default)
Unsure if live what this number is (it exists) or if it's a per NPC basis

An NPC with Assist Aggro will not call for help, only NPCs with Primary Aggro will
2015-12-18 17:41:57 -05:00
Michael Cook (mackal) f8867ea73d Bump up initial aggro from Yell for Help to match initial aggro
I guess I forgot this one
2015-12-18 13:46:05 -05:00
Michael Cook (mackal) 488be05e0e Add DB manifest for eqtime change 2015-12-17 19:50:33 -05:00
Alex 78c99d0be0 Merge pull request #474 from regneq/master
EQTime will now save to database instead of file.
2015-12-17 16:14:46 -08:00
Alex f4479c5cd7 Merge pull request #469 from Shendare/augmentation
Augmentation Feature Patch; going to merge since there's video evidence you tested it and no one seems to have any problem with it.
2015-12-17 16:14:36 -08:00
regneq d449d4f54c EQTime will now save to the DB once every 10 real world minutes. 2015-12-17 15:49:37 -08:00
regneq 17bbd8dfbe eqtime is now stored in the DB.
required/2015_12_17_eqtime.sql
2015-12-17 14:14:04 -08:00
Alex c1feb93e2e Merge pull request #473 from noudess/master
Repair issue with Bind Wounds when you are binding someone that is binding themselves.
2015-12-17 13:09:33 -08:00
Paul Coene 07ab58483d Updated changelog 2015-12-16 09:16:27 -05:00
Paul Coene 2865278987 Merge remote-tracking branch 'upstream/master' 2015-12-16 09:11:43 -05:00
Paul Coene bc77439d11 When binding someone else's wounds, the code tried to send a bind
would response to client with a type of 2.  The intent (based on
comments was to get the client to display a "stand still" message
on the receiving client.

That reply message was not generating that message, but if the client
you were binding was also binding his own  wounds, it would cause your
target to stand up, interrupting his bind.

I replaced this client reply with a simple, directed client message.  It all
seems to work fine now.
2015-12-16 09:05:27 -05:00
Uleat 78f22599f4 Tweak to commandaliases behavior 2015-12-15 19:03:24 -05:00
Akkadius 24ea7e03f1 Merge branch 'master' of https://github.com/EQEmu/Server 2015-12-15 12:59:46 -06:00
Uleat 101bbdfd29 Merge branch 'master' of https://github.com/EQEmu/Server 2015-12-14 17:38:32 -05:00
Uleat c9ecca1a56 Added 'alias added' message and commmandaliases list (future use) 2015-12-14 17:38:24 -05:00
Natedog2012 f0222bb94b Adjust changelog.txt [skip ci] 2015-12-14 12:37:28 -08:00
Akkadius 2fb63d4d26 Merge pull request #472 from KinglyKrab/master
Adds IsBlind() and IsFeared() functionality to Perl and Lua.
2015-12-14 14:11:26 -06:00
Kinglykrab 6949f29295 Adds IsBlind() and IsFeared() functionality to Perl and Lua. 2015-12-14 15:01:58 -05:00
Natedog2012 b3afc684de Allow updating instance timers through perl and lua. 2015-12-14 11:16:09 -08:00
Natedog2012 baaf5801ff Added ability to manipulate disciplines for perl and lua. Also ability to remove spells from spell bar with spellID. 2015-12-14 01:22:59 -08:00
Uleat ee644f7b3e Make better sense things do, after cups of coffee two 2015-12-12 21:36:14 -05:00
Uleat cfde67fcb3 Missed a 'command' note 2015-12-12 17:22:29 -05:00
Akkadius fa872c6030 Some rule code cleanup 2015-12-12 00:37:31 -06:00
Uleat 6802f2a9e8 Conversion of 2015_09_30_bots.sql fail points to perl script; Added drop bots feature to eqemu_update.pl menu 2015-12-11 22:39:18 -05:00
Akkadius 80ef4c7f9f Adjust default Loginserver log settings [skip ci] 2015-12-09 23:24:53 -06:00
Akkadius c2af87431a Fixed a ridiculous issue where world wasn't trying to reconnect to loginservers 2015-12-09 23:21:19 -06:00
Akkadius ffe46bd4d2 Implement Loginserver auto account creation via login.ini option auto_create_accounts = TRUE 2015-12-09 23:01:07 -06:00
Akkadius d7ca2440d3 More loginserver stuff [skip ci] 2015-12-09 22:24:17 -06:00
Akkadius 7a17089b8a Fix remaining loginserver log things 2015-12-09 20:47:59 -06:00
Akkadius efe09f6fe5 Remove old error_log system from the Loginserver 2015-12-09 20:33:20 -06:00
Akkadius 75cddbea71 Loginserver conversion to new Logging system 2015-12-09 20:30:47 -06:00
Akkadius 22496e2ae2 Update eqemu_update.pl [skip ci] 2015-12-09 19:28:56 -06:00
Akkadius acb8e63d9c Update eqemu_update.pl [skip ci] 2015-12-09 01:14:45 -06:00
Akkadius e297de3830 Update eqemu_update.pl [skip ci] 2015-12-09 01:14:07 -06:00
Akkadius f474e171ed Update eqemu_update.pl [skip ci] 2015-12-09 01:02:42 -06:00
Akkadius b499dcc89d Update eqemu_update.pl [skip ci] 2015-12-09 01:00:27 -06:00
Akkadius 98f7766875 Update eqemu_update.pl 2015-12-09 00:21:30 -06:00
Uleat 2159d18920 Fix for VS2012 command.cpp:501 error 2015-12-08 21:15:41 -05:00
Uleat 6f1ad1fbc1 Major change to how commands are loaded 2015-12-07 19:28:13 -05:00
Uleat 1c0192dce3 Fix for guild rank sql error when using bots (thanks N0ctrnl!) 2015-12-02 18:33:49 -05:00
Akkadius f07e708f22 Update eqemu_update.pl [skip ci] :: Add option 13) [Windows Server Loginserver Setup] :: Download and install Windows Loginserver 2015-12-02 15:41:57 -06:00
Akkadius a936796b45 Some more loginserver refactoring to make things more sane to read 2015-12-02 13:46:16 -06:00
Akkadius 2fbf047853 Merge branch 'master' of https://github.com/EQEmu/Server 2015-12-02 13:14:49 -06:00
Akkadius af18377505 Some loginserver refactoring 2015-12-02 13:14:26 -06:00
Uleat fe48f18f71 Added rule-based check for race/class restriction of spell scribing 2015-12-01 20:30:43 -05:00
Akkadius a483d37c26 Re-add some nuked code eqemu_update.pl [skip ci] 2015-12-01 15:27:07 -06:00
Akkadius 549cabe7e8 Added Options 11) and 12) to eqemu_update.pl, updated to version 12
11) [Windows Server Build] :: Download Latest and Stable Server Build (Overwrites existing .exe's, includes .dll's)
12) [Windows Server .dll's] :: Download Pre-Requisite Server .dll's
2015-12-01 15:25:26 -06:00
Uleat 6f8600b885 Draft versions of bot command spell scripts (may still be tweaked based on actual command implementation) 2015-11-30 20:16:21 -05:00
Uleat 3135c92340 Changed criteria in a few bots scripts from count to null-result check 2015-11-30 18:33:27 -05:00
Akkadius c2b0e00cdd Update eqemu_update.pl [skip ci] 2015-11-30 00:34:10 -06:00
Akkadius c0081a0983 Merge branch 'master' of https://github.com/EQEmu/Server 2015-11-30 00:09:03 -06:00
Akkadius 6016ba5140 Add some things to future installer [skip ci] 2015-11-30 00:08:36 -06:00
Natedog2012 4bc844fe3b Work around for Bot::LoadPetBuffs loading buffs with counters 2015-11-24 16:25:21 -08:00
Alex faa8c35554 Merge pull request #470 from noudess/master
Fix mob overpopulation on "idle" zones
2015-11-22 23:20:13 -08:00
Uleat d383ecc5b7 Fix for loginserver project compile failure 2015-11-22 18:31:32 -05:00
Paul Coene b7dc3db703 wMerge remote-tracking branch 'upstream/master' 2015-11-20 14:46:28 -05:00
Michael Cook (mackal) 0fa5b8d3f2 Merge pull request #467 from Cilraaz/master
Old Race/Class Experience Mods
2015-11-20 14:00:03 -05:00
Paul Coene 0c56660692 Merge remote-tracking branch 'upstream/master' 2015-11-20 12:04:11 -05:00
Paul Coene f3120f26ee Fix issue with mobs no depopping (due to spawn_events) while zone is idle. 2015-11-20 12:03:43 -05:00
Michael Cook (mackal) 8464a0e3b5 Implement Guild Banks for RoF/RoF2
Everything appears to work, but please test!
2015-11-17 18:15:46 -05:00
Michael Cook (mackal) 525a39912f Override Mob::GetEndurancePercent() for Merc
This allows their endurance to show in group!
2015-11-15 16:35:11 -05:00
Shendare 7c41472877 Fixed swapping error message
You now get the error message if the augment swap doesn't work, instead
of when it works. One little bang.
2015-11-14 11:40:28 -08:00
Michael Cook (mackal) 7c4abcc68d Fix int16 spell ID limit with items (click, procs, etc)
See issue #7 (Did we resolve it yet?)
2015-11-14 14:37:24 -05:00
KimLS f188851bfb Wont look for mysql .so on non-root systems 2015-11-11 13:52:52 -08:00
KimLS ee2d8a3d6d Fix for FindMySQL not preferring mysql_root hint. 2015-11-11 13:49:10 -08:00
Shendare f6c2c07a94 Augmentation Feature Patch Code Cleanup
Avoided an extraneous GetItem() call when performing an action that
doesn't return an augment to the player. Added additional error checking
and logging. Improved error messages and code comments.
2015-11-10 18:14:47 -08:00
Michael Cook (mackal) 78c75501f7 Reply to the request made on opening XTarget window
This allows the Extended Targets option in the EQ Menu to open the window
2015-11-10 03:27:30 -05:00
Shendare 9e5bfabf91 Augmentation Feature Patch
RoF+ clients now support the built-in adding, swapping, destroying, and
removing of augments in equipment, updating an equipped item's look in
case of ornamentation changes. All clients will now verify that the
proper distiller (or a perfected distiller for RoF+) is being sent for
consumption for safely removing augments. Hard-coded item IDs for
distillers have been replaced with checks on item types.
2015-11-09 22:43:25 -08:00
Akkadius 07f7b18b10 Merge pull request #468 from Shendare/master
Quick query logging addition
2015-11-09 12:19:47 -06:00
Shendare 992797f610 Fixed query logging addition
Resolved platform specific function use.
2015-11-08 22:41:39 -08:00
Shendare ad04b308c0 Quick query logging addition
Reports records affected by inserts, updates, and deletes as well as the
records returned by selects.
2015-11-08 22:18:51 -08:00
Akkadius 18c97ca637 Fix some indents, not sure how they got messed up [skip ci] 2015-11-07 13:23:15 -06:00
Akkadius d64205124f Implemented #repopclose [distance in units] - Used for development purposes, defaults to 500 units
- Real case use: Large zones with 700 NPC's and you are making fast quick tweaks to nearby NPC's you can refresh just the NPC's around you instead of all in the zone
- This can be quite the time saver
- This command will depop all NPC's and only respawn the NPC's that are 500 units around you or unless you specify otherwise
2015-11-07 13:20:24 -06:00
Uleat 86f35e45d3 Fix for LoadBot() hp issue 2015-11-04 23:30:46 -05:00
Michael Cook (mackal) a6f6e18969 Implement cast restriction 700 (NPC only) 2015-11-03 18:43:47 -05:00
Cilraaz 9d01e832a8 Merge remote-tracking branch 'upstream/master' 2015-11-03 15:12:27 -05:00
Michael Cook (mackal) 8d80f39ead Fix copy paste error 2015-11-03 14:17:55 -05:00
Michael Cook (mackal) 63ae7ac315 Add Casting Restrictions to SE_CurrentHP (DoTs) buff processing 2015-11-03 14:16:36 -05:00
Michael Cook (mackal) e7184f402d Add Casting Restrictions to SE_CurrentHPOnce 2015-11-03 14:16:36 -05:00
Michael Cook (mackal) 835fbb81cb Expand Casting Restrictions
Mostly to nerf HT, not fully implemented
2015-11-03 14:16:36 -05:00
Akkadius 27c8a85f61 Change AI_scan_area_timer to have a little variability in renewing a new timer time versus deciding one on spawn and sticking with it 2015-11-02 23:23:04 -06:00
Akkadius 67c7254fd1 Copy paste fail [skip ci] 2015-11-02 22:48:17 -06:00
Akkadius 9304e09eca Adjust changelog.txt [skip ci] 2015-11-02 22:15:40 -06:00
Akkadius 63051dda9c Performance boost (exponential) - Adjusted default idle cast check timers in rules
- NPC:NPCToNPCAggroTimerMin	500 (Now 6000) 6 seconds
	- NPC:NPCToNPCAggroTimerMax	2000 (Now 60000) 60 seconds
	- Database version 9089 will take care of this update automatically only if you used the default values
	- The CPU cost of NPC's checking the entire entity list to cast beneficial spells (Heals/Buffs) becomes extremely high when
		higher NPC count zones exist (Based off of process profiling)
			- Distance checks for every single NPC to every single other NPC who are casting beneficial spells occur every .5 - 2 seconds unless
				npc_spells dictates other values, which most of the time it does not
	- Zones that once fluctuated from 1-8% CPU with no activity (Idle but players present) now idle at .5% based on my testings due
		to this change in conjunction with the past few performance commits, these are zones that have 600-800 NPC's in them
	- These values normally are overidden by the spells table (npc_spells), fields (idle_no_sp_recast_min, idle_no_sp_recast_max)
2015-11-02 22:12:41 -06:00
Akkadius f884d8d738 Fix an issue where during a depop cycle and NPC's are engaged by wiping hatelist before issuing NPC depop 2015-11-02 21:33:36 -06:00
Michael Cook (mackal) 21acd79acf Fix procs that have end cost from consuming end 2015-11-02 17:58:35 -05:00
Cilraaz 7b819c9edf Merge remote-tracking branch 'upstream/master' 2015-11-02 11:25:54 -05:00
Akkadius f4983f090d Once again another adjustment to npc to npc aggro check timer [skip cki] 2015-11-01 20:56:03 -06:00
Akkadius 0ee70a663c Small adjustments to my rushing [skip ci] 2015-11-01 20:31:01 -06:00
Akkadius e8d18cb014 Made many performance optimizing oriented code changes in the source
- Added Rate limit the rate in which signals are processed for NPC's (.5 seconds instead of .01 seconds)
Added Perl Export Settings which should heavily reduce the Perl footprint
	- Normally when any sub EVENT_ gets triggered, all kinds of variables have to get exported every single time an event is triggered and
		this can make Perl very slow when events are triggered constantly
			- The two most taxing variable exports are the item variables ($itemcount{} $hasitem{} $oncursor{}) and qglobals ($qglobals{})
			- qglobals can pose to be an issue quickly when global qglobals build up, it is highly recommend to use the GetGlobal() and SetGlobal()
				methods instead as they don't reference the hashmap $qglobals{} that is rebuilt every single time a sub event is triggered
	- A stress test conducted with 10,000 samples shows an excess of time taken to export variables: http://i.imgur.com/NEpW1tS.png
	- After the Perl Export Settings table is implemented, and all exports are shut off you see the following test result:
		http://i.imgur.com/Du5hth9.png
	- The difference of eliminating uneeded exports brings the overhead and footprint of 10,000 triggers from 54 seconds to 2 seconds
	- In a 10,000 sample test (10,000 sub event triggers), exporting item variables adds 12 seconds alone, when item variables are only needed in
		EVENT_ITEM and EVENT_SAY a majority of the time if at all
	- In a 10,000 sample test (10,000 sub event triggers), exporting qglobals with approximately 1,000 global qglobals in the database creates
		about 11-20 seconds of delay on its own (Depending on hardware of course)
	- I've written a parser that has determined which of these exports are needed in which sub routines and have turned off all of the unneeded
		exports in sub routines that do not need them and used it to create the default table that will be installed in the database.
	- The export table is called 'perl_event_export_settings' and it resembles the following structure and contains all current 81 EVENTS
		- If an entry doesn't exist in this table and a new subroutine is added to the source, all exports will be on by default for that routine

	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
	| event_id | event_description                       | export_qglobals | export_mob | export_zone | export_item | export_event |
	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
	|        0 | EVENT_SAY                               |               1 |          1 |           1 |           1 |            1 |
	|        1 | EVENT_ITEM                              |               1 |          1 |           1 |           0 |            1 |
	|        2 | EVENT_DEATH                             |               1 |          1 |           1 |           0 |            1 |
	|        3 | EVENT_SPAWN                             |               1 |          1 |           1 |           0 |            1 |
	|        4 | EVENT_ATTACK                            |               0 |          1 |           1 |           0 |            1 |
	|        5 | EVENT_COMBAT                            |               1 |          1 |           1 |           0 |            1 |
	+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+

	- If a change is made to this table while the server is live and running, you can hot reload all zone process settings via:
		#reloadperlexportsettings
	- For those who wonder what "exports" are, they are reference to variables that are made available at runtime of the sub event, such as:
		(export_qglobals) (Heavy) : $qglobals https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L916
		(export_item) (Heavy) : $itemcount{} $hasitem{} $oncursor{} https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1103
		(export_zone) : $zoneid, $instanceid, $zoneln etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1083
		(export_mob) : $x, $y, $z, $h, $hpratio etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1032
		(export_event) : (event specific) IE: EVENT_SAY ($text) https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1141
2015-11-01 20:29:51 -06:00
Akkadius 6de2bb720f Adjust AI_scan_area_timer to randomly start between 1-3 ticks (6-18 seconds) 2015-11-01 17:49:45 -06:00
Akkadius 66c7deb2ac Remove some debug junk 2015-11-01 17:46:00 -06:00
Akkadius ce0011ab18 Renaming of some timers 2015-11-01 17:12:14 -06:00
Akkadius 2a69ae42ee (Performance) Rate limit the rate in which signals are processed for NPC's 2015-11-01 17:02:52 -06:00
Akkadius e5ad5e13db Comment out Log.Out super hot path line 2015-11-01 16:11:25 -06:00
Akkadius 624c7341c5 Refactor cfp to currently_fleeing for readability 2015-11-01 16:02:41 -06:00
Akkadius 53c8d63981 Implement Perl Export Variable settings map (Huge performance boost) (Preliminary) 2015-11-01 15:59:24 -06:00
Akkadius 33917fe2a9 - Add Zone Process ID (OS PID) as information passed back to world, ultimately with the ability to display it in the telnet console under 'zonestatus'
- Refactored some zoneserver/worldserver code for readability
2015-10-31 20:19:57 -05:00
Akkadius ab3e31154c Adjust AI Aggro check timers for NPC's with npc_aggro flag set to be far less excessive (Performance increase) 2015-10-31 18:32:23 -05:00
Michael Cook (mackal) 1dd911b150 Correct charm invis breaking 2015-10-30 16:45:34 -04:00
Natedog2012 ec36a3787d Allow ModifyNPCStat to change npc spell effects lists 2015-10-21 01:24:51 -07:00
Natedog2012 376b04a37b Allow ModifyNPCStat to change an NPCs spell list 2015-10-19 10:05:50 -07:00
Uleat 861d057fe5 Merge branch 'master' of https://github.com/EQEmu/Server 2015-10-16 18:09:50 -04:00
Uleat 85adea631d Activated load/save of new bot data fields; added command '#bot clearfollowdistance' 2015-10-16 18:09:22 -04:00
KayenEQ d91e7731c3 Merge pull request #465 from KayenEQ/Development
Optional but recommended SQL to update spells_new table fields.
2015-10-15 18:24:06 -04:00
KayenEQ 190ebbbc6f Optional but recommended SQL to update spells_new table fields. 2015-10-15 18:22:56 -04:00
Cilraaz e2f1456624 Allow For Old Race/Class Experience Modifiers
Add new ruletypes 'Character:UseOldRaceExpPenalties' and 'Character:UseOldClassExpPenalties'

When set to true, adds in bonuses/penalties that existed in Classic

Class-based penalties were disabled during Velious, while race-based penalties were not removed until TSS

This method uses the original SOE method of increase exp needed to level, rather than decreasing exp gained
2015-10-14 22:57:17 -04:00
Michael Cook (mackal) efeb80cc8b Fix MGB not always turning off and make it work for discs 2015-10-14 16:36:38 -04:00
Uleat 98bc7f0ccd Activated load/save of new bot inventory fields (not use implementation) 2015-10-13 19:29:49 -04:00
Uleat 285bd3a627 Updated '2015_09_30_bots.sql' to alleviate import failures due to broken contraints 2015-10-13 14:00:51 -04:00
Uleat d3755cdb08 Temporarily disabled the bot script until a linux issue can be sorted out 2015-10-13 00:30:23 -04:00
Uleat 0a27ab372d Merge branch 'master' of https://github.com/EQEmu/Server 2015-10-12 21:17:07 -04:00
Uleat b85850052a Fix for creation_date mis-naming 2015-10-12 21:16:54 -04:00
KayenEQ d83cd0ce89 Merge pull request #464 from KayenEQ/Development
FD break from spells
2015-10-12 19:53:43 -04:00
KayenEQ e2e8d444e9 Feign death will now break when hit by casted spells, consisted with live.
Implemented suport for AA/spell effect which provides a chance to avoid FD breaking from spells.
2015-10-12 18:51:41 -04:00
Uleat 4a61558de8 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-12 18:27:54 -04:00
Uleat eeab7baef9 Final commit for bots database versioning 2015-10-12 18:27:26 -04:00
Uleat df88107697 Missed on final review... 2015-10-12 17:59:29 -04:00
Uleat 79eb2d3d4b Remote testing and some final updates 2015-10-12 17:17:07 -04:00
Michael Cook (mackal) 8ed255ad01 Fix expansionless AAs 2015-10-12 14:07:14 -04:00
Akkadius eb4e970c30 Unfix the fix [skip ci] 2015-10-11 21:59:16 -05:00
Akkadius 71d36af3ef eqemu_update.pl minor fix [skip ci] 2015-10-11 17:10:10 -05:00
KimLS f19648f615 Will prefer libmysql(dynamic) over mysqlclient(static) library for linking. Update travis.yml for new travis-ci container types. 2015-10-10 22:06:54 -07:00
Uleat c508b48b42 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-10 19:28:31 -04:00
Uleat e1a5853389 Updated bots load/drop scripts (thanks Shendare!) 2015-10-10 19:27:39 -04:00
KayenEQ b923c69f39 Merge pull request #463 from KayenEQ/Development
Invisible/Hide mechanics when cast on
2015-10-10 15:42:19 -04:00
KayenEQ 261b6a4623 Invisible/Hide mechanics when cast on
Updated mechanics to be consistent with live regarding how invisible breaks when the client is the target of a spell.
Invisible will drop whenever a client is hit with a detrimental spell, regardless of if resisted, if it does damage or AOE.
Hide skill now also follows the same rules as above.
Implemented support for Rogue AA - Nerves of Steel which gives a chance for hide NOT to break
when client is hit with an AOE spell.
2015-10-10 15:16:49 -04:00
Uleat 531cbf79f5 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-09 21:39:05 -04:00
Uleat ecd695ff9b Script and server code query updates for bots_updater 2015-10-09 21:34:31 -04:00
KayenEQ 817059a2e8 Merge pull request #462 from KayenEQ/Development
Updated a few AA effects to use database values instead of hard coded …
2015-10-09 14:42:10 -04:00
KayenEQ aae073f588 update 2015-10-09 14:29:15 -04:00
KayenEQ 79c9862131 Few more AA updates to use database instead of hard coded values. 2015-10-09 14:04:39 -04:00
KayenEQ 902a850c71 Merge pull request #461 from KayenEQ/Development
Updated a few AA effects to use database values instead of hard coded …
2015-10-09 13:58:04 -04:00
KayenEQ 2cf59ae2f2 Updated a few AA effects to use database values instead of hardcoded values. 2015-10-09 13:08:24 -04:00
KayenEQ 3bdd954ac0 Merge pull request #460 from KayenEQ/Development
Implemented SE_PC_Pet_Flurry_Chance
2015-10-08 19:58:32 -04:00
KayenEQ 43671fa749 Implemented SE_PC_Pet_Flurry_Chance 466 // Base1 % chance to do flurry from double attack hit. 2015-10-08 19:26:04 -04:00
KayenEQ 4835e87142 Merge pull request #459 from KayenEQ/Development
Implemented spells_new field 198 = no_detrimental_spell_aggro
2015-10-08 16:30:07 -04:00
KayenEQ 20bdbdd52d Implemented spells_new field 198 = no_detrimental_spell_aggro
Spells with this flag will not generate any aggro
Note: DOT portions of spells wilth this flag STILL generate aggro.
Example Harminous Arrow (Ranger AA) 16127
2015-10-08 16:05:14 -04:00
Michael Cook (mackal) 9bff5baa1c Nuked. 2015-10-08 13:36:04 -04:00
KayenEQ 5aa99aeef1 Merge pull request #458 from KayenEQ/Development
Update/Implementation of various fields in spells_new
2015-10-08 12:07:25 -04:00
KayenEQ c35eacbc99 Update/Implementation of various fields in spells_new
219 not_extendable - > not_focusable - No focus are applied to these spells
217 maxtargets -> no_heal_damage_item_mod - Not applied to these spells.
232 -> no_remove -> Can not click off these spells even if beneficial
209 powerful_flag -> no_resist -> Unresistable spell
2015-10-08 11:49:21 -04:00
Akkadius 893f752520 Fix for proper script exit eqemu_update.pl [skip ci] 2015-10-08 09:41:47 -05:00
Akkadius ffe1bede52 eqemu_update.pl additions for EQEmu Installer to come [skip ci] 2015-10-06 14:26:53 -05:00
Akkadius 2680fc1a83 Preliminary routines for modular installer efforts [skip ci] 2015-10-05 01:07:59 -05:00
Akkadius aaae583dab Fix hash order [skip ci] 2015-10-04 20:48:11 -05:00
Akkadius 8973059961 Fix menu links [skip ci] 2015-10-03 22:13:16 -05:00
Akkadius 658b6ba570 Adjustments to eqemu_update.pl menu (V11) 2015-10-03 20:23:39 -05:00
Akkadius bcf2a5c852 eqemu_update.pl minor adjustment, v10 [skip ci] 2015-10-03 16:03:53 -05:00
Uleat 9bf4f399da Temporarily disabled bot versioning until script methods are corrected 2015-10-03 13:42:00 -04:00
Akkadius 625df2ad9b Forgot one part [skip ci] 2015-10-02 20:31:24 -05:00
Akkadius 3e42cae123 Complete support for bots database versioning in eqemu_update.pl (Option 10), ready for Uleat to take it from here [skip ci]
- The one thing to note is that world bootup will not be interrupted with required bot updates, however full versioning is supported.
2015-10-02 20:30:30 -05:00
Uleat 3ac87c8e31 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-02 20:49:13 -04:00
Uleat 07ee9901b7 Name change for base bot schema sql files 2015-10-02 20:48:24 -04:00
Akkadius 1e3f7b14c8 Bots database versioning (prep) [skip ci] 2015-10-02 19:40:58 -05:00
Akkadius cbcfa2f2df Fix issue with an old SQL update and newer database engines [skip ci] 2015-10-02 19:35:02 -05:00
Uleat 75da37b7b4 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-02 19:11:59 -04:00
Uleat a5f805e1f7 Unversioned... 2015-10-02 18:59:56 -04:00
Uleat 0999278b75 Initial bots_updater commit 2015-10-02 18:57:51 -04:00
Michael Cook (mackal) 321fa9cd50 Merge pull request #457 from Cilraaz/master
Update to give client access to the proper AAs for the expansions all…
2015-09-30 13:30:44 -04:00
Cilraaz 8323f6af7b Update to give client access to the proper AAs for the expansions allowed
Bit shifting by expansion value minus 1, rather than expansion value
2015-09-30 12:58:05 -04:00
Uleat a1089fccd6 Implemented 'Inventory Snapshot' feature 2015-09-25 23:07:05 -04:00
KayenEQ 41d19c4e8a Merge pull request #456 from KayenEQ/Development
Implemented a few new stackable spell damage focus effects from live.
2015-09-25 05:19:56 -04:00
KayenEQ 370b5d7810 Implemented a few new stackable spell damage focus effects from live.
Implemented SE_ImprovedDamage2				461 // Increase spell damage by percent (SE_Fc_Damage_%2)
Implemented SE_FcDamageAmt2     		462 // Increase spell damage by flat amount (SE_Fc_Damage_Amt2)
2015-09-25 05:18:30 -04:00
KayenEQ eb1d43020e Merge pull request #455 from KayenEQ/Development
Implemented SE_PC_Pet_Rampage
2015-09-25 04:46:13 -04:00
KayenEQ a11816fddf Implemented SE_PC_Pet_Rampage 464 - Base1 % chance to do rampage for base2 % of damage each melee round 2015-09-25 04:44:17 -04:00
Michael Cook (mackal) 957aba7ae5 Fix Sinister Strikes calc 2015-09-24 19:39:36 -04:00
Michael Cook (mackal) d0f9a14217 Revert "Fix likely dev typo in sinister strikes calc"
This reverts commit 72aaf56c79.
2015-09-24 19:33:16 -04:00
KayenEQ 41dc7622f9 Merge pull request #454 from KayenEQ/Development
Implemented spells_new field 217 override_crit_chance
2015-09-22 03:03:11 -04:00
KayenEQ cc0d0cc126 Implemented spells_new field 217 override_crit_chance
Determines the maximum chance this spell has to critical hit.
Ie. If set to 15, the spell will never critical more then 15% of the time
regardless of your characters innate chance to critcal from AAs.
2015-09-22 03:02:24 -04:00
KayenEQ b3ded44a59 Merge pull request #453 from KayenEQ/Development
Added the latest spell effects to spdat.h for future implementation.
2015-09-21 20:30:08 -04:00
KayenEQ ccbaccd0c1 Added the latest spell effects to spdat.h for future implementation. 2015-09-21 20:28:48 -04:00
Akkadius bc525e33c5 Fixed an issue where tints and weapons weren't being refreshed on Mob::SendIllusion triggers from scripts 2015-09-21 15:28:29 -05:00
Akkadius 13ba997589 Update eqemu_update.pl (v8) to use new AA data post AA rework for fresh AA table downloads [skip ci] 2015-09-20 15:21:38 -05:00
Akkadius 4c0a9562ee Update db_dumper.pl (Database backup) script to only create backups with underscores as space delimiters (db 09-2-2015.sql) vs Now: (db_09_20_2015.sql) [skip ci] 2015-09-20 15:12:00 -05:00
Michael Cook (mackal) 72aaf56c79 Fix likely dev typo in sinister strikes calc 2015-09-20 03:58:21 -04:00
Michael Cook (mackal) 9408403a00 Fix damage bonus calculations
Based on dev quotes, nerfs Sinister Strikes
2015-09-18 19:50:48 -04:00
Michael Cook (mackal) 211462456c More hate fixes
Refix double spell casting subtlety
Fix double spell casting subtlety for beneficial spells
Move 100 initial bonus to AddToHateList so melee get it as well
Lower prox aggro since the 100 bonus is in AddToHateList now
2015-09-17 01:46:40 -04:00
Uleat b24f1914ab Minor fix for opcode_handlers.py (Underfoot to UF) 2015-09-16 19:45:28 -04:00
Michael Cook (mackal) 548701cba6 Fix int underflow error in disc reuse timers focus 2015-09-04 14:07:01 -04:00
Michael Cook (mackal) 0d3bd5988b Fix issue when RemoveXTarget was called with a mob not on our XTargets
This could be better, but works for now
2015-09-04 12:12:29 -04:00
Michael Cook (mackal) 5126104fd6 Some crash fixes noticed on EQMacEmu 2015-09-03 20:42:35 -04:00
Michael Cook (mackal) 64deca11b2 Woops, gotta initialize the new flag 2015-09-03 03:05:50 -04:00
Michael Cook (mackal) 4ae02e5efe XTargets will move auto entries up on removal like live
This also makes use of the bulk packet so not a crap ton of packets
generated.
2015-09-03 02:58:04 -04:00
Akkadius b7ee4634be Merge pull request #452 from KinglyKrab/master
Fixed #bot resist commands.
2015-08-31 15:46:12 -05:00
Kinglykrab b868cbbcfe Fixed #bot resist commands. 2015-08-31 14:41:58 -04:00
Michael Cook (mackal) 7002ee184a Merge pull request #451 from KinglyKrab/master
Fixed #npcedit rangedtype.
2015-08-28 15:19:38 -04:00
Kinglykrab 53292a99a2 Fixed #npcedit rangedtype. 2015-08-28 15:15:19 -04:00
Michael Cook (mackal) 43586a33cd Port PROX_AGGRO from EQMacEmu
If this ability is set, the NPCs will continuously add things to their
hate list while their engaged. If it's not set (default) they won't,
which is what the vast majority of NPCs do on live.
2015-08-26 16:20:56 -04:00
Michael Cook (mackal) 839b6e25d8 Fix "same spell line" optimization for same spell mana burns ... 2015-08-24 02:15:41 -04:00
Michael Cook (mackal) 39e35fa011 Temp solution for AE ramp crash 2015-08-21 03:09:27 -04:00
Michael Cook (mackal) 1d6a185f0f Break "same spell line" optimizations for mana burns 2015-08-19 22:21:17 -04:00
Michael Cook (mackal) 60c6583c54 Fix readability [skip ci] 2015-08-19 14:44:46 -04:00
Uleat bc9f85843e Fix for SoF character select screen issue 2015-08-17 23:23:24 -04:00
Alex ce2c1b585f Merge pull request #450 from noudess/master
Fix buffdurationpacket for seeinvis spells
2015-08-15 19:13:04 -07:00
Paul Coene a2c5f359d8 Fix buffdurationpacket for seeinvis spells 2015-08-15 20:14:15 -04:00
Michael Cook (mackal) a4d0db8e0a Implement the extra Wild Rampage/Rampage message (SoD+) 2015-08-15 00:34:10 -04:00
Michael Cook (mackal) fe0758c984 Add EVENT_TICK for NPCs
This event fires at the start of the tick processing so we can
script on the actual tick.
2015-08-13 22:30:49 -04:00
Michael Cook (mackal) 1fc23beb78 Clear auto XTargets on WipeHateList 2015-08-12 23:36:59 -04:00
Michael Cook (mackal) f46b88bbde Merge pull request #447 from noudess/master
Fix snow so it ends correctly.
2015-08-08 19:28:00 -04:00
Michael Cook (mackal) 4a3701f05a Merge pull request #449 from KinglyKrab/master
GetAccountAge() for Perl.
2015-08-08 19:26:30 -04:00
Kinglykrab ede969a614 Added GetAccountAge() functionality to Perl so people can grant veteran AAs based on account age. 2015-08-08 17:09:57 -04:00
Michael Cook (mackal) e0d65df4de Fix #myskills crash 2015-08-06 20:29:55 -04:00
Paul Coene 4e538d14c8 Fix snow so it ends correctly. Packet is different from the all zeros sent
to end rain.  End packets need to have the type that is ending.
2015-08-04 09:48:39 -04:00
Akkadius a04e78cfd1 Shendare: VS2013 query StringFormat glitches when "%f" is passed for the int GetRunSpeed().
Shendare: In CreateNewNPCCommand(), the npc_type_id and spawngroupid are created in the database, but never set in the spawn class, so later it can't delete them with #npcspawn remove or #npcspawn delete.
2015-08-02 02:24:26 -05:00
Akkadius 4106251497 Merge pull request #446 from KinglyKrab/master
Added $client->GetMoney(type, subtype) to Perl/Lua.
2015-08-01 21:28:35 -05:00
Kinglykrab 892fb58b18 Added $client->GetMoney(type, subtype) to Perl/Lua.
Types:
- 0: Copper
- 1: Silver
- 2: Gold
- 3: Platinum
Sub Types (if applicable):
- 0: On Character
- 1: In Bank
- 2: On Cursor
- 3: Shared Bank (only applies to Type 3/Platinum)
2015-08-01 01:28:50 -04:00
Michael Cook (mackal) 7fc8841a67 Fix AE Ramp iterator issue 2015-07-31 02:00:09 -04:00
Michael Cook (mackal) b98bc207fb Move AE Ramp back to 1 target until iterator invalidation issue is resolved 2015-07-31 01:46:16 -04:00
Michael Cook (mackal) f380519803 Fix error with previous commit 2015-07-30 21:42:55 -04:00
Michael Cook (mackal) 0513f1ad5d Default area rampage to unlimited targets 2015-07-30 21:26:51 -04:00
Uleat 4c9a3b7c29 Fix for crash potential in Client::Handle_OP_ShopPlayerBuy 2015-07-27 22:13:55 -04:00
Michael Cook (mackal) be459de555 Fix issue with adding spells via quest to an empty list 2015-07-27 01:20:21 -04:00
Drajor 4258e5cebc Fixes #445 (Integer wrap in Inventory::HasItem)
unit8 changed to uint32 will prevent wrapping, excepting maybe extreme
cases. Fixes #445
2015-07-25 17:13:18 +10:00
Drajor 22a157787e Fix for ClientTaskState::UpdateTasksOnDeliver
Fix for issue introduced in changes to allow stacked items to be handed
in. Calling GetCharges on an item that can not be stacked will return 0
so this mean't that task credit was not awarded for single items.
2015-07-25 16:14:33 +10:00
Alex 26e153727e Merge pull request #444 from KinglyKrab/master
Files changed: ruletypes.h, client.cpp
2015-07-22 19:39:32 -07:00
KimLS 97e47dcbfb Fix for localaddress overwriting address 2015-07-22 17:42:57 -07:00
Michael Cook (mackal) fb4cc70999 Correct some Aggro calcs
See updated post: http://www.eqemulator.org/forums/showthread.php?t=39819

Aggro:MaxStunProcAggro renamed to Aggro:MaxScalingProcAggro
2015-07-22 16:31:38 -04:00
Kinglykrab 918bdd73f4 Files changed: ruletypes.h, client.cpp
Files added: 2015_07_22_CommonTongue.sql

Adds new rules so you can change the start Common Tongue value for Iksars, Ogres, and Trolls.
2015-07-22 09:24:06 -04:00
Alex 234b7a3c57 Merge pull request #443 from EQEmu/TaskHandIn
Hand in stacked items
2015-07-22 01:30:39 -07:00
Alex 638c96f24a Merge pull request #442 from af4t/master
Compile fixes for Visual Studio 2015 Community
2015-07-21 22:58:42 -07:00
Drajor 8f78a3fd35 Hand in stacked items
Added support for handing in stacked items and getting task credit for
those items.
2015-07-22 15:50:19 +10:00
Kemmler 8a55106288 Visual Studio 2015 Community compiles bonuses.cpp correctly now. 2015-07-21 00:42:04 -04:00
Kemmler 76b29c04e5 Merge branch 'master' of https://github.com/af4t/Server 2015-07-20 10:53:52 -04:00
Kemmler a2f39e22d1 Merge branch 'master' of git://github.com/EQEmu/Server 2015-07-20 10:47:13 -04:00
Kemmler 5dc63a6d35 Merge branch 'master' of git://github.com/EQEmu/Server 2015-07-20 10:37:26 -04:00
Kemmler c2cbf7a2ab Merge branch 'master' of https://github.com/af4t/Server
Conflicts:
	zone/bonuses.cpp
2015-07-20 10:31:46 -04:00
Kemmler 5952610a7b Very preliminary work with Visual Studio 2015 Community RC/RTM, resolve some version-specific build errors:
1. Standard library functions snprintf & vsnprintf are available thusly named (without the prepended underscores).  Someone may want to check my conditionals against non-MSVC compilers, though.
2. zone/bonuses.cpp throws an internal compiler error with optimize enabled; #pragma disable optimization on VS2015 only on function Mob::NegateSpellBonuses works around it.
2015-07-20 10:27:51 -04:00
Natedog2012 87b4640ff0 Fix bots from loading AAs that are too high of a level for them. 2015-07-20 00:25:45 -07:00
Kemmler 663ff55271 Very preliminary work with Visual Studio 2015 Community RC/RTM, resolve some version-specific build errors:
1. Standard library functions snprintf & vsnprintf are available thusly named (without the prepended underscores).  Someone may want to check my conditionals against non-MSVC compilers, though.
2. zone/bonuses.cpp throws an internal compiler error with optimize enabled; #pragma disable optimization on VS2015 only. Doing further testing as to whether we have to disable optimization for the WHOLE file ...
2015-07-18 16:56:41 -04:00
Michael Cook (mackal) c91374444b Fix bard song hate 2015-07-18 01:01:27 -04:00
Michael Cook (mackal) be16e558ff Fix Spell Casting Subtlety for offensive spells 2015-07-18 00:58:02 -04:00
Michael Cook (mackal) 7cef9a05dd Bump witness fail chance to 50 2015-07-18 00:57:10 -04:00
Michael Cook (mackal) a245fceddd Merge pull request #439 from KinglyKrab/master
New commands.
2015-07-16 22:39:34 -04:00
Michael Cook (mackal) a52ab7ae48 Rework spell aggro based on http://www.eqemulator.org/forums/showthread.php?t=39819<F37> 2015-07-16 22:38:32 -04:00
Kinglykrab eb5e0ee72c New commands.
- #untraindisc [spellid] - Untrains specified discipline.
- #untraindiscs - Untrains all disciplines.
2015-07-16 21:25:24 -04:00
Akkadius 417b034273 Merge pull request #438 from hateborne/master
Add Optional Enforce Task Level Requirement on AssignTask
2015-07-16 18:12:06 -05:00
KimLS 4d68ddc82f More NAT fixes, please work 2015-07-16 15:07:59 -07:00
KimLS 87d42931aa Fix for not having address/localaddress set from not localhost 2015-07-16 14:35:20 -07:00
hateborne cb874ad4e2 Me being a fool.
Added missing closing paran
2015-07-16 14:56:08 -04:00
hateborne 1b8f613391 Amend these to last commit
Forgot to add changelog and adjustment to task.cpp getmin/getmax
2015-07-16 13:46:41 -04:00
hateborne d64f79cb2a Add Optional Enforce Task Level Requirement
Affected:
quest::assigntask
$client->AssignTask

This is to allow those task level requirements in DB to be used,
optionally. It defaults to do not enforce (translated: no change for
current servers), but can be set with an additional flag to both
commands (see below). The LUA bit was added thanks to help from demonstar55.

quest::assigntask(703); # works
quest::assigntask(703, 1); # denies user
$client->AssignTask(701, $npc->GetID()); # works
$client->AssignTask(701, $npc->GetID(), 1); # denies user
2015-07-16 13:41:46 -04:00
Alex c8f6b098c2 Merge pull request #437 from EQEmu/reload_sm
Reload sm
2015-07-16 02:18:37 -07:00
KimLS b7cd0b223f Added two other commands to let you do shared reloading on your own without the hotfix command. Also changed how world determines a zone's address 2015-07-16 01:51:10 -07:00
KimLS 9f1f36cca6 Merge from master 2015-07-15 23:15:25 -07:00
Michael Cook (mackal) 3cd474e960 Updated SpecialAbility lua constants 2015-07-12 23:37:43 -04:00
KimLS 8dd362a101 Fix for launcher not actually sending static ports when set in the db 2015-07-11 13:28:37 -07:00
Michael Cook (mackal) 7909270527 Make sure we actually have the AA they're trying to cast 2015-07-09 02:44:55 -04:00
Michael Cook (mackal) 3c1b499485 Fix Expendable AAs
Thanks to ASan
2015-07-09 02:37:43 -04:00
KimLS a69fbb9e0b Set -> Get Timer 2015-07-08 18:10:04 -07:00
KimLS 753f53be1b Some small tweaks to reduce the amount of SendPosUpdates() are actually getting sent out on the wire. 2015-07-08 17:10:55 -07:00
Michael Cook (mackal) 3455d70ca2 Make SPECATK_QUAD uncheesable
Live seems to have w kinds of "quads" one is an innate DW
but people found out you could cheese them so luclin+ you can't anymore

so INNATE_DW you can give the NPC a 2h and they will stop quadding
QUAD they will accept the 2h but still quad
2015-07-07 17:20:37 -04:00
Michael Cook (mackal) e70e11f86c Merge pull request #436 from KinglyKrab/master
Bot command changes.
2015-07-06 16:55:52 -04:00
Kinglykrab 2ca5a4ade6 Bot command changes.
- #bot ai mez is now #bot mez
- #bot bindme is now #bot bind
- #bot runeme is now #bot rune
- #bot augmentitem now has an alias of #bot ai
- #bot giveitem now has an alias of #bot gi
- Removed unused #bot groupmessages
- Removed useless additional parameters (c->GetName()/sep->arg[2])
- Formatted loops and conditionals.
2015-07-06 16:28:17 -04:00
Michael Cook (mackal) 1e75b4ba77 Implement Triple Attack as a skill
See change log for more details
Optional SQL will max toons triple attack skills
2015-07-06 16:11:00 -04:00
Alex 5a73d26d12 Merge pull request #435 from KinglyKrab/master
Fixed guild windows on bot-enabled servers.
2015-07-06 11:08:10 -07:00
Kinglykrab 61c9a07596 Fixed guild windows on bot-enabled servers. 2015-07-06 14:05:09 -04:00
Alex 88dfc4abd8 Merge pull request #434 from KinglyKrab/master
Bot saylinks and command aliases.
2015-07-06 10:30:34 -07:00
Kinglykrab e2ac647e03 Bot saylinks and command aliases. 2015-07-05 23:30:38 -04:00
Michael Cook (mackal) 1d29c873fb Rewrite NPC combat rounds logic
See changelog.txt
2015-07-05 16:36:12 -04:00
Michael Cook (mackal) 70577584ab Make SPECATK_QUAD == SPECATK_INNATE_DW when Combat:UseLiveCombatRounds is true 2015-07-05 03:33:16 -04:00
Michael Cook (mackal) dcd1a07553 Fix issue with two hander for NPCs dual wielding
Cleaned up some other 2hander logic as well
2015-07-05 03:11:25 -04:00
Michael Cook (mackal) d083262555 Fix clients offhand double attack check 2015-07-05 02:43:33 -04:00
Michael Cook (mackal) fe97af4d89 Fix some issues with Rampage/AE Ramp 2015-07-05 02:27:51 -04:00
Michael Cook (mackal) 22efe33f9b Correct the definition of "quading"
If you would like your NPCs to use the old rules, turn
Combat:UseLiveCombatRounds to false.
2015-07-05 02:05:50 -04:00
Michael Cook (mackal) 82fe15190b Add CheckDoubleAttack for mobs 2015-07-05 01:37:14 -04:00
Michael Cook (mackal) 7c89ab3fec Pull Mob mainhand/offhand attack rounds into their own functions 2015-07-05 01:15:46 -04:00
Michael Cook (mackal) 578bbf657a Make Client::AI_Process in line with uncharmed 2015-07-05 00:46:37 -04:00
Michael Cook (mackal) 99620f8535 Add Mob/Client CheckDualWield functions 2015-07-05 00:45:46 -04:00
Michael Cook (mackal) 8d3d3d2af2 Add Dual Wield/Double Attack NPC skill overrides
The vast majority of mobs on live follow this path. The exception
appears most commonly with PC pets though. Eventually these should
be changeable in the DB.
2015-07-05 00:42:06 -04:00
JJ 947145a642 Oops. [skip ci] 2015-07-04 12:12:18 -04:00
JJ fe98b3363d Filename consistency. [skip ci] 2015-07-04 12:10:58 -04:00
Michael Cook (mackal) 49e9c9ee34 Reworked activated avoidance skills based on dev quotes 2015-07-04 02:13:26 -04:00
Natedog2012 80c2d9d68d Set a deity for bots so they can LoadAA 2015-07-03 15:44:38 -07:00
Michael Cook (mackal) 0372651613 Fix Bot::LoadAA 2015-07-03 17:42:31 -04:00
Natedog2012 f2e0384cb8 Merge pull request #433 from KinglyKrab/master
Files changed: command.cpp, questmgr.cpp
2015-07-03 12:29:14 -07:00
Kinglykrab 59e40b3fbe Files changed: command.cpp, questmgr.cpp
- Added command aliases: #findzone -> #fz, #reloadquest -> #rq
- Added instance ID to $client->GoToSafeCoords() in quest::safemove();
2015-07-03 14:57:48 -04:00
Michael Cook (mackal) 927a88cf96 Really fix class AA check 2015-07-03 02:31:12 -04:00
Michael Cook (mackal) 803fa48c05 Fix AA class check 2015-07-03 02:17:14 -04:00
KimLS 81e827481b Final touch up on this, changelog + fix for sql classes default being left shifted 1. 2015-07-02 20:18:08 -07:00
KimLS 214873c139 Merge conflicts abound and now are fixed 2015-07-02 20:12:51 -07:00
KimLS 233b096c17 0 != 9 and i suck at manifests cause of that fact 2015-07-02 20:10:26 -07:00
KimLS cca7a7899a Merge branch 'aa' of github.com:EQEmu/Server into aa 2015-07-02 20:08:32 -07:00
KimLS 25c6ddd631 Scary final SQL stuff for aa branch 2015-07-02 20:07:09 -07:00
KimLS 35991b68a0 First sql, need to merge from master first before i finish. 2015-07-02 19:36:38 -07:00
Akkadius da1167671b changelog addition [skip ci] 2015-07-01 01:25:56 -05:00
Akkadius 2bf49be855 Fix an issue where emote messages would overflow the buffer of 256 by increasing the size and changing some of the initialization
Added a custom Health Update message that will display in the middle of the players screen, to enable this server wide you must enable rule 'Character:MarqueeHPUpdates'
(Haynar) Fixed some runspeed issues with Perl and LUA scripts
(Haynar) Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format.
(Haynar) Improved client movement while AI Controlled, such as feared and charmed.  Movement will be much smoother from clients perspective.
2015-07-01 01:23:00 -05:00
Akkadius b71e856c8c Increase emote buffer to 4096 2015-07-01 00:19:44 -05:00
Akkadius 88659b5f7e Runspeed changes added to database update manifest 2015-06-30 23:57:13 -05:00
Akkadius 895f27a6c1 Fix an issue with Guild messages sent via gmsay that are too long 2015-06-30 23:42:21 -05:00
Michael Cook (mackal) ea18238a12 Some servers apparently relied on the HP update spam 2015-06-30 20:35:28 -04:00
JJ 56b57d2ca6 Fix moving character to zone using character id and zone name. (bheam) 2015-06-30 20:05:35 -04:00
Akkadius fdfd602bd2 Merge pull request #432 from ngdeao/master
Updated additional support in code for new speed calculations.
2015-06-30 02:29:26 -05:00
ngdeao 850a908874 Fixed #modifynpcstat runspeed <value>, to work with new speed calculations.
Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format.
Improved client movement while AI Controlled, such as feared and charmed.  Movement will be much smoother from clients perspective.
2015-06-29 22:57:37 -06:00
Akkadius c61feffe26 Merge pull request #431 from ngdeao/master
Fixed some mob speed scaling.
2015-06-28 03:19:43 -05:00
ngdeao 74aec82d2a Optional SQL for adjusting mob speeds.
The base runspeeds for mobs were about 80% high.  This scales them to values appropriate for new speed calculations.
The RescaleRunspeeds regroups speeds into common seen speed bins.  Higher speeds it lowers them by 20%.  This should only be run once against a db.
The Set specific speeds is tailored to specific mob run speeds, based on data taken from eqlive.
2015-06-28 00:58:03 -06:00
ngdeao b11fea91a6 Fixed some mob speed scaling. 2015-06-28 00:35:55 -06:00
Michael Cook (mackal) 009918cbd1 Fix songcap implementation 2015-06-27 22:43:00 -04:00
Michael Cook (mackal) 5a6685d129 Fix issue with AA cast mana consumption
AAs will now cast from slot "0xFF" instead of the itemslot
to avoid special behavior of items.

Mana reduction also moved down to the same place consumption takes
place like live.
2015-06-27 18:39:13 -04:00
Michael Cook (mackal) 337ce2d74b Fix crash for Bard Furious Refrain
This does a frenzy, which bards don't have. Live this AA is broken.
2015-06-26 18:00:15 -04:00
Michael Cook (mackal) cee7e401dd Fix issue with initial cast of level override proc buffs 2015-06-26 02:19:13 -04:00
Michael Cook (mackal) cb525156ef Merge branch 'master' into aa 2015-06-26 02:04:48 -04:00
Michael Cook (mackal) 4b64e8c39c Ignore skills out of range for bonuses 2015-06-26 02:04:33 -04:00
Michael Cook (mackal) c3a805923c Up the bard level check to 255 again
1-254 actually has special bard logic and client expects it
2015-06-25 13:21:02 -04:00
KimLS 476ee10ca0 Fix for Berserkers not seeing AAs on SoD and below clients. 2015-06-24 20:02:11 -07:00
KimLS 31301e0a26 ResetAA should hopefully play better with granted AA points now 2015-06-24 01:25:49 -07:00
KimLS 3dd89b0daa Polishing shared memory hotfix code 2015-06-23 22:04:48 -07:00
KimLS 67143f1b8a Initial work on shared memory hotfixes 2015-06-23 17:39:06 -07:00
Michael Cook (mackal) 8f156b3c91 Add Client:GetAccountAge to Lua 2015-06-23 18:37:24 -04:00
KimLS a41570677f More work on Granting, incrementaa now uses grant internally which should make it work more consistently with its old behavior 2015-06-23 12:53:46 -07:00
KimLS ce5e185738 Reworked how grant aa works 2015-06-23 00:36:43 -07:00
Michael Cook (mackal) fd989cdbc8 Add back in the bard song focus check
But also allowed focusSpellDuration through for that AA
2015-06-22 00:08:21 -04:00
KimLS 51caa3c577 Merge branch 'aa' of github.com:EQEmu/Server into aa 2015-06-21 01:25:48 -07:00
KimLS 77f050b653 setaapts command will now let you have up to 5k AA points, from 200. Removed the need to specify a prev_id in alternate_abilities table it can deduce that by itself. 2015-06-21 01:25:34 -07:00
Michael Cook (mackal) c0ea82f9e1 SE_MeleeVulnerability really really is Max Mana limit
Also found the cause of bard song tick increase and removed
the uneeded code

Also removed the IsBardSong check from GetFocusEffect, it really
shouldn't be needed, but will need to keep an eye out. The focus
effects should most often limit out the bard songs anyways
2015-06-21 02:58:43 -04:00
Michael Cook (mackal) d34b4a786b Implement duration ramp and war cry with new AA system
Rampage also correctly does a full attack round for classes
other than monk and ranger
2015-06-21 02:01:48 -04:00
KimLS d5098a56e0 Timers and some more loading stuff 2015-06-20 19:44:00 -07:00
Michael Cook (mackal) 635ac692ea Fix merge ... 2015-06-19 21:48:34 -04:00
Michael Cook (mackal) 6621a125e6 Merge branch 'master' into aa 2015-06-19 21:44:58 -04:00
KimLS 94f47e7adf Merge branch 'aa' of github.com:EQEmu/Server into aa 2015-06-17 12:05:36 -07:00
KimLS 065363480f Added AA grant to quest system, fixed a bug here or there noticed incrementaa needs to be fixed or removed 2015-06-17 12:05:09 -07:00
Michael Cook (mackal) 0447321d92 Implement songcap needed for the AA revamp
Added rule Character:UseSpellFileSongCap defaulted to true since
most servers will probably be updating everything.
2015-06-17 02:47:05 -04:00
KimLS c445f63186 Okay timers now work right, for real this time 2015-06-16 23:41:46 -07:00
KimLS 33b6748c1b Merge branch 'aa' of github.com:EQEmu/Server into aa 2015-06-16 21:46:24 -07:00
KimLS 60f2e31240 Retooled how cooldowns work so they should be more consistent with how the client shows them 2015-06-16 21:43:51 -07:00
Michael Cook (mackal) f4c22d7111 Fix double riposte 2015-06-16 17:10:47 -04:00
KimLS d3280c9676 Removing old code, need to reimplement warcry and rampage still at least 2015-06-16 12:33:14 -07:00
KimLS 1b088b7157 AA bonus calc -> Mob from Client, Bots should now work with their aa stuff again (untested) 2015-06-16 11:34:43 -07:00
KimLS a984e9bd7c Some cleanup as well as fix for a certain type of aa proc 2015-06-15 15:09:06 -07:00
KimLS 34f0106437 Added reset aa command for rof2 (50 status req), fixed #resetaa command 2015-06-15 13:57:18 -07:00
Michael Cook (mackal) 335470d3db Port up AA sympathetic procs 2015-06-13 22:49:32 -04:00
Michael Cook (mackal) 121af489c4 Support for Eyes Wide Open
This probably needs testing on older clients ...
2015-06-13 17:53:21 -04:00
Michael Cook (mackal) 106e0c69ab Added todo list to ApplyAABonuses
Probably incomplete
2015-06-13 02:43:00 -04:00
Michael Cook (mackal) 4898bfd822 Fix focusReagenCost for pets
All focus seem to use 33 ...
2015-06-13 02:12:17 -04:00
Michael Cook (mackal) d68075a5dc Merge branch 'master' into aa 2015-06-12 22:50:05 -04:00
Michael Cook (mackal) ed11ee8bea AA effects and focus should work
Still need to verify all effects and implement currently unhandled
2015-06-12 22:41:18 -04:00
KimLS 65ac9683a3 Removed fluff code, added drakkin heritage and status can use modifiers to aa abilities 2015-06-12 13:39:20 -07:00
KimLS e5d1e98793 Added deity and race checking to AAs, doubled over the sanity check code and found a mistake, added code to make boats move smoother after loading into oot 50 times and seeing it skip every time. 2015-06-12 02:56:51 -07:00
KimLS afaa9ee6c9 Expendable aa work 2015-06-11 23:08:17 -07:00
KimLS dd345c01de Activating AAs now works, don't have expend charges working quite yet so they can just be cast over and over. 2015-06-11 21:33:39 -07:00
KimLS 63928caace Removing cruft, patches should *all* work now even titanium, incrementaa has been implemented (untested atm) 2015-06-11 18:38:46 -07:00
KimLS 985d969384 AA purchasing works 2015-06-11 17:04:59 -07:00
KimLS bad4a94b84 Apply RoF2 patch demon gave me for AAs 2015-06-11 01:45:55 -07:00
KimLS 416538764a Merge branch 'master' into aa 2015-06-10 22:47:45 -07:00
KimLS 1589169200 AAs should load from character data now, though will be fucked up if you already had stacked aas. 2015-06-10 22:46:57 -07:00
KimLS 8422ce6f25 Moved effects to a vector since we dont need the random access by slot 2015-06-09 22:46:53 -07:00
KimLS 963eb91669 Merge branch 'master' into aa 2015-06-09 22:13:03 -07:00
KimLS d5e697c061 More work, looks a lot better than before, tomorrow i hope to get actual client implementation done 2015-06-09 22:12:31 -07:00
KimLS 33c1c7c3e4 More packet figuring out... 2015-06-09 16:17:09 -07:00
KimLS dbbe6b5a91 Experimenting with packets 2015-06-09 12:39:39 -07:00
KimLS 250d0cc903 More aa work, it actually loads yay 2015-06-08 20:06:14 -07:00
KimLS 361c93b689 Merge branch 'master' into aa 2015-06-08 09:58:59 -07:00
KimLS 3ee1c43ac4 Remove old aa list send for experiment also want to merge from master... 2015-06-08 09:53:21 -07:00
KimLS 6515879c14 Merge branch 'master' into aa 2015-06-07 19:42:57 -07:00
KimLS 3d1dc6314d New style AA data loading, still rudimentary 2015-06-07 19:42:12 -07:00
1986 changed files with 590435 additions and 197170 deletions
+21
View File
@@ -0,0 +1,21 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.101.1/containers/ubuntu-18.04-git
{
"name": "Ubuntu 18.04 EQEMU",
// Moved from dockerfile to image so it builds faster
"image": "eqemu/devcontainer:0.0.2",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-vscode.cpptools", "ms-azuretools.vscode-docker"],
"mounts": ["source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"],
"remoteEnv": {
"HOST_PROJECT_PATH": "${localWorkspaceFolder}"
}
}
+16
View File
@@ -0,0 +1,16 @@
---
kind: pipeline
type: docker
name: EQEmulator Server Linux CI
# Limits how many of these builds can run on the drone runner at a time, this isn't about cores
concurrency:
limit: 1
steps:
- name: server-build
# Source build script https://github.com/Akkadius/akk-stack/blob/master/containers/eqemu-server/Dockerfile#L20
image: akkadius/eqemu-server:latest
commands:
- sudo chown eqemu:eqemu /drone/src/ * -R
- git submodule init && git submodule update && mkdir -p build && cd build && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
+23
View File
@@ -0,0 +1,23 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8
[*.cpp]
indent_style = tab
[*.h]
indent_style = tab
# Tab indentation (no size specified)
[Makefile]
indent_style = tab
+29 -10
View File
@@ -17,21 +17,40 @@
*.out
*.app
.bash_history
# CMake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
Build/
build/
Build32/
build32/
Build64/
build64/
Build_32/
build_32/
Build_64/
build_64/
[Bb]uild*/
log/
logs/
vcpkg/
perl/
.idea/*
*cbp
submodules/*
cmake-build-debug/
.nfs.*
# Visual Studio and CMAKE Generated Files
/.vs/
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*.cmake
*.ilk
*.pdb
*.sln
*.dir/
libs/
bin/
/Win32
/x64
/client_files/**/CMakeFiles/
+18
View File
@@ -0,0 +1,18 @@
[submodule "submodules/glm"]
path = submodules/glm
url = https://github.com/g-truc/glm.git
[submodule "submodules/fmt"]
path = submodules/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "submodules/libuv"]
path = submodules/libuv
url = https://github.com/libuv/libuv.git
[submodule "submodules/cereal"]
path = submodules/cereal
url = https://github.com/USCiLab/cereal.git
[submodule "submodules/websocketpp"]
path = submodules/websocketpp
url = https://github.com/zaphoyd/websocketpp.git
[submodule "submodules/recastnavigation"]
path = submodules/recastnavigation
url = https://github.com/EQEmu/recastnavigation.git
+15 -14
View File
@@ -1,18 +1,19 @@
language: cpp
compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libmysqlclient-dev libperl-dev libboost-dev liblua5.1-0-dev zlib1g-dev
dist: bionic
addons:
apt:
packages:
- libmysqlclient-dev
- libperl-dev
- libboost-dev
- liblua5.1-0-dev
- zlib1g-dev
- uuid-dev
- libssl-dev
script:
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON
- make
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON
- make -j2
- ./bin/tests
branches:
only:
- master
- stable
notifications:
email: false
irc:
channels: "irc.eqemulator.net#eqemucoders"
os: linux
+17
View File
@@ -0,0 +1,17 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/mysql"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
+8
View File
@@ -0,0 +1,8 @@
{
"files.associations": {
"chrono": "cpp",
"xutility": "cpp",
"iterator": "cpp",
"*.ipp": "cpp"
}
}
+164
View File
@@ -0,0 +1,164 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "make",
"type": "shell",
"command": "mkdir -p build && cd build && make",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "make clean",
"type": "shell",
"command": "mkdir -p build && cd build && make clean",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "cmake",
"type": "shell",
"command": "mkdir -p build && cd build && rm CMakeCache.txt && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' ..",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher":{
"owner": "cpp",
"fileLocation": "relative",
"pattern":[
{
"regexp": "([\\w+|\\\\]*\\.\\w+)\\((\\d+)\\)\\: (warning|error) (.*)$",
"file": 1,
"location": 2,
"severity": 3,
"message": 4
}
]
}
},
{
"label": "download maps",
"type": "shell",
"command": "mkdir -p build && cd build/bin && wget https://codeload.github.com/Akkadius/EQEmuMaps/zip/master -O maps.zip && unzip -o maps.zip && rm ./maps -rf && mv EQEmuMaps-master maps && rm maps.zip",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "download quests",
"type": "shell",
"command": "mkdir -p build && cd build/bin && cd server && git -C ./quests pull 2> /dev/null || git clone https://github.com/ProjectEQ/projecteqquests.git quests",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "download eqemu_config",
"type": "shell",
"command": "mkdir -p build && cd build/bin && wget --no-check-certificate https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/eqemu_config_docker.json -O eqemu_config.json",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "rebuild database (mariadb must be started)",
"type": "shell",
"command": "mkdir -p build && cd build/bin && docker run -i --rm --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --network=eqemu -it eqemu/server:0.0.3 bash -c './eqemu_server.pl source_peq_db && ./eqemu_server.pl check_db_updates && ./eqemu_server.pl assets && ./eqemu_server.pl lua_modules && ./eqemu_server.pl opcodes && ./eqemu_server.pl linux_login_server_setup'",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "zone 7000",
"type": "shell",
"command": "docker stop zone7000 | true && docker network create eqemu | true && docker run -i --rm --name zone7000 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu -p 7000:7000/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7000:7000",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "zone 7001",
"type": "shell",
"command": "docker stop zone7001 | true && docker network create eqemu | true && docker run -i --rm --name zone7001 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu -p 7001:7001/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7001:7001",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "loginserver",
"type": "shell",
"command": "docker stop loginserver | true && docker network create eqemu | true && docker run -i --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu --name loginserver -p 5999:5999/udp -p 5998:5998/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./loginserver",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "shared_memory, world",
"type": "shell",
"command": "docker stop sharedmemory | true && docker stop world | true && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --network=eqemu --name sharedmemory eqemu/server:0.0.3 ./shared_memory && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name world -p 9000:9000 -p 9000:9000/udp -p 9001:9001 -p 9080:9080 eqemu/server:0.0.3 gdb -ex run ./world",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "queryserv",
"type": "shell",
"command": "docker stop queryserv | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name queryserv eqemu/server:0.0.3 gdb -ex run ./queryserv",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "mariadb",
"type": "shell",
"command": "docker stop mariadb | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin/db:/bitnami/mariadb -p 3306:3306 -e MARIADB_DATABASE=peq -e MARIADB_USER=eqemu -e MARIADB_PASSWORD=eqemupass -e ALLOW_EMPTY_PASSWORD=yes --name mariadb --network=eqemu bitnami/mariadb:latest",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "ucs",
"type": "shell",
"command": "docker stop ucs | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src -p 7778:7778 --name ucs --network=eqemu eqemu/server:0.0.3 gdb -ex run ./ucs",
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
+64
View File
@@ -0,0 +1,64 @@
# Guide To Building From Source Without Installer
This guide is far from exhaustive, you should expect to have some experience with building C++ code before considering compiling the code from scratch. You should instead consider using the installer scripts if you don't want to hack on the code directly.
### CMake
EQEmu uses CMake as the build system on all platforms. You will need CMake 3.2 or higher to build from source.
### Dependencies
The following libraries are required to build from source:
- [boost](https://www.boost.org/ "boost")
- [zlib](https://www.zlib.net/ "zlib") (If not included the source will build [zlib-ng](https://github.com/zlib-ng/zlib-ng "zlib-ng") instead)
- [libmysql](https://dev.mysql.com/downloads/connector/c/ "libmysql") or [libmariadb](https://github.com/MariaDB/mariadb-connector-c "libmariadb")
The following libraries are not strictly required but in many cased recommended.
- [OpenSSL](https://www.openssl.org/ "OpenSSL") or [mbedTLS](https://tls.mbed.org/ "mbedTLS") (Required for the loginserver and headless client)
- [libsodium](https://github.com/jedisct1/libsodium "libsodium") (Required for strong password hashing on the loginserver)
- [Lua 5.1](https://www.lua.org/ "Lua 5.1") or [LuaJit](http://luajit.org/ "LuaJit") (Required for Lua Quest Scripting)
- [Perl](https://www.perl.org/ "Perl") (Required for Perl Quest Scripting)
##### Windows
For windows it is suggested you make use of [vcpkg](https://github.com/microsoft/vcpkg "vcpkg") if you wish to build your own dependencies.
If you wish to use Perl then you should use whichever version of Perl you have installed on the target system.
You can also download a vcpkg export from our releases section for Visual Studio [x86](https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x86.zip "x86") or [x64](https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x64.zip "x64") that includes a toolchain file you can pass to CMake.
##### Linux
For Linux you simply can install the dependencies from your package manager, below is an example of doing it on Ubuntu using apt-get.
sudo apt-get install libmysqlclient-dev libperl-dev libboost-dev liblua5.1-0-dev zlib1g-dev uuid-dev libssl-dev
### Running CMake
##### Windows
The following is a modified command our automated build server uses to run CMake via the release vcpkg export and its toolchain file.
Assuming it is starting in c:/projects/eqemu and the x64 dependencies were extracted to c:/projects/eqemu/vcpkg.
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_ZLIB=ON -DEQEMU_ENABLE_BOTS=ON -DCMAKE_TOOLCHAIN_FILE="c:/projects/eqemu/vcpkg/vcpkg-export-20180828-145455/scripts/buildsystems/vcpkg.cmake" ..
##### Linux
Similarly to Windows running CMake on Linux is simple it just omits the toolchain file and uses a different generator.
mkdir build
cd build
cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON ..
### Building
##### Windows
Inside the build directory a file EQEmu.sln should be produced by a successful run of the CMake command. You can either open this with Visual Studio or build it directly with MSBuild via the command line.
msbuild EQEmu.sln /p:Configuration=Release
##### Linux
From the build directory you can simply call make to build.
For example.
make -j4
+366 -272
View File
@@ -1,124 +1,28 @@
#EQEmu CMake
#Variables used:
#EQEMU_DISABLE_CRT_SECURE_WARNINGS
#EQEMU_FAST_FLOATINGPOINT
#EQEMU_ENABLE_CRASH_LOGGING
#EQEMU_DISABLE_SAFESEH
#EQEMU_BUILD_MSVC_MP
#EQEMU_DEBUG_LEVEL
#EQEMU_LOG_LEVEL_STATUS
#EQEMU_LOG_LEVEL_NORMAL
#EQEMU_LOG_LEVEL_ERROR
#EQEMU_LOG_LEVEL_DEBUG
#EQEMU_LOG_LEVEL_QUEST
#EQEMU_LOG_LEVEL_COMMANDS
#EQEMU_LOG_LEVEL_CRASH
#EQEMU_STREAM_SEND_RATE
#EQEMU_STREAM_DECAY_RATE
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX
#EQEMU_STREAM_AVERAGE_DELTA_MAX
#EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS
#EQEMU_DEPOP_INVALIDATES_CACHE
#EQEMU_ENABLE_BOTS
#EQEMU_DISABLE_LOGSYS
#EQEMU_COMMANDS_LOGGING
#EQEMU_BUILD_SERVER
#EQEMU_BUILD_LOGIN
#EQEMU_BUILD_TESTS
#EQEMU_BUILD_PERL
#EQEMU_BUILD_LUA
#EQEMU_SANITIZE_LUA_LIBS
#EQEMU_BUILD_CLIENT_FILES
#EQEMU_MAP_DIR
CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
#Can change this if you really want but you should upgrade!
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#FindMySQL is located here so lets make it so CMake can find it
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
#Our project name is EQEmu
IF(POLICY CMP0074)
CMAKE_POLICY(SET CMP0074 NEW)
ENDIF()
PROJECT(EQEmu)
#Default build type is set to RelWithDebInfo for generators that honor that like makefiles
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
#Add our various windows definitions
IF(MSVC OR MINGW)
ADD_DEFINITIONS(-D_WINDOWS)
IF(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN64)
ELSE(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN32)
ENDIF(CMAKE_CL_64)
ENDIF(MSVC OR MINGW)
SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
IF(MSVC)
#Set our default locations for zlib/mysql based on x86/x64
IF(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64")
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64")
ELSE(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86")
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86")
ENDIF(CMAKE_CL_64)
#disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere
OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON)
IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
#fast FP if you'd like it
OPTION(EQEMU_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF(EQEMU_FAST_FLOATINGPOINT)
ADD_DEFINITIONS(/fp:fast)
ENDIF(EQEMU_FAST_FLOATINGPOINT)
#crash logging currently only works on windows x86/x64
OPTION(EQEMU_ENABLE_CRASH_LOGGING "Enable crash logging" ON)
IF(EQEMU_ENABLE_CRASH_LOGGING)
ADD_DEFINITIONS(-DCRASH_LOGGING)
ENDIF(EQEMU_ENABLE_CRASH_LOGGING)
#Disable safe SEH or not?
OPTION(EQEMU_DISABLE_SAFESEH "Disable Safe SEH (Needed for Strawberry Perl)" OFF)
IF(EQEMU_DISABLE_SAFESEH)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
ENDIF(EQEMU_DISABLE_SAFESEH)
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." ON)
IF(EQEMU_BUILD_MSVC_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(EQEMU_BUILD_MSVC_MP)
#We want to compile /MT not /MD so we change that
FOREACH(flag_var CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
IF(${flag_var} MATCHES "/MD")
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-DNOMINMAX)
ADD_DEFINITIONS(-DCRASH_LOGGING)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ELSE(MSVC)
#Normally set by perl but we don't use the perl flags anymore so we set it.
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
ENDIF(MSVC)
@@ -135,205 +39,390 @@ IF(UNIX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF(UNIX)
#debug level, 5 is default. Most people wont ever change this but it's there if you want to
SET(EQEMU_DEBUG_LEVEL 5 CACHE STRING "EQEmu debug level:
0 - Quiet mode Errors to file Status and Normal ignored
1 - Status and Normal to console, Errors to logfile
2 - Status, Normal, and Error to console and logfile
3 - Light debug release errors and status
4 - Moderate debug release errors and status
5 - Maximum debug release errors and status
10 - More errors than you ever wanted to see"
)
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
ADD_DEFINITIONS(-DGLM_FORCE_CTOR_INIT)
ADD_DEFINITIONS(-DGLM_ENABLE_EXPERIMENTAL)
SET(EQEMU_LOG_LEVEL_STATUS 2 CACHE STRING "EQEmu logging level for [Status]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
#MSVC can fetch dependencies automatically.
IF(MSVC)
INCLUDE("${CMAKE_SOURCE_DIR}/cmake/DependencyHelperMSVC.cmake")
ENDIF()
SET(EQEMU_LOG_LEVEL_NORMAL 3 CACHE STRING "EQEmu logging level for [Normal]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
#Find everything we need
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(MySQL)
FIND_PACKAGE(MariaDB)
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(Lua51)
FIND_PACKAGE(LuaJit)
FIND_PACKAGE(PerlLibs)
FIND_PACKAGE(Sodium)
FIND_PACKAGE(mbedTLS)
SET(EQEMU_LOG_LEVEL_ERROR 2 CACHE STRING "EQEmu logging level for [Error]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
MESSAGE(STATUS "**************************************************")
MESSAGE(STATUS "* Library Detection *")
MESSAGE(STATUS "**************************************************")
SET(EQEMU_LOG_LEVEL_DEBUG 3 CACHE STRING "EQEmu logging level for [Debug]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
IF(MYSQL_FOUND)
MESSAGE(STATUS "* MySQL: FOUND *")
ELSE()
MESSAGE(STATUS "* MySQL: MISSING *")
ENDIF()
SET(EQEMU_LOG_LEVEL_QUEST 2 CACHE STRING "EQEmu logging level for [Quest]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
IF(MARIADB_FOUND)
MESSAGE(STATUS "* MariaDB: FOUND *")
ELSE()
MESSAGE(STATUS "* MariaDB: MISSING *")
ENDIF()
SET(EQEMU_LOG_LEVEL_COMMANDS 1 CACHE STRING "EQEmu logging level for [Commands]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
IF(ZLIB_FOUND)
MESSAGE(STATUS "* ZLIB: FOUND *")
ELSE()
MESSAGE(STATUS "* ZLIB: MISSING *")
ENDIF()
SET(EQEMU_LOG_LEVEL_CRASH 3 CACHE STRING "EQEmu logging level for [Crash]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
IF(Lua51_FOUND)
MESSAGE(STATUS "* Lua: FOUND *")
ELSE()
MESSAGE(STATUS "* Lua: MISSING *")
ENDIF()
MARK_AS_ADVANCED(EQEMU_LOG_LEVEL_STATUS EQEMU_LOG_LEVEL_NORMAL EQEMU_LOG_LEVEL_ERROR EQEMU_LOG_LEVEL_DEBUG EQEMU_LOG_LEVEL_QUEST EQEMU_LOG_LEVEL_COMMANDS EQEMU_LOG_LEVEL_CRASH)
IF(LuaJit_FOUND)
MESSAGE(STATUS "* LuaJIT: FOUND *")
ELSE()
MESSAGE(STATUS "* LuaJIT: MISSING *")
ENDIF()
SET(EQEMU_STREAM_SEND_RATE 1048576 CACHE STRING "Advanced: Base amount of data stream can send before throttle.")
SET(EQEMU_STREAM_DECAY_RATE 78642 CACHE STRING "Advanced: Base amount of data stream recovers per tic.")
SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL 3.0 CACHE STRING "Advanced: Multiplier on retransmit timeout.")
SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX 5000 CACHE STRING "Advanced: Max in ms for retransmit timeout timer.")
SET(EQEMU_STREAM_AVERAGE_DELTA_MAX 2500 CACHE STRING "Advanced: The maximum average delta in ms allowed.")
SET(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS TRUE CACHE BOOL "Advanced: Whether or not acked packets can be retransmitted")
MARK_AS_ADVANCED(EQEMU_STREAM_SEND_RATE EQEMU_STREAM_DECAY_RATE EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX EQEMU_STREAM_AVERAGE_DELTA_MAX EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
IF(PerlLibs_FOUND)
MESSAGE(STATUS "* Perl: FOUND *")
ELSE()
MESSAGE(STATUS "* Perl: MISSING *")
ENDIF()
#NPC Types Cache Behavior
IF(SODIUM_FOUND)
MESSAGE(STATUS "* libsodium: FOUND *")
ELSE()
MESSAGE(STATUS "* libsodium: MISSING *")
ENDIF()
IF(OpenSSL_FOUND)
MESSAGE(STATUS "* OpenSSL: FOUND *")
ELSE()
MESSAGE(STATUS "* OpenSSL: MISSING *")
ENDIF()
IF(MBEDTLS_FOUND)
MESSAGE(STATUS "* mbedTLS: FOUND *")
ELSE()
MESSAGE(STATUS "* mbedTLS: MISSING *")
ENDIF()
MESSAGE(STATUS "**************************************************")
#options
OPTION(EQEMU_DEPOP_INVALIDATES_CACHE "#repop invalidates the npc_types cache (will cause a larger database hit on #repop but is more convienent)." ON)
#Bots are a compile time option so on/off
OPTION(EQEMU_ENABLE_BOTS "Enable Bots" OFF)
#Disable entire _mlog system (excludes trade/command logs)
OPTION(EQEMU_DISABLE_LOGSYS "Disable Logging INI System" ON)
#Enable GM Command log system
OPTION(EQEMU_COMMANDS_LOGGING "Enable GM Command logs" ON)
OPTION(EQEMU_BUILD_SERVER "Build the game server." ON)
OPTION(EQEMU_BUILD_LOGIN "Build the login server." ON)
OPTION(EQEMU_BUILD_HC "Build the headless client." OFF)
OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
OPTION(EQEMU_PREFER_LUA "Build with normal Lua even if LuaJIT is found." OFF)
#PRNG options
OPTION(EQEMU_ADDITIVE_LFIB_PRNG "Use Additive LFib for PRNG." OFF)
MARK_AS_ADVANCED(EQEMU_ADDITIVE_LFIB_PRNG)
OPTION(EQEMU_BIASED_INT_DIST "Use biased int dist instead of uniform." OFF)
MARK_AS_ADVANCED(EQEMU_BIASED_INT_DIST)
SET(EQEMU_CUSTOM_PRNG_ENGINE "" CACHE STRING "Custom random engine. (ex. std::default_random_engine)")
MARK_AS_ADVANCED(EQEMU_CUSTOM_PRNG_ENGINE)
IF(CMAKE_COMPILER_IS_GNUCXX)
OPTION(EQEMU_SFMT19937 "Use GCC's extention for SIMD Fast MT19937." OFF)
MARK_AS_ADVANCED(EQEMU_SFMT19937)
ENDIF()
IF(EQEMU_ADDITIVE_LFIB_PRNG)
ADD_DEFINITIONS(-DUSE_ADDITIVE_LFIB_PRNG)
IF(EQEMU_SFMT19937)
MESSAGE(STATUS "SFMT19937 and ADDITITVE_LFIB_PRNG both set, SFMT19937 ignored.")
SET(EQEMU_SFMT19937 OFF)
ENDIF()
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
MESSAGE(STATUS "CUSTOM_PRNG_ENGINE and ADDITITVE_LFIB_PRNG both set, CUSTOM_PRNG_ENGINE ignored.")
SET(EQEMU_CUSTOM_PRNG_ENGINE "")
ENDIF()
ENDIF()
IF(EQEMU_SFMT19937)
ADD_DEFINITIONS(-DUSE_SFMT19937)
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
MESSAGE(STATUS "CUSTOM_PRNG_ENGINE and SFMT19937 both set, CUSTOM_PRNG_ENGINE ignored.")
SET(EQEMU_CUSTOM_PRNG_ENGINE "")
ENDIF()
ENDIF()
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
ADD_DEFINITIONS(-DUSE_CUSTOM_PRNG_ENGINE=${EQEMU_CUSTOM_PRNG_ENGINE})
ENDIF()
IF(EQEMU_BIASED_INT_DIST)
ADD_DEFINITIONS(-DBIASED_INT_DIST)
ENDIF()
IF(EQEMU_COMMANDS_LOGGING)
ADD_DEFINITIONS(-DCOMMANDS_LOGGING)
ENDIF(EQEMU_COMMANDS_LOGGING)
IF(EQEMU_DISABLE_LOGSYS)
ADD_DEFINITIONS(-DDISABLE_LOGSYS)
ENDIF(EQEMU_DISABLE_LOGSYS)
IF(EQEMU_ENABLE_BOTS)
ADD_DEFINITIONS(-DBOTS)
ENDIF(EQEMU_ENABLE_BOTS)
#What to build
OPTION(EQEMU_BUILD_SERVER "Build the game server." ON)
OPTION(EQEMU_BUILD_LOGIN "Build the login server." OFF)
OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." ON)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
#C++11 stuff
IF(NOT MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal")
#database
IF(MySQL_FOUND AND MariaDB_FOUND)
SET(DATABASE_LIBRARY_SELECTION MariaDB CACHE STRING "Database library to use:
MySQL
MariaDB"
)
IF(DATABASE_LIBRARY_SELECTION STREQUAL "MySQL")
SET(DATABASE_LIBRARY_TYPE " MySQL")
SET(DATABASE_LIBRARY_LIBS ${MySQL_LIBRARIES})
SET(DATABASE_LIBRARY_INCLUDE ${MySQL_INCLUDE_DIR})
ELSEIF(DATABASE_LIBRARY_SELECTION STREQUAL "MariaDB")
SET(DATABASE_LIBRARY_TYPE "MariaDB")
SET(DATABASE_LIBRARY_LIBS ${MariaDB_LIBRARIES})
SET(DATABASE_LIBRARY_INCLUDE ${MariaDB_INCLUDE_DIR})
ELSE()
MESSAGE(FATAL_ERROR "Unknown database library set, should be one of: MySQL, MariaDB")
ENDIF()
ENDIF(NOT MSVC)
ELSEIF(MariaDB_FOUND)
SET(DATABASE_LIBRARY_TYPE "MariaDB")
SET(DATABASE_LIBRARY_LIBS ${MariaDB_LIBRARIES})
SET(DATABASE_LIBRARY_INCLUDE ${MariaDB_INCLUDE_DIR})
ELSEIF(MySQL_FOUND)
SET(DATABASE_LIBRARY_TYPE " MySQL")
SET(DATABASE_LIBRARY_LIBS ${MySQL_LIBRARIES})
SET(DATABASE_LIBRARY_INCLUDE ${MySQL_INCLUDE_DIR})
ELSE()
MESSAGE(FATAL_ERROR "One of MySQL or MariaDB is a required dependency.")
ENDIF()
#Various definitions
IF(EQEMU_BUILD_PERL)
ADD_DEFINITIONS(-DEMBPERL)
ADD_DEFINITIONS(-DEMBPERL_PLUGIN)
ENDIF(EQEMU_BUILD_PERL)
IF(EQEMU_BUILD_LUA)
ADD_DEFINITIONS(-DLUA_EQEMU)
ENDIF(EQEMU_BUILD_LUA)
#security
#prefer openssl to mbedtls (arbitrary)
IF(OpenSSL_FOUND AND MBEDTLS_FOUND)
SET(TLS_LIBRARY_SELECTION OpenSSL CACHE STRING "TLS library to use:
OpenSSL
mbedTLS"
)
IF(TLS_LIBRARY_SELECTION STREQUAL "OpenSSL")
SET(TLS_LIBRARY_TYPE " OpenSSL")
SET(TLS_LIBRARY_ENABLED ON)
SET(TLS_LIBRARY_LIBS ${OPENSSL_LIBRARIES})
SET(TLS_LIBRARY_INCLUDE ${OPENSSL_INCLUDE_DIR})
ADD_DEFINITIONS(-DEQEMU_USE_OPENSSL)
IF(${OPENSSL_VERSION} VERSION_GREATER_EQUAL "1.1.1")
ADD_DEFINITIONS(-DCPPHTTPLIB_OPENSSL_SUPPORT)
ENDIF()
ELSEIF(TLS_LIBRARY_SELECTION STREQUAL "mbedTLS")
SET(TLS_LIBRARY_TYPE " mbedTLS")
SET(TLS_LIBRARY_ENABLED ON)
SET(TLS_LIBRARY_LIBS ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
SET(TLS_LIBRARY_INCLUDE ${MBEDTLS_INCLUDE_DIR})
ADD_DEFINITIONS(-DEQEMU_USE_MBEDTLS)
ELSE()
MESSAGE(FATAL_ERROR "Unknown TLS library set, should be one of: OpenSSL, mbedTLS")
ENDIF()
ELSEIF(OpenSSL_FOUND)
SET(TLS_LIBRARY_TYPE " OpenSSL")
SET(TLS_LIBRARY_ENABLED ON)
SET(TLS_LIBRARY_LIBS ${OPENSSL_LIBRARIES})
SET(TLS_LIBRARY_INCLUDE ${OPENSSL_INCLUDE_DIR})
ADD_DEFINITIONS(-DEQEMU_USE_OPENSSL)
IF(${OPENSSL_VERSION} VERSION_GREATER_EQUAL "1.1.1")
ADD_DEFINITIONS(-DCPPHTTPLIB_OPENSSL_SUPPORT)
ENDIF()
ELSEIF(MBEDTLS_FOUND)
SET(TLS_LIBRARY_TYPE " mbedTLS")
SET(TLS_LIBRARY_ENABLED ON)
SET(TLS_LIBRARY_LIBS ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
SET(TLS_LIBRARY_INCLUDE ${MBEDTLS_INCLUDE_DIR})
ADD_DEFINITIONS(-DEQEMU_USE_MBEDTLS)
ELSE()
SET(TLS_LIBRARY_TYPE "Disabled")
SET(TLS_LIBRARY_ENABLED OFF)
ENDIF()
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
IF(SODIUM_FOUND)
SET(SODIUM_LIBRARY_TYPE "Libsodium")
SET(SODIUM_LIBRARY_ENABLED ON)
SET(SODIUM_LIBRARY_LIBS ${SODIUM_LIBRARIES})
SET(SODIUM_LIBRARY_INCLUDE ${SODIUM_INCLUDE_DIRS})
ADD_DEFINITIONS(-DENABLE_SECURITY)
ELSE()
SET(SODIUM_LIBRARY_TYPE " Disabled")
SET(SODIUM_LIBRARY_ENABLED OFF)
ENDIF()
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
ADD_DEFINITIONS(-DINVERSEXY)
ADD_DEFINITIONS(-DFIELD_ITEMS)
ADD_DEFINITIONS(-DMAP_DIR="${EQEMU_MAP_DIR}")
ADD_DEFINITIONS(-DRATEBASE=${EQEMU_STREAM_SEND_RATE})
ADD_DEFINITIONS(-DDECAYBASE=${EQEMU_STREAM_DECAY_RATE})
ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MULT=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL})
ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MAX=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX})
ADD_DEFINITIONS(-DAVERAGE_DELTA_MAX=${EQEMU_STREAM_AVERAGE_DELTA_MAX})
ADD_DEFINITIONS(-DLOG_LEVEL_STATUS=${EQEMU_LOG_LEVEL_STATUS})
ADD_DEFINITIONS(-DLOG_LEVEL_NORMAL=${EQEMU_LOG_LEVEL_NORMAL})
ADD_DEFINITIONS(-DLOG_LEVEL_ERROR=${EQEMU_LOG_LEVEL_ERROR})
ADD_DEFINITIONS(-DLOG_LEVEL_DEBUG=${EQEMU_LOG_LEVEL_DEBUG})
ADD_DEFINITIONS(-DLOG_LEVEL_QUEST=${EQEMU_LOG_LEVEL_QUEST})
ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS})
ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH})
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
IF(LUAJIT_FOUND AND NOT (EQEMU_PREFER_LUA AND Lua51_FOUND))
SET(LUA_LIBRARY_TYPE " LuaJIT")
SET(LUA_LIBRARY_ENABLED ON)
SET(LUA_LIBRARY_LIBS ${LUAJIT_LIBRARY} luabind)
SET(LUA_LIBRARY_INCLUDE ${LUAJIT_INCLUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/libs/luabind")
ELSEIF(Lua51_FOUND )
SET(LUA_LIBRARY_TYPE " Lua 5.1")
SET(LUA_LIBRARY_ENABLED ON)
SET(LUA_LIBRARY_LIBS ${LUA_LIBRARY} luabind)
SET(LUA_LIBRARY_INCLUDE ${LUA_INCLUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/libs/luabind")
ELSE()
SET(LUA_LIBRARY_TYPE "Disabled")
SET(LUA_LIBRARY_ENABLED OFF)
ENDIF()
IF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=true)
ELSE(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=false)
ENDIF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
IF(PerlLibs_FOUND)
SET(PERL_LIBRARY_TYPE " Perl")
SET(PERL_LIBRARY_ENABLED ON)
SET(PERL_LIBRARY_LIBS ${PERL_LIBRARY})
SET(PERL_LIBRARY_INCLUDE ${PERL_INCLUDE_PATH})
ELSE()
SET(PERL_LIBRARY_TYPE "Disabled")
SET(PERL_LIBRARY_ENABLED OFF)
ENDIF()
#Find everything we need
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(MySQL REQUIRED)
IF(EQEMU_BUILD_PERL)
FIND_PACKAGE(PerlLibs REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}")
ENDIF(EQEMU_BUILD_PERL)
#use zlib if exists
IF(ZLIB_FOUND)
OPTION(EQEMU_BUILD_ZLIB "Build internal version of zlib." ON)
IF(EQEMU_BUILD_ZLIB)
SET(ZLIB_LIBRARY_TYPE "zlib-ng")
SET(ZLIB_LIBRARY_LIBS "zlibstatic")
SET(ZLIB_LIBRARY_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libs/zlibng")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_BINARY_DIR}/libs/zlibng")
ELSE()
SET(ZLIB_LIBRARY_TYPE " zlib")
SET(ZLIB_LIBRARY_LIBS ${ZLIB_LIBRARY})
SET(ZLIB_LIBRARY_INCLUDE ${ZLIB_INCLUDE_DIRS})
ENDIF()
ELSE()
SET(ZLIB_LIBRARY_TYPE "zlib-ng")
SET(ZLIB_LIBRARY_LIBS "zlibstatic")
SET(ZLIB_LIBRARY_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libs/zlibng")
ENDIF()
IF(EQEMU_BUILD_LUA)
FIND_PACKAGE(EQLua51 REQUIRED)
SET(Boost_USE_STATIC_LIBS OFF)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost")
MESSAGE(STATUS "")
MESSAGE(STATUS "**************************************************")
MESSAGE(STATUS "* Library Usage *")
MESSAGE(STATUS "**************************************************")
MESSAGE(STATUS "* Database: ${DATABASE_LIBRARY_TYPE} *")
MESSAGE(STATUS "* TLS: ${TLS_LIBRARY_TYPE} *")
MESSAGE(STATUS "* Sodium: ${SODIUM_LIBRARY_TYPE} *")
MESSAGE(STATUS "* Lua: ${LUA_LIBRARY_TYPE} *")
MESSAGE(STATUS "* Perl: ${PERL_LIBRARY_TYPE} *")
MESSAGE(STATUS "* zlib: ${ZLIB_LIBRARY_TYPE} *")
MESSAGE(STATUS "**************************************************")
FIND_PACKAGE(Boost REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
#setup server libs and headers
SET(SERVER_LIBS common ${DATABASE_LIBRARY_LIBS} ${ZLIB_LIBRARY_LIBS} ${Boost_LIBRARIES} uv_a fmt RecastNavigation::Detour)
OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON)
IF(EQEMU_SANITIZE_LUA_LIBS)
ADD_DEFINITIONS(-DSANITIZE_LUA_LIBS)
ENDIF(EQEMU_SANITIZE_LUA_LIBS)
ENDIF(EQEMU_BUILD_LUA)
INCLUDE_DIRECTORIES(SYSTEM "${DATABASE_LIBRARY_INCLUDE}")
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_LIBRARY_INCLUDE}")
INCLUDE_DIRECTORIES(SYSTEM "${Boost_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/glm")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/cereal/include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/fmt/include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/libuv/include" )
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/recastnavigation/DebugUtils/Include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/recastnavigation/Detour/Include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/recastnavigation/DetourCrowd/Include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/recastnavigation/DetourTileCache/Include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/recastnavigation/Recast/Include")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/submodules/websocketpp")
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm")
OPTION(EQEMU_BUILD_LOGGING "Build Logging (To speed up compilation)" ON)
IF(EQEMU_BUILD_LOGGING)
ADD_DEFINITIONS(-DBUILD_LOGGING)
ENDIF()
IF(EQEMU_BUILD_LUA)
ADD_SUBDIRECTORY(luabind)
ENDIF(EQEMU_BUILD_LUA)
IF(TLS_LIBRARY_ENABLED)
SET(SERVER_LIBS ${SERVER_LIBS} ${TLS_LIBRARY_LIBS})
INCLUDE_DIRECTORIES(SYSTEM "${TLS_LIBRARY_INCLUDE}")
ENDIF()
IF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
IF(SODIUM_LIBRARY_ENABLED)
SET(SERVER_LIBS ${SERVER_LIBS} ${SODIUM_LIBRARY_LIBS})
INCLUDE_DIRECTORIES(SYSTEM "${SODIUM_LIBRARY_INCLUDE}")
ENDIF()
IF(LUA_LIBRARY_ENABLED)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." ON)
IF(EQEMU_BUILD_LUA)
ADD_DEFINITIONS(-DLUA_EQEMU)
SET(ZONE_LIBS ${LUA_LIBRARY_LIBS})
INCLUDE_DIRECTORIES(SYSTEM "${LUA_LIBRARY_INCLUDE}")
OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON)
IF(EQEMU_SANITIZE_LUA_LIBS)
ADD_DEFINITIONS(-DSANITIZE_LUA_LIBS)
ENDIF()
ENDIF()
ENDIF()
IF(PERL_LIBRARY_ENABLED)
OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON)
IF(EQEMU_BUILD_PERL)
SET(SERVER_LIBS ${SERVER_LIBS} ${PERL_LIBRARY_LIBS})
INCLUDE_DIRECTORIES(SYSTEM "${PERL_LIBRARY_INCLUDE}")
ADD_DEFINITIONS(-DEMBPERL)
ADD_DEFINITIONS(-DEMBPERL_PLUGIN)
ENDIF()
ENDIF()
IF(WIN32)
SET(SERVER_LIBS ${SERVER_LIBS} "ws2_32" "psapi" "iphlpapi" "userenv")
ENDIF()
IF(UNIX)
SET(SERVER_LIBS ${SERVER_LIBS} ${CMAKE_DL_LIBS} "z" "m" "pthread")
IF(NOT DARWIN)
SET(SERVER_LIBS ${SERVER_LIBS} "rt")
ENDIF()
# Freebsd provides uuids in the C library
IF(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
SET(SERVER_LIBS ${SERVER_LIBS} "uuid")
ENDIF()
ENDIF()
SET(ZONE_LIBS ${ZONE_LIBS} ${SERVER_LIBS})
IF(EQEMU_BUILD_LOGIN AND NOT TLS_LIBRARY_ENABLED)
MESSAGE(FATAL_ERROR "Login server requires a TLS Library to build.")
ENDIF()
IF(EQEMU_BUILD_HC AND NOT TLS_LIBRARY_ENABLED)
MESSAGE(FATAL_ERROR "Headless client requires a TLS Library to build.")
ENDIF()
IF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS OR EQEMU_BUILD_HC)
ADD_SUBDIRECTORY(common)
ENDIF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(libs)
ADD_SUBDIRECTORY(submodules/fmt)
ADD_SUBDIRECTORY(submodules/libuv)
IF(EQEMU_BUILD_ZLIB)
SET(ZLIB_COMPAT ON CACHE BOOL "Compile with zlib compatible API")
SET(ZLIB_ENABLE_TESTS OFF CACHE BOOL "Build test binaries")
ADD_SUBDIRECTORY(libs/zlibng)
ENDIF()
SET(RECASTNAVIGATION_DEMO OFF CACHE BOOL "Build demo")
SET(RECASTNAVIGATION_TESTS OFF CACHE BOOL "Build tests")
SET(RECASTNAVIGATION_EXAMPLES OFF CACHE BOOL "Build examples")
ADD_SUBDIRECTORY(submodules/recastnavigation)
ENDIF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS OR EQEMU_BUILD_HC)
IF(EQEMU_BUILD_SERVER)
ADD_SUBDIRECTORY(shared_memory)
ADD_SUBDIRECTORY(world)
@@ -342,10 +431,15 @@ IF(EQEMU_BUILD_SERVER)
ADD_SUBDIRECTORY(queryserv)
ADD_SUBDIRECTORY(eqlaunch)
ENDIF(EQEMU_BUILD_SERVER)
IF(EQEMU_BUILD_LOGIN)
ADD_SUBDIRECTORY(loginserver)
ENDIF(EQEMU_BUILD_LOGIN)
IF(EQEMU_BUILD_HC)
ADD_SUBDIRECTORY(hc)
ENDIF(EQEMU_BUILD_HC)
IF(EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF(EQEMU_BUILD_TESTS)
+22
View File
@@ -0,0 +1,22 @@
We expect contributors and community members to act professionally and respectfully, and we expect our forums and Discord channels to be dignified environments that expand the community and enhance the learning experience for new members.
Specifically:
* Respect people, their ideas, and their work.
* Be kind. Be courteous. Be welcoming.
* Listen. Consider and acknowledge people's points before responding.
* Be respectful of differing viewpoints and experience levels.
* Accept constructive criticism and work together toward decisions.
* Focus on what is best for the community and users.
Examples of unacceptable behavior by participants include:
* The use of violent threats, trolling, insulting/derogatory comments, abusive or discriminatory language, or personal attacks.
* Public or private harassment.
* Publishing others' private information, such as a physical or electronic address, without explicit permission.
* Conduct which could reasonably be considered inappropriate in a professional setting.
* Advocating for or encouraging any of the above behaviors.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, forum posts, Discord messages, and other contributions that are not aligned with this code of conduct.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project.
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
-12
View File
@@ -1,12 +0,0 @@
The server code and utilities are released under GPLv3.
We also include some small libraries for convienence that may be under different licensing:
SocketLib - GPL
LibXML - ZLib License
StackWalker - New BSD License
ZLib - ZLib License
MySQL - GPL
Perl - GPL / ActiveState (under the assumption that this is a free project).
CPPUnit - GLP
StringUtilities - Apache
+62 -32
View File
@@ -1,53 +1,83 @@
EQEmu
===
# EQEmulator Core Server
|Travis CI (Linux)|Appveyor (Windows x86) |Appveyor (Windows x64) |
|:---:|:---:|:---:|
|[![Linux CI](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server) |[![Build status](https://ci.appveyor.com/api/projects/status/v3utuu0dttm2cqd0?svg=true)](https://ci.appveyor.com/project/KimLS/server) |[![Build status](https://ci.appveyor.com/api/projects/status/scr25kmntx36c1ub?svg=true)](https://ci.appveyor.com/project/KimLS/server-87crp) |
[![Build Status](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server)
***
Overview
---
**EQEmulator is a custom completely from-scratch open source server implementation for EverQuest built mostly on C++**
* MySQL/MariaDB is used as the database engine (over 200+ tables)
* Perl and LUA are both supported scripting languages for NPC/Player/Quest oriented events
* Open source database (Project EQ) has content up to expansion OoW (included in server installs)
* Game server environments and databases can be heavily customized to create all new experiences
* Hundreds of Quests/events created and maintained by Project EQ
EQEmu is a custom server implementation for EverQuest
## Server Installs
| |Windows|Linux|
|:---:|:---:|:---:|
|**Install Count**|![Windows Install Count](http://analytics.akkadius.com/?install_count&windows_count)|![Linux Install Count](http://analytics.akkadius.com/?install_count&linux_count)|
### > Windows
Dependencies
---
* [Install Guide](https://eqemu.gitbook.io/server/categories/installation/server-installation-windows)
For Windows: http://eqemu.github.io
### > Debian/Ubuntu/CentOS/Fedora
Login Server dependencies for Windows/Linux/OSX: http://eqemu.github.io
* [Install Guide](https://eqemu.gitbook.io/server/categories/installation/server-installation-linux)
For Debian based distros (adjust to your local flavor):
* You can use curl or wget to kick off the installer (whichever your OS has)
> curl -O https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh install.sh && chmod 755 install.sh && ./install.sh
- libmysqlclient-dev
- libperl-dev
- liblua5.1-0-dev (5.2 should work as well)
- libboost-dev
> wget --no-check-certificate https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh -O install.sh && chmod 755 install.sh && ./install.sh
Further instructions on building the source can be found on the
[wiki](http://wiki.eqemulator.org/i?M=Wiki).
## Supported Clients
Bug reports
---
|Titanium Edition|Secrets of Faydwer|Seeds of Destruction|Underfoot|Rain of Fear|
|:---:|:---:|:---:|:---:|:---:|
|<img src="http://i.imgur.com/hrwDxoM.jpg" height="150">|<img src="http://i.imgur.com/cRDW5tn.png" height="150">|<img src="http://i.imgur.com/V48kuVn.jpg" height="150">|<img src="http://i.imgur.com/IJQ0XMa.jpg" height="150">|<img src="http://i.imgur.com/OMpHkKa.png" height="100">|
Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
## Bug Reports <img src="http://i.imgur.com/daf1Vjw.png" height="20">
* Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
reports or feature requests.
* The [EQEmu Forums](http://www.eqemulator.org/forums/) are also a place to submit and get help with bugs.
The [EQEmu Forums](http://www.eqemulator.org/forums/) also have forums to submit
bugs/get help with bugs.
## Contributions <img src="http://image.flaticon.com/icons/png/512/25/25231.png" width="20">
Contributions
---
The preferred way to contribute is to fork the repo and submit a pull request on
* The preferred way to contribute is to fork the repo and submit a pull request on
GitHub. If you need help with your changes, you can always post on the forums or
try IRC. You can also post unified diffs (`git diff` should do the trick) on the
try Discord. You can also post unified diffs (`git diff` should do the trick) on the
[Server Code Submissions](http://www.eqemulator.org/forums/forumdisplay.php?f=669)
forum, although pull requests will be much quicker and easier on all parties.
Contact
---
- **User IRC Channel**: `#eqemu` on `irc.eqemulator.net`
- **Developer IRC Channel**: `#eqemucoders` on `irc.eqemulator.net`
## Contact <img src="http://gamerescape.com/wp-content/uploads/2015/06/discord.png" height="20">
- Discord Channel: https://discord.gg/QHsm7CD
- **User Discord Channel**: `#general`
- **Developer Discord Channel**: `#eqemucoders`
## Resources
- [EQEmulator Forums](http://www.eqemulator.org/forums)
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
- [EQEmulator Wiki](https://eqemu.gitbook.io/)
## Related Repositories
* [ProjectEQ Quests](https://github.com/ProjectEQ/projecteqquests)
* [Maps](https://github.com/Akkadius/EQEmuMaps)
* [Installer Resources](https://github.com/Akkadius/EQEmuInstall)
* [Zone Utilities](https://github.com/EQEmu/zone-utilities) - Various utilities and libraries for parsing, rendering and manipulating EQ Zone files.
## Other License Info
* The server code and utilities are released under **GPLv3**
* We also include some small libraries for convienence that may be under different licensing
* SocketLib - GPL LibXML
* zlib - zlib license
* MariaDB/MySQL - GPL
* GPL Perl - GPL / ActiveState (under the assumption that this is a free project)
* CPPUnit - GLP StringUtilities - Apache
* LUA - MIT
## Contributors
<a href="https://github.com/EQEmu/server/graphs/contributors">
<img src="https://contributors-img.firebaseapp.com/image?repo=EQEmu/server" />
</a>
+3
View File
@@ -0,0 +1,3 @@
# Security Policy - Reporting Vulnerabilities
When reporting active hacks, exploits and other vulnerabilities, please describe how to reproduce said report and if you can provide context into a possible solution
+21
View File
@@ -0,0 +1,21 @@
version: 1.0.{build}
branches:
only:
- master
image: Visual Studio 2017
configuration: RelWithDebInfo
clone_folder: c:\projects\eqemu
init:
- ps: git config --global core.autocrlf input
cache: c:\tools\vcpkg\installed\
before_build:
- ps: "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip\", \"c:\\projects\\eqemu\\strawberry-perl-5.26.2.1-64bit-portable.zip\")\ncd c:\\projects\\eqemu\n7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y\n(Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h\nvcpkg install boost-geometry:x64-windows boost-dynamic-bitset:x64-windows luajit:x64-windows libsodium:x64-windows libmysql:x64-windows openssl:x64-windows zlib:x64-windows \nmkdir build\ncd build\ncmake -G \"Visual Studio 15 2017 Win64\" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=ON -DPERL_EXECUTABLE=\"C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe\" -DPERL_INCLUDE_PATH=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE\" -DPERL_LIBRARY=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a\" -DCMAKE_TOOLCHAIN_FILE=\"c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake\" .."
build:
project: C:\projects\eqemu\build\EQEmu.sln
parallel: true
verbosity: minimal
after_build:
- cmd: >-
7z a build_x64-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb C:\projects\eqemu\build\libs\zlibng\RelWithDebInfo\*.dll
appveyor PushArtifact build_x64-bots.zip
+21
View File
@@ -0,0 +1,21 @@
version: 1.0.{build}
branches:
only:
- master
image: Visual Studio 2017
configuration: RelWithDebInfo
clone_folder: c:\projects\eqemu
init:
- ps: git config --global core.autocrlf input
cache: c:\tools\vcpkg\installed\
before_build:
- ps: "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip\", \"c:\\projects\\eqemu\\strawberry-perl-5.26.2.1-64bit-portable.zip\")\ncd c:\\projects\\eqemu\n7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y\n(Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h\nvcpkg install boost-geometry:x64-windows boost-dynamic-bitset:x64-windows luajit:x64-windows libsodium:x64-windows libmysql:x64-windows openssl:x64-windows zlib:x64-windows \nmkdir build\ncd build\ncmake -G \"Visual Studio 15 2017 Win64\" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=OFF -DPERL_EXECUTABLE=\"C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe\" -DPERL_INCLUDE_PATH=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE\" -DPERL_LIBRARY=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a\" -DCMAKE_TOOLCHAIN_FILE=\"c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake\" .."
build:
project: C:\projects\eqemu\build\EQEmu.sln
parallel: true
verbosity: minimal
after_build:
- cmd: >-
7z a build_x64-no-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb C:\projects\eqemu\build\libs\zlibng\RelWithDebInfo\*.dll
appveyor PushArtifact build_x64-no-bots.zip
+1980 -608
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
add_subdirectory(import)
add_subdirectory(export)
+3 -23
View File
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
SET(export_sources
main.cpp
@@ -9,28 +9,8 @@ SET(export_headers
ADD_EXECUTABLE(export_client_files ${export_sources} ${export_headers})
INSTALL(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
TARGET_LINK_LIBRARIES(export_client_files common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(export_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(export_client_files "Ws2_32.lib")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(export_client_files "WS2_32")
ENDIF(MINGW)
IF(UNIX)
TARGET_LINK_LIBRARIES(export_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(export_client_files "z")
TARGET_LINK_LIBRARIES(export_client_files "m")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
TARGET_LINK_LIBRARIES(export_client_files ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+158 -92
View File
@@ -26,137 +26,199 @@
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/string_util.h"
#include "../../common/content/world_content_service.h"
EQEmuLogSys Log;
EQEmuLogSys LogSys;
WorldContentService content_service;
void ExportSpells(SharedDatabase *db);
void ExportSkillCaps(SharedDatabase *db);
void ExportBaseData(SharedDatabase *db);
void ExportDBStrings(SharedDatabase *db);
int main(int argc, char **argv) {
int main(int argc, char **argv)
{
RegisterExecutablePlatform(ExePlatformClientExport);
Log.LoadLogSettingsDefaults();
LogSys.LoadLogSettingsDefaults();
set_exception_handler();
Log.Out(Logs::General, Logs::Status, "Client Files Export Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
LogInfo("Client Files Export Utility");
if (!EQEmuConfig::LoadConfig()) {
LogError("Unable to load configuration file");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
auto Config = EQEmuConfig::get();
SharedDatabase database;
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
SharedDatabase content_db;
LogInfo("Connecting to database");
if (!database.Connect(
Config->DatabaseHost.c_str(),
Config->DatabaseUsername.c_str(),
Config->DatabasePassword.c_str(),
Config->DatabaseDB.c_str(),
Config->DatabasePort
)) {
LogError("Unable to connect to the database, cannot continue without a database connection");
return 1;
}
/* Register Log System and Settings */
database.LoadLogSettings(Log.log_settings);
Log.StartFileLogs();
/**
* Multi-tenancy: Content database
*/
if (!Config->ContentDbHost.empty()) {
if (!content_db.Connect(
Config->ContentDbHost.c_str() ,
Config->ContentDbUsername.c_str(),
Config->ContentDbPassword.c_str(),
Config->ContentDbName.c_str(),
Config->ContentDbPort
)) {
LogError("Cannot continue without a content database connection");
return 1;
}
} else {
content_db.SetMysql(database.getMySQL());
}
ExportSpells(&database);
ExportSkillCaps(&database);
ExportBaseData(&database);
LogSys.SetDatabase(&database)
->LoadLogDatabaseSettings()
->StartFileLogs();
std::string arg_1;
if (argv[1]) {
arg_1 = argv[1];
}
if (arg_1 == "spells") {
ExportSpells(&content_db);
return 0;
}
if (arg_1 == "skills") {
ExportSkillCaps(&content_db);
return 0;
}
if (arg_1 == "basedata") {
ExportBaseData(&content_db);
return 0;
}
if (arg_1 == "dbstring") {
ExportDBStrings(&database);
return 0;
}
ExportSpells(&content_db);
ExportSkillCaps(&content_db);
ExportBaseData(&content_db);
ExportDBStrings(&database);
Log.CloseFileLogs();
LogSys.CloseFileLogs();
return 0;
}
void ExportSpells(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting Spells...");
void ExportSpells(SharedDatabase *db)
{
LogInfo("Exporting Spells");
FILE *f = fopen("export/spells_us.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/spells_us.txt to write, skipping.");
if (!f) {
LogError("Unable to open export/spells_us.txt to write, skipping.");
return;
}
const std::string query = "SELECT * FROM spells_new ORDER BY id";
auto results = db->QueryDatabase(query);
const std::string query = "SELECT * FROM spells_new ORDER BY id";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
if (results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for (unsigned int i = 0; i < fields; ++i) {
if (i != 0) {
line.push_back('^');
}
if(row[i] != nullptr) {
if (row[i] != nullptr) {
line += row[i];
}
}
fprintf(f, "%s\n", line.c_str());
}
} else {
}
else {
}
fclose(f);
}
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id)
{
bool res = false;
std::string query = StringFormat("SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id);
auto results = db->QueryDatabase(query);
if(!results.Success()) {
return false;
}
std::string query = StringFormat(
"SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id
);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
return false;
}
if (results.RowCount() == 0)
return false;
if (results.RowCount() == 0) {
return false;
}
auto row = results.begin();
if(row[0] && atoi(row[0]) > 0)
return true;
auto row = results.begin();
if (row[0] && atoi(row[0]) > 0) {
return true;
}
return false;
return false;
}
int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level) {
int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level)
{
std::string query = StringFormat("SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
return 0;
}
std::string query = StringFormat(
"SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level
);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
return 0;
}
if (results.RowCount() == 0)
return 0;
if (results.RowCount() == 0) {
return 0;
}
auto row = results.begin();
auto row = results.begin();
return atoi(row[0]);
}
void ExportSkillCaps(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting Skill Caps...");
void ExportSkillCaps(SharedDatabase *db)
{
LogInfo("Exporting Skill Caps");
FILE *f = fopen("export/SkillCaps.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
if (!f) {
LogError("Unable to open export/SkillCaps.txt to write, skipping.");
return;
}
for(int cl = 1; cl <= 16; ++cl) {
for(int skill = 0; skill <= 77; ++skill) {
if(SkillUsable(db, skill, cl)) {
int previous_cap = 0;
for(int level = 1; level <= 100; ++level) {
for (int cl = 1; cl <= 16; ++cl) {
for (int skill = 0; skill <= 77; ++skill) {
if (SkillUsable(db, skill, cl)) {
int previous_cap = 0;
for (int level = 1; level <= 100; ++level) {
int cap = GetSkill(db, skill, cl, level);
if(cap < previous_cap) {
if (cap < previous_cap) {
cap = previous_cap;
}
@@ -170,26 +232,28 @@ void ExportSkillCaps(SharedDatabase *db) {
fclose(f);
}
void ExportBaseData(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting Base Data...");
void ExportBaseData(SharedDatabase *db)
{
LogInfo("Exporting Base Data");
FILE *f = fopen("export/BaseData.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/BaseData.txt to write, skipping.");
if (!f) {
LogError("Unable to open export/BaseData.txt to write, skipping.");
return;
}
const std::string query = "SELECT * FROM base_data ORDER BY level, class";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin();row != results.end();++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
const std::string query = "SELECT * FROM base_data ORDER BY level, class";
auto results = db->QueryDatabase(query);
if (results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for (unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if (rowIndex != 0) {
line.push_back('^');
}
if(row[rowIndex] != nullptr) {
if (row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
@@ -201,27 +265,29 @@ void ExportBaseData(SharedDatabase *db) {
fclose(f);
}
void ExportDBStrings(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting DB Strings...");
void ExportDBStrings(SharedDatabase *db)
{
LogInfo("Exporting DB Strings");
FILE *f = fopen("export/dbstr_us.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/dbstr_us.txt to write, skipping.");
if (!f) {
LogError("Unable to open export/dbstr_us.txt to write, skipping.");
return;
}
fprintf(f, "Major^Minor^String(New)\n");
const std::string query = "SELECT * FROM db_str ORDER BY id, type";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for(auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
const std::string query = "SELECT * FROM db_str ORDER BY id, type";
auto results = db->QueryDatabase(query);
if (results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for (unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if (rowIndex != 0) {
line.push_back('^');
}
if(row[rowIndex] != nullptr) {
if (row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
+3 -23
View File
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
SET(import_sources
main.cpp
@@ -9,28 +9,8 @@ SET(import_headers
ADD_EXECUTABLE(import_client_files ${import_sources} ${import_headers})
INSTALL(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
TARGET_LINK_LIBRARIES(import_client_files common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(import_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(import_client_files "Ws2_32.lib")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(import_client_files "WS2_32")
ENDIF(MINGW)
IF(UNIX)
TARGET_LINK_LIBRARIES(import_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(import_client_files "z")
TARGET_LINK_LIBRARIES(import_client_files "m")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
TARGET_LINK_LIBRARIES(import_client_files ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+56 -29
View File
@@ -24,8 +24,10 @@
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/string_util.h"
#include "../../common/content/world_content_service.h"
EQEmuLogSys Log;
EQEmuLogSys LogSys;
WorldContentService content_service;
void ImportSpells(SharedDatabase *db);
void ImportSkillCaps(SharedDatabase *db);
@@ -34,36 +36,61 @@ void ImportDBStrings(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientImport);
Log.LoadLogSettingsDefaults();
LogSys.LoadLogSettingsDefaults();
set_exception_handler();
Log.Out(Logs::General, Logs::Status, "Client Files Import Utility");
LogInfo("Client Files Import Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
LogError("Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
auto Config = EQEmuConfig::get();
SharedDatabase database;
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
SharedDatabase content_db;
LogInfo("Connecting to database");
if (!database.Connect(
Config->DatabaseHost.c_str(),
Config->DatabaseUsername.c_str(),
Config->DatabasePassword.c_str(),
Config->DatabaseDB.c_str(),
Config->DatabasePort
)) {
LogError("Unable to connect to the database, cannot continue without a database connection");
return 1;
}
database.LoadLogSettings(Log.log_settings);
Log.StartFileLogs();
/**
* Multi-tenancy: Content database
*/
if (!Config->ContentDbHost.empty()) {
if (!content_db.Connect(
Config->ContentDbHost.c_str() ,
Config->ContentDbUsername.c_str(),
Config->ContentDbPassword.c_str(),
Config->ContentDbName.c_str(),
Config->ContentDbPort
)) {
LogError("Cannot continue without a content database connection");
return 1;
}
} else {
content_db.SetMysql(database.getMySQL());
}
ImportSpells(&database);
ImportSkillCaps(&database);
ImportBaseData(&database);
LogSys.SetDatabase(&database)
->LoadLogDatabaseSettings()
->StartFileLogs();
ImportSpells(&content_db);
ImportSkillCaps(&content_db);
ImportBaseData(&content_db);
ImportDBStrings(&database);
Log.CloseFileLogs();
LogSys.CloseFileLogs();
return 0;
}
@@ -97,10 +124,10 @@ bool IsStringField(int i) {
}
void ImportSpells(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing Spells...");
LogInfo("Importing Spells");
FILE *f = fopen("import/spells_us.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/spells_us.txt to read, skipping.");
LogError("Unable to open import/spells_us.txt to read, skipping.");
return;
}
@@ -173,23 +200,23 @@ void ImportSpells(SharedDatabase *db) {
spells_imported++;
if(spells_imported % 1000 == 0) {
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
LogInfo("[{}] spells imported", spells_imported);
}
}
if(spells_imported % 1000 != 0) {
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
LogInfo("[{}] spells imported", spells_imported);
}
fclose(f);
}
void ImportSkillCaps(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing Skill Caps...");
LogInfo("Importing Skill Caps");
FILE *f = fopen("import/SkillCaps.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/SkillCaps.txt to read, skipping.");
LogError("Unable to open import/SkillCaps.txt to read, skipping.");
return;
}
@@ -220,11 +247,11 @@ void ImportSkillCaps(SharedDatabase *db) {
}
void ImportBaseData(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing Base Data...");
LogInfo("Importing Base Data");
FILE *f = fopen("import/BaseData.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/BaseData.txt to read, skipping.");
LogError("Unable to open import/BaseData.txt to read, skipping.");
return;
}
@@ -265,11 +292,11 @@ void ImportBaseData(SharedDatabase *db) {
}
void ImportDBStrings(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing DB Strings...");
LogInfo("Importing DB Strings");
FILE *f = fopen("import/dbstr_us.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/dbstr_us.txt to read, skipping.");
LogError("Unable to open import/dbstr_us.txt to read, skipping.");
return;
}
@@ -300,10 +327,10 @@ void ImportDBStrings(SharedDatabase *db) {
std::string sql;
int id, type;
std::string value;
id = atoi(split[0].c_str());
type = atoi(split[1].c_str());
if(split.size() >= 3) {
value = ::EscapeString(split[2]);
}
+94
View File
@@ -0,0 +1,94 @@
OPTION(EQEMU_FETCH_MSVC_DEPENDENCIES_VCPKG "Automatically fetch vcpkg dependencies for MSCV" ON)
OPTION(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL "Automatically fetch perl dependencies for MSCV" ON)
MARK_AS_ADVANCED(EQEMU_FETCH_MSVC_DEPENDENCIES_VCPKG)
MARK_AS_ADVANCED(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL)
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X86 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x86.zip")
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X64 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x64.zip")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X86 "http://strawberryperl.com/download/5.24.4.1/strawberry-perl-5.24.4.1-32bit-portable.zip")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X64 "http://strawberryperl.com/download/5.24.4.1/strawberry-perl-5.24.4.1-64bit-portable.zip")
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X86_ZIP "vcpkg-export-x86.zip")
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X64_ZIP "vcpkg-export-x64.zip")
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X86_DIR "vcpkg-export-x86")
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X64_DIR "vcpkg-export-x64")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X86_ZIP "strawberry-perl-5.24.4.1-32bit-portable.zip")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X64_ZIP "strawberry-perl-5.24.4.1-64bit-portable.zip")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X86_DIR "x86")
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X64_DIR "x64")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(EQEMU_VCPKG_URL ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X64})
SET(EQEMU_PERL_URL ${EQEMU_MSVC_DEPENDENCIES_PERL_X64})
SET(EQEMU_VCPKG_ZIP ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X64_ZIP})
SET(EQEMU_VCPKG_DIR ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X64_DIR})
SET(EQEMU_PERL_ZIP ${EQEMU_MSVC_DEPENDENCIES_PERL_X64_ZIP})
SET(EQEMU_PERL_DIR ${EQEMU_MSVC_DEPENDENCIES_PERL_X64_DIR})
ELSE()
SET(EQEMU_VCPKG_URL ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X86})
SET(EQEMU_PERL_URL ${EQEMU_MSVC_DEPENDENCIES_PERL_X86})
SET(EQEMU_VCPKG_ZIP ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X86_ZIP})
SET(EQEMU_VCPKG_DIR ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X86_DIR})
SET(EQEMU_PERL_ZIP ${EQEMU_MSVC_DEPENDENCIES_PERL_X86_ZIP})
SET(EQEMU_PERL_DIR ${EQEMU_MSVC_DEPENDENCIES_PERL_X86_DIR})
ENDIF()
IF(EQEMU_FETCH_MSVC_DEPENDENCIES_VCPKG)
MESSAGE(STATUS "Resolving vcpkg dependencies...")
IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/vcpkg/${EQEMU_VCPKG_ZIP})
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/vcpkg)
MESSAGE(STATUS "Downloading existing vcpkg dependencies from releases...")
FILE(DOWNLOAD ${EQEMU_VCPKG_URL} ${PROJECT_SOURCE_DIR}/vcpkg/${EQEMU_VCPKG_ZIP}
SHOW_PROGRESS
STATUS DOWNLOAD_STATUS)
LIST(GET DOWNLOAD_STATUS 0 STATUS_CODE)
IF(NOT STATUS_CODE EQUAL 0)
MESSAGE(FATAL_ERROR "Was unable to download dependencies from ${EQEMU_VCPKG_URL}")
ENDIF()
MESSAGE(STATUS "Extracting files...")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/vcpkg/${EQEMU_VCPKG_ZIP}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vcpkg
)
ENDIF()
INCLUDE(${PROJECT_SOURCE_DIR}/vcpkg/${EQEMU_VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake)
ENDIF()
IF(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL)
#Try to find perl first, (so you can use your active install first)
FIND_PACKAGE(PerlLibs)
IF(NOT PerlLibs_FOUND)
MESSAGE(STATUS "Resolving perl dependencies...")
IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_ZIP})
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/perl)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_DIR})
MESSAGE(STATUS "Downloading portable perl...")
FILE(DOWNLOAD ${EQEMU_PERL_URL} ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_ZIP}
SHOW_PROGRESS
STATUS DOWNLOAD_STATUS)
LIST(GET DOWNLOAD_STATUS 0 STATUS_CODE)
IF(NOT STATUS_CODE EQUAL 0)
MESSAGE(FATAL_ERROR "Was unable to download dependencies from ${EQEMU_PERL_URL}")
ENDIF()
MESSAGE(STATUS "Extracting files...")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_ZIP}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_DIR}
)
ENDIF()
SET(PERL_EXECUTABLE ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_DIR}/perl/bin/perl.exe CACHE FILEPATH "Path to perl program" FORCE)
SET(PERL_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_DIR}/perl/lib/CORE CACHE PATH "Path to perl include files" FORCE)
SET(PERL_LIBRARY ${PROJECT_SOURCE_DIR}/perl/${EQEMU_PERL_DIR}/perl/lib/CORE/libperl524.a CACHE FILEPATH "Path to perl library" FORCE)
ENDIF()
ENDIF()
-124
View File
@@ -1,124 +0,0 @@
#CMake - Cross Platform Makefile Generator
#Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions
#are met:
#
#* Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
#* Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#* Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This module defines
# LUA51_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
IF(LUA_ROOT)
FIND_PATH(LUA_INCLUDE_DIR
NAMES lua.h
HINTS
ENV LUA_DIR
PATHS
${LUA_ROOT}
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include src
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATHS
${LUA_ROOT}
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib bin
)
ELSE(LUA_ROOT)
FIND_PATH(LUA_INCLUDE_DIR
NAMES lua.h
HINTS
ENV LUA_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib bin
)
ENDIF(LUA_ROOT)
IF(LUA_LIBRARY)
# include the math library for Unix
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUA_MATH_LIBRARY m)
SET(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
ELSE()
SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
ENDIF()
ENDIF()
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
UNSET(lua_version_str)
ENDIF()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+91
View File
@@ -0,0 +1,91 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Modified from the FindLua51 that comes with CMake
#[=======================================================================[.rst:
FindLua51
---------
Locate Lua51 library This module defines
::
LUA51_FOUND, if false, do not try to link to Lua
LUA_LIBRARIES
LUA_INCLUDE_DIR, where to find lua.h
LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
Note that the expected include convention is
::
#include "lua.h"
and not
::
#include <lua/lua.h>
This is because, the lua location is not standardized and may exist in
locations other than lua/
#]=======================================================================]
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUA_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
unset(lua_version_str)
endif()
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUA51_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+91
View File
@@ -0,0 +1,91 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Modified from the FindLua51 that comes with CMake
#[=======================================================================[.rst:
FindLuaJit
---------
Locate LuaJit library This module defines
::
LUAJIT_FOUND, if false, do not try to link to Lua
LUAJIT_LIBRARIES
LUAJIT_INCLUDE_DIR, where to find lua.h
LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
Note that the expected include convention is
::
#include "lua.h"
and not
::
#include <lua/lua.h>
This is because, the lua location is not standardized and may exist in
locations other than lua/
#]=======================================================================]
find_path(LUAJIT_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/luajit include/luajit-2.0 include/luajit-2.1 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUAJIT_LIBRARY
NAMES luajit51 luajit5.1 luajit-5.1 luajit lua51
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUAJIT_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
find_library(LUAJIT_MATH_LIBRARY m)
set( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY};${LUAJIT_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h")
file(STRINGS "${LUAJIT_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${lua_version_str}")
unset(lua_version_str)
endif()
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJit
REQUIRED_VARS LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR
VERSION_VAR LUAJIT_VERSION_STRING)
mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES LUAJIT_LIBRARY LUAJIT_MATH_LIBRARY)
+87
View File
@@ -0,0 +1,87 @@
# - Find mariadbclient
#
# -*- cmake -*-
#
# Find the native MariaDB includes and library
#
# MariaDB_INCLUDE_DIR - where to find mysql.h, etc.
# MariaDB_LIBRARIES - List of libraries when using MariaDB.
# MariaDB_FOUND - True if MariaDB found.
# The following can be used as a hint as to where to search:
# MARIADB_ROOT
IF (MariaDB_INCLUDE_DIR AND MariaDB_LIBRARIES)
# Already in cache, be silent
SET(MariaDB_FIND_QUIETLY TRUE)
ENDIF (MariaDB_INCLUDE_DIR AND MariaDB_LIBRARIES)
# Include dir
IF(MARIADB_ROOT)
FIND_PATH(MariaDB_INCLUDE_DIR
NAMES mariadb_version.h
PATHS ${MARIADB_ROOT}/include
PATH_SUFFIXES mysql mariadb
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_PATH(MariaDB_INCLUDE_DIR
NAMES mariadb_version.h
PATH_SUFFIXES mysql mariadb
)
ELSE(MARIADB_ROOT)
FIND_PATH(MariaDB_INCLUDE_DIR
NAMES mariadb_version.h
PATH_SUFFIXES mysql mariadb
)
ENDIF(MARIADB_ROOT)
# Library
SET(MariaDB_NAMES libmariadb)
IF(MARIADB_ROOT)
FIND_LIBRARY(MariaDB_LIBRARY
NAMES ${MariaDB_NAMES}
PATHS ${MARIADB_ROOT}/lib
PATH_SUFFIXES mysql mariadb
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(MariaDB_LIBRARY
NAMES ${MariaDB_NAMES}
PATH_SUFFIXES mysql mariadb
)
ELSE(MARIADB_ROOT)
FIND_LIBRARY(MariaDB_LIBRARY
NAMES ${MariaDB_NAMES} mariadbclient_r mariadbclient
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql mariadb
)
ENDIF(MARIADB_ROOT)
IF (MariaDB_INCLUDE_DIR AND MariaDB_LIBRARY)
SET(MariaDB_FOUND TRUE)
SET(MariaDB_LIBRARIES ${MariaDB_LIBRARY})
ELSE (MariaDB_INCLUDE_DIR AND MariaDB_LIBRARY)
SET(MariaDB_FOUND FALSE)
SET(MariaDB_LIBRARIES)
ENDIF (MariaDB_INCLUDE_DIR AND MariaDB_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set MariaDB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MariaDB DEFAULT_MSG MariaDB_LIBRARY MariaDB_INCLUDE_DIR)
IF(MariaDB_FOUND)
SET( MariaDB_LIBRARY_RELEASE ${MariaDB_LIBRARY} )
SET( MariaDB_LIBRARY_DEBUG ${MariaDB_LIBRARY} )
SET( MariaDB_LIBRARIES ${MariaDB_LIBRARY_RELEASE} ${MariaDB_LIBRARY_DEBUG} )
ELSE(MariaDB_FOUND)
SET( MariaDB_LIBRARIES )
ENDIF(MariaDB_FOUND)
MARK_AS_ADVANCED(
MariaDB_LIBRARY_DEBUG
MariaDB_LIBRARY_RELEASE
MariaDB_INCLUDE_DIR
)
+23 -20
View File
@@ -21,6 +21,12 @@ IF(MYSQL_ROOT)
NAMES mysql.h
PATHS ${MYSQL_ROOT}/include
PATH_SUFFIXES mysql
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_PATH(MySQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
ELSE(MYSQL_ROOT)
FIND_PATH(MySQL_INCLUDE_DIR
@@ -30,49 +36,46 @@ ELSE(MYSQL_ROOT)
ENDIF(MYSQL_ROOT)
# Library
SET(MySQL_NAMES mysqlclient_r mysqlclient)
SET(MySQL_NAMES libmysql)
IF(MYSQL_ROOT)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
FIND_LIBRARY(MySQL_LIBRARY
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib/debug /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATHS ${MYSQL_ROOT}/lib
PATH_SUFFIXES mysql
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
FIND_LIBRARY(MySQL_LIBRARY
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
ELSE(MYSQL_ROOT)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
NAMES ${MySQL_NAMES}
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
NAMES ${MySQL_NAMES}
FIND_LIBRARY(MySQL_LIBRARY
NAMES ${MySQL_NAMES} mysqlclient_r mysqlclient
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
ENDIF(MYSQL_ROOT)
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
SET(MySQL_FOUND TRUE)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY} )
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
SET(MySQL_FOUND FALSE)
SET( MySQL_LIBRARIES )
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set MySQL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY_DEBUG MySQL_LIBRARY_RELEASE MySQL_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY MySQL_INCLUDE_DIR)
IF(MySQL_FOUND)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
SET( MySQL_LIBRARY_RELEASE ${MySQL_LIBRARY} )
SET( MySQL_LIBRARY_DEBUG ${MySQL_LIBRARY} )
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_RELEASE} ${MySQL_LIBRARY_DEBUG} )
ELSE(MySQL_FOUND)
SET( MySQL_LIBRARIES )
ENDIF(MySQL_FOUND)
+30
View File
@@ -0,0 +1,30 @@
if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_SODIUM "libsodium")
if (NOT PC_SODIUM_FOUND)
pkg_check_modules(PC_SODIUM "sodium")
endif (NOT PC_SODIUM_FOUND)
if (PC_SODIUM_FOUND)
set(SODIUM_INCLUDE_HINTS ${PC_SODIUM_INCLUDE_DIRS} ${PC_SODIUM_INCLUDE_DIRS}/*)
set(SODIUM_LIBRARY_HINTS ${PC_SODIUM_LIBRARY_DIRS} ${PC_SODIUM_LIBRARY_DIRS}/*)
endif()
endif (NOT MSVC)
# some libraries install the headers is a subdirectory of the include dir
# returned by pkg-config, so use a wildcard match to improve chances of finding
# headers and libraries.
find_path(
SODIUM_INCLUDE_DIRS
NAMES sodium.h
HINTS ${SODIUM_INCLUDE_HINTS}
)
find_library(
SODIUM_LIBRARIES
NAMES libsodium sodium
HINTS ${SODIUM_LIBRARY_HINTS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SODIUM DEFAULT_MSG SODIUM_LIBRARIES SODIUM_INCLUDE_DIRS)
mark_as_advanced(SODIUM_FOUND SODIUM_LIBRARIES SODIUM_INCLUDE_DIRS)
+93
View File
@@ -0,0 +1,93 @@
# - Try to find mbedTLS
# Once done this will define
#
# Read-Only variables
# MBEDTLS_FOUND - system has mbedTLS
# MBEDTLS_INCLUDE_DIR - the mbedTLS include directory
# MBEDTLS_LIBRARY_DIR - the mbedTLS library directory
# MBEDTLS_LIBRARIES - Link these to use mbedTLS
# MBEDTLS_LIBRARY - path to mbedTLS library
# MBEDX509_LIBRARY - path to mbedTLS X.509 library
# MBEDCRYPTO_LIBRARY - path to mbedTLS Crypto library
#
# Hint
# MBEDTLS_ROOT_DIR can be pointed to a local mbedTLS installation.
SET(_MBEDTLS_ROOT_HINTS
${MBEDTLS_ROOT_DIR}
ENV MBEDTLS_ROOT_DIR
)
SET(_MBEDTLS_ROOT_HINTS_AND_PATHS
HINTS ${_MBEDTLS_ROOT_HINTS}
PATHS ${_MBEDTLS_ROOT_PATHS}
)
FIND_PATH(MBEDTLS_INCLUDE_DIR
NAMES mbedtls/version.h
${_MBEDTLS_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES include
)
IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARIES)
# Already in cache, be silent
SET(MBEDTLS_FIND_QUIETLY TRUE)
ENDIF()
FIND_LIBRARY(MBEDTLS_LIBRARY
NAMES mbedtls libmbedtls
${_MBEDTLS_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES library
)
FIND_LIBRARY(MBEDX509_LIBRARY
NAMES mbedx509 libmbedx509
${_MBEDTLS_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES library
)
FIND_LIBRARY(MBEDCRYPTO_LIBRARY
NAMES mbedcrypto libmbedcrypto
${_MBEDTLS_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES library
)
IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY AND MBEDX509_LIBRARY AND MBEDCRYPTO_LIBRARY)
SET(MBEDTLS_FOUND TRUE)
ENDIF()
IF(MBEDTLS_FOUND)
# split mbedTLS into -L and -l linker options, so we can set them for pkg-config
GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_DIR ${MBEDTLS_LIBRARY} PATH)
GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY} NAME_WE)
GET_FILENAME_COMPONENT(MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY} NAME_WE)
GET_FILENAME_COMPONENT(MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY} NAME_WE)
STRING(REGEX REPLACE "^lib" "" MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY_FILE})
STRING(REGEX REPLACE "^lib" "" MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY_FILE})
STRING(REGEX REPLACE "^lib" "" MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY_FILE})
SET(MBEDTLS_LIBRARIES "-L${MBEDTLS_LIBRARY_DIR} -l${MBEDTLS_LIBRARY_FILE} -l${MBEDX509_LIBRARY_FILE} -l${MBEDCRYPTO_LIBRARY_FILE}")
IF(NOT MBEDTLS_FIND_QUIETLY)
MESSAGE(STATUS "Found mbedTLS:")
FILE(READ ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLSCONTENT)
STRING(REGEX MATCH "MBEDTLS_VERSION_STRING +\"[0-9|.]+\"" MBEDTLSMATCH ${MBEDTLSCONTENT})
IF (MBEDTLSMATCH)
STRING(REGEX REPLACE "MBEDTLS_VERSION_STRING +\"([0-9|.]+)\"" "\\1" MBEDTLS_VERSION ${MBEDTLSMATCH})
MESSAGE(STATUS " version ${MBEDTLS_VERSION}")
ENDIF(MBEDTLSMATCH)
MESSAGE(STATUS " TLS: ${MBEDTLS_LIBRARY}")
MESSAGE(STATUS " X509: ${MBEDX509_LIBRARY}")
MESSAGE(STATUS " Crypto: ${MBEDCRYPTO_LIBRARY}")
ENDIF(NOT MBEDTLS_FIND_QUIETLY)
ELSE(MBEDTLS_FOUND)
IF(MBEDTLS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find mbedTLS")
ENDIF(MBEDTLS_FIND_REQUIRED)
ENDIF(MBEDTLS_FOUND)
MARK_AS_ADVANCED(
MBEDTLS_INCLUDE_DIR
MBEDTLS_LIBRARY_DIR
MBEDTLS_LIBRARIES
MBEDTLS_LIBRARY
MBEDX509_LIBRARY
MBEDCRYPTO_LIBRARY
)
+536 -129
View File
@@ -1,43 +1,51 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
SET(common_sources
base_packet.cpp
classes.cpp
cli/eqemu_command_handler.cpp
compression.cpp
condition.cpp
content/world_content_service.cpp
crash.cpp
crc16.cpp
crc32.cpp
database/database_dump_service.cpp
database.cpp
database_conversions.cpp
database_instances.cpp
dbcore.cpp
deity.cpp
dynamic_zone_base.cpp
emu_constants.cpp
emu_limits.cpp
emu_opcodes.cpp
emu_tcp_connection.cpp
emu_tcp_server.cpp
eq_dictionary.cpp
emu_versions.cpp
eqdb.cpp
eqdb_res.cpp
eqemu_exception.cpp
eqemu_config.cpp
eqemu_logsys.cpp
eq_limits.cpp
eq_packet.cpp
eq_stream.cpp
eq_stream_factory.cpp
eq_stream_ident.cpp
eq_stream_proxy.cpp
eqtime.cpp
event_sub.cpp
expedition_lockout_timer.cpp
extprofile.cpp
faction.cpp
file_util.cpp
guild_base.cpp
guilds.cpp
inventory.cpp
inventory_db_data_model.cpp
inventory_profile.cpp
inventory_slot.cpp
ipc_mutex.cpp
item.cpp
item_container.cpp
item_container_default_serialization.cpp
item_container_personal_serialization.cpp
ip_util.cpp
item_data.cpp
item_instance.cpp
json_config.cpp
light_source.cpp
md5.cpp
memory_buffer.cpp
memory_mapped_file.cpp
@@ -54,69 +62,442 @@ SET(common_sources
perl_eqdb.cpp
perl_eqdb_res.cpp
proc_launcher.cpp
profanity_manager.cpp
ptimer.cpp
races.cpp
rdtsc.cpp
rulesys.cpp
say_link.cpp
serialize_buffer.cpp
server_event_scheduler.cpp
serverinfo.cpp
shared_tasks.cpp
shareddb.cpp
skills.cpp
spdat.cpp
string_util.cpp
struct_strategy.cpp
tcp_connection.cpp
tcp_server.cpp
timeoutmgr.cpp
textures.cpp
timer.cpp
unix.cpp
worldconn.cpp
xml_parser.cpp
platform.cpp
json/jsoncpp.cpp
net/console_server.cpp
net/console_server_connection.cpp
net/crc32.cpp
net/daybreak_connection.cpp
net/eqstream.cpp
net/packet.cpp
net/servertalk_client_connection.cpp
net/servertalk_legacy_client_connection.cpp
net/servertalk_server.cpp
net/servertalk_server_connection.cpp
net/tcp_connection.cpp
net/tcp_server.cpp
net/websocket_server.cpp
net/websocket_server_connection.cpp
patches/patches.cpp
patches/sod.cpp
patches/sod_limits.cpp
patches/sof.cpp
patches/sof_limits.cpp
patches/rof.cpp
patches/rof_limits.cpp
patches/rof2.cpp
patches/rof2_limits.cpp
patches/titanium.cpp
patches/titanium_limits.cpp
patches/uf.cpp
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
patches/uf_limits.cpp
StackWalker/StackWalker.cpp
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
util/directory.cpp
util/uuid.cpp)
SET(repositories
# Criteria
repositories/criteria/content_filter_criteria.h
# Base Repositories
repositories/base/base_aa_ability_repository.h
repositories/base/base_aa_ranks_repository.h
repositories/base/base_aa_rank_effects_repository.h
repositories/base/base_aa_rank_prereqs_repository.h
repositories/base/base_account_repository.h
repositories/base/base_account_flags_repository.h
repositories/base/base_account_ip_repository.h
repositories/base/base_account_rewards_repository.h
repositories/base/base_adventure_details_repository.h
repositories/base/base_adventure_members_repository.h
repositories/base/base_adventure_stats_repository.h
repositories/base/base_adventure_template_repository.h
repositories/base/base_adventure_template_entry_repository.h
repositories/base/base_adventure_template_entry_flavor_repository.h
repositories/base/base_alternate_currency_repository.h
repositories/base/base_auras_repository.h
repositories/base/base_base_data_repository.h
repositories/base/base_blocked_spells_repository.h
repositories/base/base_bugs_repository.h
repositories/base/base_bug_reports_repository.h
repositories/base/base_buyer_repository.h
repositories/base/base_character_activities_repository.h
repositories/base/base_character_alternate_abilities_repository.h
repositories/base/base_character_alt_currency_repository.h
repositories/base/base_character_auras_repository.h
repositories/base/base_character_bandolier_repository.h
repositories/base/base_character_bind_repository.h
repositories/base/base_character_buffs_repository.h
repositories/base/base_character_corpses_repository.h
repositories/base/base_character_corpse_items_repository.h
repositories/base/base_character_currency_repository.h
repositories/base/base_character_data_repository.h
repositories/base/base_character_disciplines_repository.h
repositories/base/base_character_expedition_lockouts_repository.h
repositories/base/base_character_inspect_messages_repository.h
repositories/base/base_character_instance_safereturns_repository.h
repositories/base/base_character_item_recast_repository.h
repositories/base/base_character_languages_repository.h
repositories/base/base_character_leadership_abilities_repository.h
repositories/base/base_character_material_repository.h
repositories/base/base_character_memmed_spells_repository.h
repositories/base/base_character_pet_buffs_repository.h
repositories/base/base_character_pet_info_repository.h
repositories/base/base_character_pet_inventory_repository.h
repositories/base/base_character_potionbelt_repository.h
repositories/base/base_character_skills_repository.h
repositories/base/base_character_spells_repository.h
repositories/base/base_character_task_timers_repository.h
repositories/base/base_character_tasks_repository.h
repositories/base/base_char_create_combinations_repository.h
repositories/base/base_char_create_point_allocations_repository.h
repositories/base/base_char_recipe_list_repository.h
repositories/base/base_completed_tasks_repository.h
repositories/base/base_completed_shared_tasks_repository.h
repositories/base/base_completed_shared_task_members_repository.h
repositories/base/base_completed_shared_task_activity_state_repository.h
repositories/base/base_content_flags_repository.h
repositories/base/base_damageshieldtypes_repository.h
repositories/base/base_data_buckets_repository.h
repositories/base/base_db_str_repository.h
repositories/base/base_discovered_items_repository.h
repositories/base/base_doors_repository.h
repositories/base/base_dynamic_zones_repository.h
repositories/base/base_dynamic_zone_members_repository.h
repositories/base/base_eventlog_repository.h
repositories/base/base_expeditions_repository.h
repositories/base/base_expedition_lockouts_repository.h
repositories/base/base_faction_base_data_repository.h
repositories/base/base_faction_list_repository.h
repositories/base/base_faction_list_mod_repository.h
repositories/base/base_faction_values_repository.h
repositories/base/base_fishing_repository.h
repositories/base/base_forage_repository.h
repositories/base/base_friends_repository.h
repositories/base/base_global_loot_repository.h
repositories/base/base_gm_ips_repository.h
repositories/base/base_goallists_repository.h
repositories/base/base_graveyard_repository.h
repositories/base/base_grid_repository.h
repositories/base/base_grid_entries_repository.h
repositories/base/base_ground_spawns_repository.h
repositories/base/base_group_id_repository.h
repositories/base/base_group_leaders_repository.h
repositories/base/base_guilds_repository.h
repositories/base/base_guild_members_repository.h
repositories/base/base_guild_ranks_repository.h
repositories/base/base_guild_relations_repository.h
repositories/base/base_hackers_repository.h
repositories/base/base_instance_list_repository.h
repositories/base/base_instance_list_player_repository.h
repositories/base/base_inventory_repository.h
repositories/base/base_inventory_snapshots_repository.h
repositories/base/base_ip_exemptions_repository.h
repositories/base/base_items_repository.h
repositories/base/base_item_tick_repository.h
repositories/base/base_ldon_trap_entries_repository.h
repositories/base/base_ldon_trap_templates_repository.h
repositories/base/base_level_exp_mods_repository.h
repositories/base/base_lfguild_repository.h
repositories/base/base_login_accounts_repository.h
repositories/base/base_login_api_tokens_repository.h
repositories/base/base_login_server_admins_repository.h
repositories/base/base_login_server_list_types_repository.h
repositories/base/base_login_world_servers_repository.h
repositories/base/base_logsys_categories_repository.h
repositories/base/base_lootdrop_repository.h
repositories/base/base_lootdrop_entries_repository.h
repositories/base/base_loottable_repository.h
repositories/base/base_loottable_entries_repository.h
repositories/base/base_mail_repository.h
repositories/base/base_merchantlist_repository.h
repositories/base/base_merchantlist_temp_repository.h
repositories/base/base_name_filter_repository.h
repositories/base/base_npc_emotes_repository.h
repositories/base/base_npc_faction_repository.h
repositories/base/base_npc_faction_entries_repository.h
repositories/base/base_npc_scale_global_base_repository.h
repositories/base/base_npc_spells_repository.h
repositories/base/base_npc_spells_effects_repository.h
repositories/base/base_npc_spells_effects_entries_repository.h
repositories/base/base_npc_spells_entries_repository.h
repositories/base/base_npc_types_repository.h
repositories/base/base_npc_types_tint_repository.h
repositories/base/base_object_repository.h
repositories/base/base_object_contents_repository.h
repositories/base/base_perl_event_export_settings_repository.h
repositories/base/base_petitions_repository.h
repositories/base/base_pets_repository.h
repositories/base/base_pets_equipmentset_repository.h
repositories/base/base_pets_equipmentset_entries_repository.h
repositories/base/base_player_titlesets_repository.h
repositories/base/base_proximities_repository.h
repositories/base/base_quest_globals_repository.h
repositories/base/base_raid_details_repository.h
repositories/base/base_raid_members_repository.h
repositories/base/base_reports_repository.h
repositories/base/base_respawn_times_repository.h
repositories/base/base_rule_sets_repository.h
repositories/base/base_rule_values_repository.h
repositories/base/base_saylink_repository.h
repositories/base/base_server_scheduled_events_repository.h
repositories/base/base_shared_tasks_repository.h
repositories/base/base_shared_task_activity_state_repository.h
repositories/base/base_shared_task_dynamic_zones_repository.h
repositories/base/base_shared_task_members_repository.h
repositories/base/base_skill_caps_repository.h
repositories/base/base_spawn2_repository.h
repositories/base/base_spawnentry_repository.h
repositories/base/base_spawngroup_repository.h
repositories/base/base_spawn_conditions_repository.h
repositories/base/base_spawn_condition_values_repository.h
repositories/base/base_spawn_events_repository.h
repositories/base/base_spells_new_repository.h
repositories/base/base_spell_buckets_repository.h
repositories/base/base_spell_globals_repository.h
repositories/base/base_starting_items_repository.h
repositories/base/base_start_zones_repository.h
repositories/base/base_tasks_repository.h
repositories/base/base_tasksets_repository.h
repositories/base/base_task_activities_repository.h
repositories/base/base_timers_repository.h
repositories/base/base_titles_repository.h
repositories/base/base_trader_repository.h
repositories/base/base_tradeskill_recipe_repository.h
repositories/base/base_tradeskill_recipe_entries_repository.h
repositories/base/base_traps_repository.h
repositories/base/base_tributes_repository.h
repositories/base/base_tribute_levels_repository.h
repositories/base/base_veteran_reward_templates_repository.h
repositories/base/base_zone_repository.h
repositories/base/base_zone_points_repository.h
# Extended Repositories
repositories/aa_ability_repository.h
repositories/aa_ranks_repository.h
repositories/aa_rank_effects_repository.h
repositories/aa_rank_prereqs_repository.h
repositories/account_repository.h
repositories/account_flags_repository.h
repositories/account_ip_repository.h
repositories/account_rewards_repository.h
repositories/adventure_details_repository.h
repositories/adventure_members_repository.h
repositories/adventure_stats_repository.h
repositories/adventure_template_repository.h
repositories/adventure_template_entry_repository.h
repositories/adventure_template_entry_flavor_repository.h
repositories/alternate_currency_repository.h
repositories/auras_repository.h
repositories/base_data_repository.h
repositories/blocked_spells_repository.h
repositories/bugs_repository.h
repositories/bug_reports_repository.h
repositories/buyer_repository.h
repositories/character_activities_repository.h
repositories/character_alternate_abilities_repository.h
repositories/character_alt_currency_repository.h
repositories/character_auras_repository.h
repositories/character_bandolier_repository.h
repositories/character_bind_repository.h
repositories/character_buffs_repository.h
repositories/character_corpses_repository.h
repositories/character_corpse_items_repository.h
repositories/character_currency_repository.h
repositories/character_data_repository.h
repositories/character_disciplines_repository.h
repositories/character_expedition_lockouts_repository.h
repositories/character_inspect_messages_repository.h
repositories/character_instance_safereturns_repository.h
repositories/character_item_recast_repository.h
repositories/character_languages_repository.h
repositories/character_leadership_abilities_repository.h
repositories/character_material_repository.h
repositories/character_memmed_spells_repository.h
repositories/character_pet_buffs_repository.h
repositories/character_pet_info_repository.h
repositories/character_pet_inventory_repository.h
repositories/character_potionbelt_repository.h
repositories/character_skills_repository.h
repositories/character_spells_repository.h
repositories/character_task_timers_repository.h
repositories/character_tasks_repository.h
repositories/char_create_combinations_repository.h
repositories/char_create_point_allocations_repository.h
repositories/char_recipe_list_repository.h
repositories/completed_tasks_repository.h
repositories/completed_shared_tasks_repository.h
repositories/completed_shared_task_members_repository.h
repositories/completed_shared_task_activity_state_repository.h
repositories/content_flags_repository.h
repositories/damageshieldtypes_repository.h
repositories/data_buckets_repository.h
repositories/db_str_repository.h
repositories/discovered_items_repository.h
repositories/doors_repository.h
repositories/dynamic_zones_repository.h
repositories/dynamic_zone_members_repository.h
repositories/eventlog_repository.h
repositories/expeditions_repository.h
repositories/expedition_lockouts_repository.h
repositories/faction_base_data_repository.h
repositories/faction_list_repository.h
repositories/faction_list_mod_repository.h
repositories/faction_values_repository.h
repositories/fishing_repository.h
repositories/forage_repository.h
repositories/friends_repository.h
repositories/global_loot_repository.h
repositories/gm_ips_repository.h
repositories/goallists_repository.h
repositories/graveyard_repository.h
repositories/grid_repository.h
repositories/grid_entries_repository.h
repositories/ground_spawns_repository.h
repositories/group_id_repository.h
repositories/group_leaders_repository.h
repositories/guilds_repository.h
repositories/guild_members_repository.h
repositories/guild_ranks_repository.h
repositories/guild_relations_repository.h
repositories/hackers_repository.h
repositories/instance_list_repository.h
repositories/instance_list_player_repository.h
repositories/inventory_repository.h
repositories/inventory_snapshots_repository.h
repositories/ip_exemptions_repository.h
repositories/items_repository.h
repositories/item_tick_repository.h
repositories/ldon_trap_entries_repository.h
repositories/ldon_trap_templates_repository.h
repositories/level_exp_mods_repository.h
repositories/lfguild_repository.h
repositories/login_accounts_repository.h
repositories/login_api_tokens_repository.h
repositories/login_server_admins_repository.h
repositories/login_server_list_types_repository.h
repositories/login_world_servers_repository.h
repositories/logsys_categories_repository.h
repositories/lootdrop_repository.h
repositories/lootdrop_entries_repository.h
repositories/loottable_repository.h
repositories/loottable_entries_repository.h
repositories/mail_repository.h
repositories/merchantlist_repository.h
repositories/merchantlist_temp_repository.h
repositories/name_filter_repository.h
repositories/npc_emotes_repository.h
repositories/npc_faction_repository.h
repositories/npc_faction_entries_repository.h
repositories/npc_scale_global_base_repository.h
repositories/npc_spells_repository.h
repositories/npc_spells_effects_repository.h
repositories/npc_spells_effects_entries_repository.h
repositories/npc_spells_entries_repository.h
repositories/npc_types_repository.h
repositories/npc_types_tint_repository.h
repositories/object_repository.h
repositories/object_contents_repository.h
repositories/perl_event_export_settings_repository.h
repositories/petitions_repository.h
repositories/pets_repository.h
repositories/pets_equipmentset_repository.h
repositories/pets_equipmentset_entries_repository.h
repositories/player_titlesets_repository.h
repositories/proximities_repository.h
repositories/quest_globals_repository.h
repositories/raid_details_repository.h
repositories/raid_members_repository.h
repositories/reports_repository.h
repositories/respawn_times_repository.h
repositories/rule_sets_repository.h
repositories/rule_values_repository.h
repositories/saylink_repository.h
repositories/server_scheduled_events_repository.h
repositories/shared_tasks_repository.h
repositories/shared_task_activity_state_repository.h
repositories/shared_task_dynamic_zones_repository.h
repositories/shared_task_members_repository.h
repositories/skill_caps_repository.h
repositories/spawn2_repository.h
repositories/spawnentry_repository.h
repositories/spawngroup_repository.h
repositories/spawn_conditions_repository.h
repositories/spawn_condition_values_repository.h
repositories/spawn_events_repository.h
repositories/spells_new_repository.h
repositories/spell_buckets_repository.h
repositories/spell_globals_repository.h
repositories/starting_items_repository.h
repositories/start_zones_repository.h
repositories/tasks_repository.h
repositories/tasksets_repository.h
repositories/task_activities_repository.h
repositories/timers_repository.h
repositories/titles_repository.h
repositories/trader_repository.h
repositories/tradeskill_recipe_repository.h
repositories/tradeskill_recipe_entries_repository.h
repositories/traps_repository.h
repositories/tributes_repository.h
repositories/tribute_levels_repository.h
repositories/veteran_reward_templates_repository.h
repositories/zone_repository.h
repositories/zone_points_repository.h
# Non-Comformative
repositories/character_recipe_list_repository.h
)
SET(common_headers
additive_lagged_fibonacci_engine.h
any.h
base_packet.h
base_data.h
bodytypes.h
classes.h
compression.h
condition.h
content/world_content_service.h
crash.h
crc16.h
crc32.h
cli/argh.h
cli/eqemu_command_handler.h
cli/terminal_color.hpp
cron/croncpp.h
database/database_dump_service.h
data_verification.h
database.h
database_schema.h
dbcore.h
deity.h
dynamic_zone_base.h
emu_constants.h
emu_limits.h
emu_opcodes.h
emu_oplist.h
emu_tcp_connection.h
emu_tcp_server.h
emu_versions.h
eq_constants.h
eq_dictionary.h
eq_packet_structs.h
eqdb.h
eqdb_res.h
@@ -124,38 +505,38 @@ SET(common_headers
eqemu_config.h
eqemu_config_elements.h
eqemu_logsys.h
eqemu_logsys_log_aliases.h
eq_limits.h
eq_packet.h
eq_stream.h
eq_stream_factory.h
eq_stream_ident.h
eq_stream_intf.h
eq_stream_locator.h
eq_stream_proxy.h
eq_stream_type.h
eqtime.h
errmsg.h
event_sub.h
expedition_lockout_timer.h
extprofile.h
faction.h
file_util.h
features.h
fixed_memory_hash_set.h
fixed_memory_variable_hash_set.h
global_define.h
guild_base.h
guilds.h
inventory.h
inventory_data_model.h
inventory_db_data_model.h
inventory_null_data_model.h
http/httplib.h
http/uri.h
inventory_profile.h
inventory_slot.h
ipc_mutex.h
item.h
item_container.h
item_container_default_serialization.h
item_container_personal_serialization.h
item_container_serialization_strategy.h
ip_util.h
item_data.h
item_fieldlist.h
item_instance.h
json_config.h
languages.h
light_source.h
linked_list.h
loottable.h
mail_oplist.h
@@ -175,6 +556,7 @@ SET(common_headers
packet_functions.h
platform.h
proc_launcher.h
profanity_manager.h
profiler.h
ptimer.h
queue.h
@@ -183,147 +565,174 @@ SET(common_headers
rdtsc.h
rulesys.h
ruletypes.h
say_link.h
seperator.h
serialize_buffer.h
server_event_scheduler.h
serverinfo.h
servertalk.h
shared_tasks.h
shareddb.h
skills.h
spdat.h
string_util.h
struct_strategy.h
tcp_basic_server.h
tcp_connection.h
tcp_server.h
timeoutmgr.h
tasks.h
textures.h
timer.h
types.h
unix.h
useperl.h
version.h
worldconn.h
xml_parser.h
zone_numbers.h
event/event_loop.h
event/task.h
event/timer.h
json/json.h
json/json-forwards.h
net/console_server.h
net/console_server_connection.h
net/crc32.h
net/daybreak_connection.h
net/daybreak_structs.h
net/dns.h
net/endian.h
net/eqstream.h
net/packet.h
net/servertalk_client_connection.h
net/servertalk_legacy_client_connection.h
net/servertalk_common.h
net/servertalk_server.h
net/servertalk_server_connection.h
net/tcp_connection.h
net/tcp_server.h
net/websocket_server.h
net/websocket_server_connection.h
patches/patches.h
patches/sod.h
patches/sod_constants.h
patches/sod_itemfields.h
patches/sod_limits.h
patches/sod_ops.h
patches/sod_structs.h
patches/sof.h
patches/sof_constants.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_limits.h
patches/sof_ops.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_constants.h
patches/rof_itemfields.h
patches/rof_limits.h
patches/rof_ops.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_constants.h
patches/rof2_itemfields.h
patches/rof2_limits.h
patches/rof2_ops.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_constants.h
patches/titanium_itemfields.h
patches/titanium_limits.h
patches/titanium_ops.h
patches/titanium_structs.h
patches/uf.h
patches/uf_constants.h
patches/uf_itemfields.h
patches/uf_limits.h
patches/uf_ops.h
patches/uf_structs.h
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
StackWalker/StackWalker.h
tinyxml/tinystr.h
tinyxml/tinyxml.h
util/memory_stream.h
util/directory.h
util/uuid.h
)
SOURCE_GROUP(Event FILES
event/event_loop.h
event/timer.h
event/task.h
)
SOURCE_GROUP(Json FILES
json/json.h
json/jsoncpp.cpp
json/json-forwards.h
)
SOURCE_GROUP(Net FILES
net/console_server.cpp
net/console_server.h
net/console_server_connection.cpp
net/console_server_connection.h
net/crc32.cpp
net/crc32.h
net/daybreak_connection.cpp
net/daybreak_connection.h
net/daybreak_structs.h
net/dns.h
net/endian.h
net/eqmq.cpp
net/eqmq.h
net/eqstream.cpp
net/eqstream.h
net/packet.cpp
net/packet.h
net/servertalk_client_connection.cpp
net/servertalk_client_connection.h
net/servertalk_legacy_client_connection.cpp
net/servertalk_legacy_client_connection.h
net/servertalk_common.h
net/servertalk_server.cpp
net/servertalk_server.h
net/servertalk_server_connection.cpp
net/servertalk_server_connection.h
net/tcp_connection.cpp
net/tcp_connection.h
net/tcp_server.cpp
net/tcp_server.h
net/websocket_server.cpp
net/websocket_server.h
net/websocket_server_connection.cpp
net/websocket_server_connection.h
)
SOURCE_GROUP(Patches FILES
patches/patches.h
patches/sod.h
patches/sod_itemfields.h
patches/sod_limits.h
patches/sod_ops.h
patches/sod_constants.h
patches/sod_structs.h
patches/sof.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_limits.h
patches/sof_ops.h
patches/sof_constants.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_itemfields.h
patches/rof_limits.h
patches/rof_ops.h
patches/rof_constants.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_itemfields.h
patches/rof2_limits.h
patches/rof2_ops.h
patches/rof2_constants.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_itemfields.h
patches/titanium_limits.h
patches/titanium_ops.h
patches/titanium_constants.h
patches/titanium_structs.h
patches/uf.h
patches/uf_itemfields.h
patches/uf_limits.h
patches/uf_ops.h
patches/uf_constants.h
patches/uf_structs.h
patches/patches.cpp
patches/sod.cpp
patches/sod_limits.cpp
patches/sof.cpp
patches/sof_limits.cpp
patches/rof.cpp
patches/rof_limits.cpp
patches/rof2.cpp
patches/rof2_limits.cpp
patches/titanium.cpp
patches/titanium_limits.cpp
patches/uf.cpp
)
SOURCE_GROUP(SocketLib FILES
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
patches/uf_limits.cpp
)
SOURCE_GROUP(StackWalker FILES
@@ -331,21 +740,19 @@ SOURCE_GROUP(StackWalker FILES
StackWalker/StackWalker.cpp
)
SOURCE_GROUP(TinyXML FILES
tinyxml/tinystr.h
tinyxml/tinyxml.h
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
SOURCE_GROUP(Util FILES
util/memory_stream.h
util/directory.cpp
util/directory.h
util/uuid.cpp
util/uuid.h
)
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML)
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker)
ADD_LIBRARY(common ${common_sources} ${common_headers})
ADD_LIBRARY(common ${common_sources} ${common_headers} ${repositories})
IF(UNIX)
ADD_DEFINITIONS(-fPIC)
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF(UNIX)
+147
View File
@@ -0,0 +1,147 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2021 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma once
#include <cstdint>
#include <limits>
#include <type_traits>
#include <algorithm>
#include <iostream>
/*
* This is an additive lagged fibonacci generator as seen in The Art of Computer Programming, Vol. 2
* This should roughly match the implementation that EQ's client uses and be compatible with our Random class
*
* EQ's rand looks like it was from an example implementation that as posted on pscode.com
*
* You might also want to consider defining BIASED_INT_DIST as well to more closely match EQ
*/
namespace EQ {
template<typename UIntType, size_t w, size_t j, size_t k>
class additive_lagged_fibonacci_engine {
static_assert(std::is_unsigned<UIntType>::value, "result_type must be an unsigned integral type");
static_assert(0u < j && j < k, "0 < j < k");
static_assert(0u < w && w <= std::numeric_limits<UIntType>::digits,
"template argument substituting w out of bounds");
public:
using result_type = UIntType;
static constexpr size_t word_size = w;
static constexpr size_t short_lag = j;
static constexpr size_t long_lag = k;
static constexpr result_type default_seed = 19780503u; // default for subtract_with_carry_engine
additive_lagged_fibonacci_engine() : additive_lagged_fibonacci_engine(default_seed) {}
explicit additive_lagged_fibonacci_engine(result_type sd) { seed(sd); }
void seed(result_type seed = default_seed)
{
state1 = long_lag - long_lag;
state2 = long_lag - short_lag;
state[0] = static_cast<int>(seed) & ((1u << word_size) - 1);
state[1] = 1;
for (int i = 2; i < long_lag; ++i)
state[i] = (state[i - 1] + state[i - 2]) & ((1u << word_size) - 1);
return;
}
// TODO: seed via seed_seq
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return ((1u << word_size) - 1) >> 6; }
void discard(unsigned long long z) {
for (; z != 0ULL; --z)
(*this)();
}
result_type operator()() {
result_type rand = (state[state1] + state[state2]) & ((1u << word_size) - 1);
state[state1] = rand;
if (++state1 == long_lag)
state1 = 0;
if (++state2 == long_lag)
state2 = 0;
return rand >> 6;
}
private:
result_type state1;
result_type state2;
result_type state[long_lag];
public:
template<typename UInt, size_t W, size_t J, size_t K>
friend bool operator==(const additive_lagged_fibonacci_engine<UInt, W, J, K> &x,
const additive_lagged_fibonacci_engine<UInt, W, J, K> &y)
{
return std::equal(x.state, x.state + long_lag, y.state) && x.state1 == y.state1 &&
x.state2 == y.state2;
}
template<typename UInt, size_t W, size_t J, size_t K>
friend bool operator!=(const additive_lagged_fibonacci_engine<UInt, W, J, K> &x,
const additive_lagged_fibonacci_engine<UInt, W, J, K> &y)
{ return !(x == y); }
template<typename UInt, size_t W, size_t J, size_t K, typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits> &
operator<<(std::basic_istream<CharT, Traits> &os, additive_lagged_fibonacci_engine<UInt, W, J, K> &x)
{
using ios_base = typename std::basic_istream<CharT, Traits>::ios_base;
const typename ios_base::fmtflags flags = os.flags();
const CharT fill = os.fill();
const CharT space = os.widen(' ');
os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
os.fill(space);
for (size_t i = 0; i < long_lag; ++i)
os << x.state[i] << space;
os << x.state1 << space << x.state2;
os.flags(flags);
os.fill(fill);
return os;
}
template<typename UInt, size_t W, size_t J, size_t K, typename CharT, typename Traits>
friend std::basic_istream<CharT, Traits> &
operator>>(std::basic_istream<CharT, Traits> &is, additive_lagged_fibonacci_engine<UInt, W, J, K> &x)
{
using ios_base = typename std::basic_istream<CharT, Traits>::ios_base;
const typename ios_base::fmtflags flags = is.flags();
is.flags(ios_base::dec | ios_base::skipws);
for (size_t i = 0; i < long_lag; ++i)
is >> x.state[i];
is >> x.state1;
is >> x.state2;
is.flags(flags);
return is;
}
};
using EQRand = additive_lagged_fibonacci_engine<uint32_t, 30, 24, 55>;
};
+2 -2
View File
@@ -24,7 +24,7 @@
* DEALINGS IN THE SOFTWARE.
*/
// EQEmu::Any is a modified version of Boost::Any and as such retains the Boost licensing.
// EQ::Any is a modified version of Boost::Any and as such retains the Boost licensing.
#ifndef EQEMU_COMMON_ANY_H
#define EQEMU_COMMON_ANY_H
@@ -32,7 +32,7 @@
#include <algorithm>
#include <typeinfo>
namespace EQEmu
namespace EQ
{
class Any
{
+2 -2
View File
@@ -24,8 +24,8 @@ struct BaseDataStruct
double base_hp;
double base_mana;
double base_end;
double unk1;
double unk2;
double hp_regen;
double end_regen;
double hp_factor;
double mana_factor;
double endurance_factor;
+12
View File
@@ -39,6 +39,18 @@ BasePacket::BasePacket(const unsigned char *buf, uint32 len)
}
}
BasePacket::BasePacket(SerializeBuffer &buf)
{
pBuffer = buf.m_buffer;
buf.m_buffer = nullptr;
size = buf.m_pos;
buf.m_pos = 0;
buf.m_capacity = 0;
_wpos = 0;
_rpos = 0;
timestamp.tv_sec = 0;
}
BasePacket::~BasePacket()
{
if (pBuffer)
+9 -2
View File
@@ -19,13 +19,14 @@
#define BASEPACKET_H_
#include "types.h"
#include "serialize_buffer.h"
#include <stdio.h>
#include <string.h>
#ifdef WIN32
#ifdef _WINDOWS
#include <time.h>
#include <windows.h>
#include <winsock2.h>
#include <windows.h>
#else
#include <sys/time.h>
#include <netinet/in.h>
@@ -63,13 +64,18 @@ public:
void WriteFloat(float value) { *(float *)(pBuffer + _wpos) = value; _wpos += sizeof(float); }
void WriteDouble(double value) { *(double *)(pBuffer + _wpos) = value; _wpos += sizeof(double); }
void WriteString(const char * str) { uint32 len = static_cast<uint32>(strlen(str)) + 1; memcpy(pBuffer + _wpos, str, len); _wpos += len; }
// this is used in task system a lot, it is NOT null-termed
void WriteLengthString(uint32 len, const char *str) { *(uint32 *)(pBuffer + _wpos) = len; _wpos += sizeof(uint32); memcpy(pBuffer + _wpos, str, len); _wpos += len; }
void WriteData(const void *ptr, size_t n) { memcpy(pBuffer + _wpos, ptr, n); _wpos += n; }
uint8 ReadUInt8() { uint8 value = *(uint8 *)(pBuffer + _rpos); _rpos += sizeof(uint8); return value; }
uint8 ReadUInt8(uint32 Offset) const { uint8 value = *(uint8 *)(pBuffer + Offset); return value; }
uint16 ReadUInt16() { uint16 value = *(uint16 *)(pBuffer + _rpos); _rpos += sizeof(uint16); return value; }
uint16 ReadUInt16(uint32 Offset) const { uint16 value = *(uint16 *)(pBuffer + Offset); return value; }
uint32 ReadUInt32() { uint32 value = *(uint32 *)(pBuffer + _rpos); _rpos += sizeof(uint32); return value; }
uint32 ReadUInt32(uint32 Offset) const { uint32 value = *(uint32 *)(pBuffer + Offset); return value; }
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
void ReadString(std::string &str) { str = reinterpret_cast<char *>(pBuffer + _rpos); _rpos += str.length() + 1; }
void ReadString(char *str, uint32 Offset, uint32 MaxLength) const;
uint32 GetWritePosition() { return _wpos; }
@@ -81,6 +87,7 @@ protected:
virtual ~BasePacket();
BasePacket() { pBuffer=nullptr; size=0; _wpos = 0; _rpos = 0; }
BasePacket(const unsigned char *buf, const uint32 len);
BasePacket(SerializeBuffer &buf);
};
extern void DumpPacketHex(const BasePacket* app);
+11 -8
View File
@@ -27,15 +27,17 @@ typedef enum {
BT_Extraplanar = 6,
BT_Magical = 7, //this name might be a bit off,
BT_SummonedUndead = 8,
BT_RaidGiant = 9,
// ...
BT_RaidGiant = 9, //Velious era Raid Giant
BT_RaidColdain = 10, //Velious era Raid Coldain
BT_NoTarget = 11, //no name, can't target this bodytype
BT_Vampire = 12,
BT_Atenha_Ra = 13,
BT_Greater_Akheva = 14,
BT_Khati_Sha = 15,
BT_Seru = 16, //not confirmed....
BT_Zek = 19,
BT_Seru = 16,
BT_Grieg_Veneficus = 17,
BT_Draz_Nurakk = 18,
BT_Zek = 19, //"creatures from the Plane of War."
BT_Luggald = 20,
BT_Animal = 21,
BT_Insect = 22,
@@ -45,17 +47,18 @@ typedef enum {
BT_Dragon = 26,
BT_Summoned2 = 27,
BT_Summoned3 = 28,
//29
BT_Dragon2 = 29, //database data indicates this is a dragon type (kunark and DoN?)
BT_VeliousDragon = 30, //might not be a tight set
// ...
BT_Familiar = 31,
BT_Dragon3 = 32,
BT_Boxes = 33,
BT_Muramite = 34, //tribal dudes
// ...
BT_NoTarget2 = 60,
// ...
BT_SwarmPet = 63, //is this valid, or made up?
// ...
BT_SwarmPet = 63, //Looks like weapon proc related temp pets and few misc pets, should not be used for checking swarm pets in general.
BT_MonsterSummon = 64,
// 65, trap or effect related?
BT_InvisMan = 66, //no name, seen on 'InvisMan', can be /targeted
BT_Special = 67
} bodyType;
+536 -105
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,229 +18,332 @@
#include "../common/global_define.h"
#include "../common/classes.h"
const char* GetEQClassName(uint8 class_, uint8 level) {
switch(class_) {
const char *GetClassIDName(uint8 class_id, uint8 level)
{
switch (class_id) {
case WARRIOR:
if (level >= 70)
if (level >= 70) {
return "Vanquisher";
else if (level >= 65)
}
else if (level >= 65) {
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
else if (level >= 60)
}
else if (level >= 60) {
return "Warlord";
else if (level >= 55)
}
else if (level >= 55) {
return "Myrmidon";
else if (level >= 51)
}
else if (level >= 51) {
return "Champion";
else
}
else {
return "Warrior";
}
case CLERIC:
if (level >= 70)
if (level >= 70) {
return "Prelate";
else if (level >= 65)
}
else if (level >= 65) {
return "Archon";
else if (level >= 60)
}
else if (level >= 60) {
return "High Priest";
else if (level >= 55)
}
else if (level >= 55) {
return "Templar";
else if (level >= 51)
}
else if (level >= 51) {
return "Vicar";
else
}
else {
return "Cleric";
}
case PALADIN:
if (level >= 70)
if (level >= 70) {
return "Lord";
else if (level >= 65)
}
else if (level >= 65) {
return "Lord Protector";
else if (level >= 60)
}
else if (level >= 60) {
return "Crusader";
else if (level >= 55)
}
else if (level >= 55) {
return "Knight";
else if (level >= 51)
}
else if (level >= 51) {
return "Cavalier";
else
}
else {
return "Paladin";
}
case RANGER:
if (level >= 70)
if (level >= 70) {
return "Plainswalker";
else if (level >= 65)
}
else if (level >= 65) {
return "Forest Stalker";
else if (level >= 60)
}
else if (level >= 60) {
return "Warder";
else if (level >= 55)
}
else if (level >= 55) {
return "Outrider";
else if (level >= 51)
}
else if (level >= 51) {
return "Pathfinder";
else
}
else {
return "Ranger";
}
case SHADOWKNIGHT:
if (level >= 70)
if (level >= 70) {
return "Scourge Knight";
else if (level >= 65)
}
else if (level >= 65) {
return "Dread Lord";
else if (level >= 60)
}
else if (level >= 60) {
return "Grave Lord";
else if (level >= 55)
}
else if (level >= 55) {
return "Revenant";
else if (level >= 51)
}
else if (level >= 51) {
return "Reaver";
else
}
else {
return "Shadowknight";
}
case DRUID:
if (level >= 70)
if (level >= 70) {
return "Natureguard";
else if (level >= 65)
}
else if (level >= 65) {
return "Storm Warden";
else if (level >= 60)
}
else if (level >= 60) {
return "Hierophant";
else if (level >= 55)
}
else if (level >= 55) {
return "Preserver";
else if (level >= 51)
}
else if (level >= 51) {
return "Wanderer";
else
}
else {
return "Druid";
}
case MONK:
if (level >= 70)
if (level >= 70) {
return "Stone Fist";
else if (level >= 65)
}
else if (level >= 65) {
return "Transcendent";
else if (level >= 60)
}
else if (level >= 60) {
return "Grandmaster";
else if (level >= 55)
}
else if (level >= 55) {
return "Master";
else if (level >= 51)
}
else if (level >= 51) {
return "Disciple";
else
}
else {
return "Monk";
}
case BARD:
if (level >= 70)
if (level >= 70) {
return "Performer";
else if (level >= 65)
}
else if (level >= 65) {
return "Maestro";
else if (level >= 60)
}
else if (level >= 60) {
return "Virtuoso";
else if (level >= 55)
}
else if (level >= 55) {
return "Troubadour";
else if (level >= 51)
}
else if (level >= 51) {
return "Minstrel";
else
}
else {
return "Bard";
}
case ROGUE:
if (level >= 70)
if (level >= 70) {
return "Nemesis";
else if (level >= 65)
}
else if (level >= 65) {
return "Deceiver";
else if (level >= 60)
}
else if (level >= 60) {
return "Assassin";
else if (level >= 55)
}
else if (level >= 55) {
return "Blackguard";
else if (level >= 51)
}
else if (level >= 51) {
return "Rake";
else
}
else {
return "Rogue";
}
case SHAMAN:
if (level >= 70)
if (level >= 70) {
return "Soothsayer";
else if (level >= 65)
}
else if (level >= 65) {
return "Prophet";
else if (level >= 60)
}
else if (level >= 60) {
return "Oracle";
else if (level >= 55)
}
else if (level >= 55) {
return "Luminary";
else if (level >= 51)
}
else if (level >= 51) {
return "Mystic";
else
}
else {
return "Shaman";
}
case NECROMANCER:
if (level >= 70)
if (level >= 70) {
return "Wraith";
else if (level >= 65)
}
else if (level >= 65) {
return "Arch Lich";
else if (level >= 60)
}
else if (level >= 60) {
return "Warlock";
else if (level >= 55)
}
else if (level >= 55) {
return "Defiler";
else if (level >= 51)
}
else if (level >= 51) {
return "Heretic";
else
}
else {
return "Necromancer";
}
case WIZARD:
if (level >= 70)
if (level >= 70) {
return "Grand Arcanist";
else if (level >= 65)
}
else if (level >= 65) {
return "Arcanist";
else if (level >= 60)
}
else if (level >= 60) {
return "Sorcerer";
else if (level >= 55)
}
else if (level >= 55) {
return "Evoker";
else if (level >= 51)
}
else if (level >= 51) {
return "Channeler";
else
}
else {
return "Wizard";
}
case MAGICIAN:
if (level >= 70)
if (level >= 70) {
return "Arch Magus";
else if (level >= 65)
}
else if (level >= 65) {
return "Arch Convoker";
else if (level >= 60)
}
else if (level >= 60) {
return "Arch Mage";
else if (level >= 55)
}
else if (level >= 55) {
return "Conjurer";
if (level >= 51)
}
if (level >= 51) {
return "Elementalist";
else
}
else {
return "Magician";
}
case ENCHANTER:
if (level >= 70)
if (level >= 70) {
return "Bedazzler";
else if (level >= 65)
}
else if (level >= 65) {
return "Coercer";
else if (level >= 60)
}
else if (level >= 60) {
return "Phantasmist";
else if (level >= 55)
}
else if (level >= 55) {
return "Beguiler";
else if (level >= 51)
}
else if (level >= 51) {
return "Illusionist";
else
}
else {
return "Enchanter";
}
case BEASTLORD:
if (level >= 70)
if (level >= 70) {
return "Wildblood";
else if (level >= 65)
}
else if (level >= 65) {
return "Feral Lord";
else if (level >= 60)
}
else if (level >= 60) {
return "Savage Lord";
else if (level >= 55)
}
else if (level >= 55) {
return "Animist";
else if (level >= 51)
}
else if (level >= 51) {
return "Primalist";
else
}
else {
return "Beastlord";
}
case BERSERKER:
if (level >= 70)
if (level >= 70) {
return "Ravager";
else if (level >= 65)
}
else if (level >= 65) {
return "Fury";
else if (level >= 60)
}
else if (level >= 60) {
return "Rager";
else if (level >= 55)
}
else if (level >= 55) {
return "Vehement";
else if (level >= 51)
}
else if (level >= 51) {
return "Brawler";
else
}
else {
return "Berserker";
}
case BANKER:
if (level >= 70)
if (level >= 70) {
return "Master Banker";
else if (level >= 65)
}
else if (level >= 65) {
return "Elder Banker";
else if (level >= 60)
}
else if (level >= 60) {
return "Oldest Banker";
else if (level >= 55)
}
else if (level >= 55) {
return "Older Banker";
else if (level >= 51)
}
else if (level >= 51) {
return "Old Banker";
else
}
else {
return "Banker";
}
case WARRIORGM:
return "Warrior Guildmaster";
case CLERICGM:
@@ -275,6 +378,8 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
return "Berserker Guildmaster";
case MERCHANT:
return "Merchant";
case DISCORD_MERCHANT:
return "Discord Merchant";
case ADVENTURERECRUITER:
return "Adventure Recruiter";
case ADVENTUREMERCHANT:
@@ -285,8 +390,334 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
return "Tribute Master";
case GUILD_TRIBUTE_MASTER:
return "Guild Tribute Master";
case GUILD_BANKER:
return "Guild Banker";
case NORRATHS_KEEPERS_MERCHANT:
return "Radiant Crystal Merchant";
case DARK_REIGN_MERCHANT:
return "Ebon Crystal Merchant";
case FELLOWSHIP_MASTER:
return "Fellowship Master";
case ALT_CURRENCY_MERCHANT:
return "Alternate Currency Merchant";
case MERCERNARY_MASTER:
return "Mercenary Liaison";
default:
return "Unknown";
}
}
const char *GetPlayerClassName(uint32 player_class_value, uint8 level)
{
return GetClassIDName(GetClassIDFromPlayerClassValue(player_class_value), level);
}
uint32 GetPlayerClassValue(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case DRUID:
case MONK:
case BARD:
case ROGUE:
case SHAMAN:
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
case BEASTLORD:
case BERSERKER:
return class_id;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
uint32 GetPlayerClassBit(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
return PLAYER_CLASS_WARRIOR_BIT;
case CLERIC:
return PLAYER_CLASS_CLERIC_BIT;
case PALADIN:
return PLAYER_CLASS_PALADIN_BIT;
case RANGER:
return PLAYER_CLASS_RANGER_BIT;
case SHADOWKNIGHT:
return PLAYER_CLASS_SHADOWKNIGHT_BIT;
case DRUID:
return PLAYER_CLASS_DRUID_BIT;
case MONK:
return PLAYER_CLASS_MONK_BIT;
case BARD:
return PLAYER_CLASS_BARD_BIT;
case ROGUE:
return PLAYER_CLASS_ROGUE_BIT;
case SHAMAN:
return PLAYER_CLASS_SHAMAN_BIT;
case NECROMANCER:
return PLAYER_CLASS_NECROMANCER_BIT;
case WIZARD:
return PLAYER_CLASS_WIZARD_BIT;
case MAGICIAN:
return PLAYER_CLASS_MAGICIAN_BIT;
case ENCHANTER:
return PLAYER_CLASS_ENCHANTER_BIT;
case BEASTLORD:
return PLAYER_CLASS_BEASTLORD_BIT;
case BERSERKER:
return PLAYER_CLASS_BERSERKER_BIT;
default:
return PLAYER_CLASS_UNKNOWN_BIT;
}
}
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value)
{
switch (player_class_value) {
case PLAYER_CLASS_WARRIOR:
case PLAYER_CLASS_CLERIC:
case PLAYER_CLASS_PALADIN:
case PLAYER_CLASS_RANGER:
case PLAYER_CLASS_SHADOWKNIGHT:
case PLAYER_CLASS_DRUID:
case PLAYER_CLASS_MONK:
case PLAYER_CLASS_BARD:
case PLAYER_CLASS_ROGUE:
case PLAYER_CLASS_SHAMAN:
case PLAYER_CLASS_NECROMANCER:
case PLAYER_CLASS_WIZARD:
case PLAYER_CLASS_MAGICIAN:
case PLAYER_CLASS_ENCHANTER:
case PLAYER_CLASS_BEASTLORD:
case PLAYER_CLASS_BERSERKER:
return player_class_value;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit)
{
switch (player_class_bit) {
case PLAYER_CLASS_WARRIOR_BIT:
return WARRIOR;
case PLAYER_CLASS_CLERIC_BIT:
return CLERIC;
case PLAYER_CLASS_PALADIN_BIT:
return PALADIN;
case PLAYER_CLASS_RANGER_BIT:
return RANGER;
case PLAYER_CLASS_SHADOWKNIGHT_BIT:
return SHADOWKNIGHT;
case PLAYER_CLASS_DRUID_BIT:
return DRUID;
case PLAYER_CLASS_MONK_BIT:
return MONK;
case PLAYER_CLASS_BARD_BIT:
return BARD;
case PLAYER_CLASS_ROGUE_BIT:
return ROGUE;
case PLAYER_CLASS_SHAMAN_BIT:
return SHAMAN;
case PLAYER_CLASS_NECROMANCER_BIT:
return NECROMANCER;
case PLAYER_CLASS_WIZARD_BIT:
return WIZARD;
case PLAYER_CLASS_MAGICIAN_BIT:
return MAGICIAN;
case PLAYER_CLASS_ENCHANTER_BIT:
return ENCHANTER;
case PLAYER_CLASS_BEASTLORD_BIT:
return BEASTLORD;
case PLAYER_CLASS_BERSERKER_BIT:
return BERSERKER;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
bool IsFighterClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case MONK:
case BARD:
case ROGUE:
case BEASTLORD:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsSpellFighterClass(uint8 class_id)
{
switch (class_id) {
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case BEASTLORD:
return true;
default:
return false;
}
}
bool IsNonSpellFighterClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case MONK:
case BARD:
case ROGUE:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsHybridClass(uint8 class_id)
{
switch (class_id) {
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case BARD:
case BEASTLORD:
return true;
default:
return false;
}
}
bool IsCasterClass(uint8 class_id)
{
switch (class_id) {
case CLERIC:
case DRUID:
case SHAMAN:
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
bool IsINTCasterClass(uint8 class_id)
{
switch (class_id) {
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
bool IsWISCasterClass(uint8 class_id)
{
switch (class_id) {
case CLERIC:
case DRUID:
case SHAMAN:
return true;
default:
return false;
}
}
bool IsPlateClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case SHADOWKNIGHT:
case BARD:
return true;
default:
return false;
}
}
bool IsChainClass(uint8 class_id)
{
switch (class_id) {
case RANGER:
case ROGUE:
case SHAMAN:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsLeatherClass(uint8 class_id)
{
switch (class_id) {
case DRUID:
case MONK:
case BEASTLORD:
return true;
default:
return false;
}
}
bool IsClothClass(uint8 class_id)
{
switch (class_id) {
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
uint8 ClassArmorType(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case SHADOWKNIGHT:
case BARD:
return ARMOR_TYPE_PLATE;
case RANGER:
case ROGUE:
case SHAMAN:
case BERSERKER:
return ARMOR_TYPE_CHAIN;
case DRUID:
case MONK:
case BEASTLORD:
return ARMOR_TYPE_LEATHER;
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return ARMOR_TYPE_CLOTH;
default:
return ARMOR_TYPE_UNKNOWN;
}
}
+102 -42
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,26 +17,25 @@
*/
#ifndef CLASSES_CH
#define CLASSES_CH
#include "../common/types.h"
#define Array_Class_UNKNOWN 0
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define PLAYER_CLASS_COUNT 16 // used for array defines, must be the count of playable classes
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define WARRIORGM 20
#define CLERICGM 21
#define PALADINGM 22
@@ -58,33 +57,94 @@
#define DISCORD_MERCHANT 59
#define ADVENTURERECRUITER 60
#define ADVENTUREMERCHANT 61
#define LDON_TREASURE 62 //objects you can use /open on first seen in LDONs
#define CORPSE_CLASS 62 //only seen on Danvi's Corpse in Akheva so far..
#define TRIBUTE_MASTER 63
#define GUILD_TRIBUTE_MASTER 64 //not sure
#define LDON_TREASURE 62 // objects you can use /open on first seen in LDONs
#define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far..
#define TRIBUTE_MASTER 63
#define GUILD_TRIBUTE_MASTER 64 // not sure
#define GUILD_BANKER 66
#define NORRATHS_KEEPERS_MERCHANT 67
#define DARK_REIGN_MERCHANT 68
#define FELLOWSHIP_MASTER 69
#define ALT_CURRENCY_MERCHANT 70
#define MERCERNARY_MASTER 71
#define warrior_1 1
#define monk_1 64
#define paladin_1 4
#define shadow_1 16
#define bard_1 128
#define cleric_1 2
#define necromancer_1 1024
#define ranger_1 8
#define druid_1 32
#define mage_1 4096
#define wizard_1 2048
#define enchanter_1 8192
#define rogue_1 256
#define shaman_1 512
#define beastlord_1 16384
#define berserker_1 32768
#define call_1 65536
const char* GetEQClassName(uint8 class_, uint8 level = 0);
// player class values
#define PLAYER_CLASS_UNKNOWN 0
#define PLAYER_CLASS_WARRIOR 1
#define PLAYER_CLASS_CLERIC 2
#define PLAYER_CLASS_PALADIN 3
#define PLAYER_CLASS_RANGER 4
#define PLAYER_CLASS_SHADOWKNIGHT 5
#define PLAYER_CLASS_DRUID 6
#define PLAYER_CLASS_MONK 7
#define PLAYER_CLASS_BARD 8
#define PLAYER_CLASS_ROGUE 9
#define PLAYER_CLASS_SHAMAN 10
#define PLAYER_CLASS_NECROMANCER 11
#define PLAYER_CLASS_WIZARD 12
#define PLAYER_CLASS_MAGICIAN 13
#define PLAYER_CLASS_ENCHANTER 14
#define PLAYER_CLASS_BEASTLORD 15
#define PLAYER_CLASS_BERSERKER 16
#define PLAYER_CLASS_COUNT 16
// player class bits
#define PLAYER_CLASS_UNKNOWN_BIT 0
#define PLAYER_CLASS_WARRIOR_BIT 1
#define PLAYER_CLASS_CLERIC_BIT 2
#define PLAYER_CLASS_PALADIN_BIT 4
#define PLAYER_CLASS_RANGER_BIT 8
#define PLAYER_CLASS_SHADOWKNIGHT_BIT 16
#define PLAYER_CLASS_DRUID_BIT 32
#define PLAYER_CLASS_MONK_BIT 64
#define PLAYER_CLASS_BARD_BIT 128
#define PLAYER_CLASS_ROGUE_BIT 256
#define PLAYER_CLASS_SHAMAN_BIT 512
#define PLAYER_CLASS_NECROMANCER_BIT 1024
#define PLAYER_CLASS_WIZARD_BIT 2048
#define PLAYER_CLASS_MAGICIAN_BIT 4096
#define PLAYER_CLASS_ENCHANTER_BIT 8192
#define PLAYER_CLASS_BEASTLORD_BIT 16384
#define PLAYER_CLASS_BERSERKER_BIT 32768
#define PLAYER_CLASS_ALL_MASK 65535 // was 65536
#define ARMOR_TYPE_UNKNOWN 0
#define ARMOR_TYPE_CLOTH 1
#define ARMOR_TYPE_LEATHER 2
#define ARMOR_TYPE_CHAIN 3
#define ARMOR_TYPE_PLATE 4
#define ARMOR_TYPE_FIRST ARMOR_TYPE_UNKNOWN
#define ARMOR_TYPE_LAST ARMOR_TYPE_PLATE
#define ARMOR_TYPE_COUNT 5
const char* GetClassIDName(uint8 class_id, uint8 level = 0);
const char* GetPlayerClassName(uint32 player_class_value, uint8 level = 0);
uint32 GetPlayerClassValue(uint8 class_id);
uint32 GetPlayerClassBit(uint8 class_id);
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value);
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit);
bool IsFighterClass(uint8 class_id);
bool IsSpellFighterClass(uint8 class_id);
bool IsNonSpellFighterClass(uint8 class_id);
bool IsHybridClass(uint8 class_id);
bool IsCasterClass(uint8 class_id);
bool IsINTCasterClass(uint8 class_id);
bool IsWISCasterClass(uint8 class_id);
bool IsPlateClass(uint8 class_id);
bool IsChainClass(uint8 class_id);
bool IsLeatherClass(uint8 class_id);
bool IsClothClass(uint8 class_id);
uint8 ClassArmorType(uint8 class_id);
#endif
+434
View File
@@ -0,0 +1,434 @@
#pragma once
#include <algorithm>
#include <sstream>
#include <limits>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <cassert>
namespace argh
{
// Terminology:
// A command line is composed of 2 types of args:
// 1. Positional args, i.e. free standing values
// 2. Options: args beginning with '-'. We identify two kinds:
// 2.1: Flags: boolean options => (exist ? true : false)
// 2.2: Parameters: a name followed by a non-option value
#if !defined(__GNUC__) || (__GNUC__ >= 5)
using string_stream = std::istringstream;
#else
// Until GCC 5, istringstream did not have a move constructor.
// stringstream_proxy is used instead, as a workaround.
class stringstream_proxy
{
public:
stringstream_proxy() = default;
// Construct with a value.
stringstream_proxy(std::string const& value) :
stream_(value)
{}
// Copy constructor.
stringstream_proxy(const stringstream_proxy& other) :
stream_(other.stream_.str())
{
stream_.setstate(other.stream_.rdstate());
}
void setstate(std::ios_base::iostate state) { stream_.setstate(state); }
// Stream out the value of the parameter.
// If the conversion was not possible, the stream will enter the fail state,
// and operator bool will return false.
template<typename T>
stringstream_proxy& operator >> (T& thing)
{
stream_ >> thing;
return *this;
}
// Get the string value.
std::string str() const { return stream_.str(); }
std::stringbuf* rdbuf() const { return stream_.rdbuf(); }
// Check the state of the stream.
// False when the most recent stream operation failed
operator bool() const { return !!stream_; }
~stringstream_proxy() = default;
private:
std::istringstream stream_;
};
using string_stream = stringstream_proxy;
#endif
class parser
{
public:
enum Mode { PREFER_FLAG_FOR_UNREG_OPTION = 1 << 0,
PREFER_PARAM_FOR_UNREG_OPTION = 1 << 1,
NO_SPLIT_ON_EQUALSIGN = 1 << 2,
SINGLE_DASH_IS_MULTIFLAG = 1 << 3,
};
parser() = default;
parser(std::initializer_list<char const* const> pre_reg_names)
{ add_params(pre_reg_names); }
parser(const char* const argv[], int mode = PREFER_FLAG_FOR_UNREG_OPTION)
{ parse(argv, mode); }
parser(int argc, const char* const argv[], int mode = PREFER_FLAG_FOR_UNREG_OPTION)
{ parse(argc, argv, mode); }
void add_param(std::string const& name);
void add_params(std::initializer_list<char const* const> init_list);
void parse(const char* const argv[], int mode = PREFER_FLAG_FOR_UNREG_OPTION);
void parse(int argc, const char* const argv[], int mode = PREFER_FLAG_FOR_UNREG_OPTION);
std::multiset<std::string> const& flags() const { return flags_; }
std::map<std::string, std::string> const& params() const { return params_; }
std::vector<std::string> const& pos_args() const { return pos_args_; }
// begin() and end() for using range-for over positional args.
std::vector<std::string>::const_iterator begin() const { return pos_args_.cbegin(); }
std::vector<std::string>::const_iterator end() const { return pos_args_.cend(); }
size_t size() const { return pos_args_.size(); }
//////////////////////////////////////////////////////////////////////////
// Accessors
// flag (boolean) accessors: return true if the flag appeared, otherwise false.
bool operator[](std::string const& name) const;
// multiple flag (boolean) accessors: return true if at least one of the flag appeared, otherwise false.
bool operator[](std::initializer_list<char const* const> init_list) const;
// returns positional arg string by order. Like argv[] but without the options
std::string const& operator[](size_t ind) const;
// returns a std::istream that can be used to convert a positional arg to a typed value.
string_stream operator()(size_t ind) const;
// same as above, but with a default value in case the arg is missing (index out of range).
template<typename T>
string_stream operator()(size_t ind, T&& def_val) const;
// parameter accessors, give a name get an std::istream that can be used to convert to a typed value.
// call .str() on result to get as string
string_stream operator()(std::string const& name) const;
// accessor for a parameter with multiple names, give a list of names, get an std::istream that can be used to convert to a typed value.
// call .str() on result to get as string
// returns the first value in the list to be found.
string_stream operator()(std::initializer_list<char const* const> init_list) const;
// same as above, but with a default value in case the param was missing.
// Non-string def_val types must have an operator<<() (output stream operator)
// If T only has an input stream operator, pass the string version of the type as in "3" instead of 3.
template<typename T>
string_stream operator()(std::string const& name, T&& def_val) const;
// same as above but for a list of names. returns the first value to be found.
template<typename T>
string_stream operator()(std::initializer_list<char const* const> init_list, T&& def_val) const;
private:
string_stream bad_stream() const;
std::string trim_leading_dashes(std::string const& name) const;
bool is_number(std::string const& arg) const;
bool is_option(std::string const& arg) const;
bool got_flag(std::string const& name) const;
bool is_param(std::string const& name) const;
private:
std::vector<std::string> args_;
std::map<std::string, std::string> params_;
std::vector<std::string> pos_args_;
std::multiset<std::string> flags_;
std::set<std::string> registeredParams_;
std::string empty_;
};
//////////////////////////////////////////////////////////////////////////
inline void parser::parse(const char * const argv[], int mode)
{
int argc = 0;
for (auto argvp = argv; *argvp; ++argc, ++argvp);
parse(argc, argv, mode);
}
//////////////////////////////////////////////////////////////////////////
inline void parser::parse(int argc, const char* const argv[], int mode /*= PREFER_FLAG_FOR_UNREG_OPTION*/)
{
// convert to strings
args_.resize(argc);
std::transform(argv, argv + argc, args_.begin(), [](const char* const arg) { return arg; });
// parse line
for (auto i = 0u; i < args_.size(); ++i)
{
if (!is_option(args_[i]))
{
pos_args_.emplace_back(args_[i]);
continue;
}
auto name = trim_leading_dashes(args_[i]);
if (!(mode & NO_SPLIT_ON_EQUALSIGN))
{
auto equalPos = name.find('=');
if (equalPos != std::string::npos)
{
params_.insert({ name.substr(0, equalPos), name.substr(equalPos + 1) });
continue;
}
}
// if the option is unregistered and should be a multi-flag
if (1 == (args_[i].size() - name.size()) && // single dash
argh::parser::SINGLE_DASH_IS_MULTIFLAG & mode && // multi-flag mode
!is_param(name)) // unregistered
{
std::string keep_param;
if (!name.empty() && is_param(std::string(1ul, name.back()))) // last char is param
{
keep_param += name.back();
name.resize(name.size() - 1);
}
for (auto const& c : name)
{
flags_.emplace(std::string{ c });
}
if (!keep_param.empty())
{
name = keep_param;
}
else
{
continue; // do not consider other options for this arg
}
}
// any potential option will get as its value the next arg, unless that arg is an option too
// in that case it will be determined a flag.
if (i == args_.size() - 1 || is_option(args_[i + 1]))
{
flags_.emplace(name);
continue;
}
// if 'name' is a pre-registered option, then the next arg cannot be a free parameter to it is skipped
// otherwise we have 2 modes:
// PREFER_FLAG_FOR_UNREG_OPTION: a non-registered 'name' is determined a flag.
// The following value (the next arg) will be a free parameter.
//
// PREFER_PARAM_FOR_UNREG_OPTION: a non-registered 'name' is determined a parameter, the next arg
// will be the value of that option.
assert(!(mode & argh::parser::PREFER_FLAG_FOR_UNREG_OPTION)
|| !(mode & argh::parser::PREFER_PARAM_FOR_UNREG_OPTION));
bool preferParam = mode & argh::parser::PREFER_PARAM_FOR_UNREG_OPTION;
if (is_param(name) || preferParam)
{
params_.insert({ name, args_[i + 1] });
++i; // skip next value, it is not a free parameter
continue;
}
else
{
flags_.emplace(name);
}
};
}
//////////////////////////////////////////////////////////////////////////
inline string_stream parser::bad_stream() const
{
string_stream bad;
bad.setstate(std::ios_base::failbit);
return bad;
}
//////////////////////////////////////////////////////////////////////////
inline bool parser::is_number(std::string const& arg) const
{
// inefficient but simple way to determine if a string is a number (which can start with a '-')
std::istringstream istr(arg);
double number;
istr >> number;
return !(istr.fail() || istr.bad());
}
//////////////////////////////////////////////////////////////////////////
inline bool parser::is_option(std::string const& arg) const
{
assert(0 != arg.size());
if (is_number(arg))
return false;
return '-' == arg[0];
}
//////////////////////////////////////////////////////////////////////////
inline std::string parser::trim_leading_dashes(std::string const& name) const
{
auto pos = name.find_first_not_of('-');
return std::string::npos != pos ? name.substr(pos) : name;
}
//////////////////////////////////////////////////////////////////////////
inline bool argh::parser::got_flag(std::string const& name) const
{
return flags_.end() != flags_.find(trim_leading_dashes(name));
}
//////////////////////////////////////////////////////////////////////////
inline bool argh::parser::is_param(std::string const& name) const
{
return registeredParams_.count(name);
}
//////////////////////////////////////////////////////////////////////////
inline bool parser::operator[](std::string const& name) const
{
return got_flag(name);
}
//////////////////////////////////////////////////////////////////////////
inline bool parser::operator[](std::initializer_list<char const* const> init_list) const
{
return std::any_of(init_list.begin(), init_list.end(), [&](char const* const name) { return got_flag(name); });
}
//////////////////////////////////////////////////////////////////////////
inline std::string const& parser::operator[](size_t ind) const
{
if (ind < pos_args_.size())
return pos_args_[ind];
return empty_;
}
//////////////////////////////////////////////////////////////////////////
inline string_stream parser::operator()(std::string const& name) const
{
auto optIt = params_.find(trim_leading_dashes(name));
if (params_.end() != optIt)
return string_stream(optIt->second);
return bad_stream();
}
//////////////////////////////////////////////////////////////////////////
inline string_stream parser::operator()(std::initializer_list<char const* const> init_list) const
{
for (auto& name : init_list)
{
auto optIt = params_.find(trim_leading_dashes(name));
if (params_.end() != optIt)
return string_stream(optIt->second);
}
return bad_stream();
}
//////////////////////////////////////////////////////////////////////////
template<typename T>
string_stream parser::operator()(std::string const& name, T&& def_val) const
{
auto optIt = params_.find(trim_leading_dashes(name));
if (params_.end() != optIt)
return string_stream(optIt->second);
std::ostringstream ostr;
ostr.precision(std::numeric_limits<long double>::max_digits10);
ostr << def_val;
return string_stream(ostr.str()); // use default
}
//////////////////////////////////////////////////////////////////////////
// same as above but for a list of names. returns the first value to be found.
template<typename T>
string_stream parser::operator()(std::initializer_list<char const* const> init_list, T&& def_val) const
{
for (auto& name : init_list)
{
auto optIt = params_.find(trim_leading_dashes(name));
if (params_.end() != optIt)
return string_stream(optIt->second);
}
std::ostringstream ostr;
ostr.precision(std::numeric_limits<long double>::max_digits10);
ostr << def_val;
return string_stream(ostr.str()); // use default
}
//////////////////////////////////////////////////////////////////////////
inline string_stream parser::operator()(size_t ind) const
{
if (pos_args_.size() <= ind)
return bad_stream();
return string_stream(pos_args_[ind]);
}
//////////////////////////////////////////////////////////////////////////
template<typename T>
string_stream parser::operator()(size_t ind, T&& def_val) const
{
if (pos_args_.size() <= ind)
{
std::ostringstream ostr;
ostr.precision(std::numeric_limits<long double>::max_digits10);
ostr << def_val;
return string_stream(ostr.str());
}
return string_stream(pos_args_[ind]);
}
//////////////////////////////////////////////////////////////////////////
inline void parser::add_param(std::string const& name)
{
registeredParams_.insert(trim_leading_dashes(name));
}
//////////////////////////////////////////////////////////////////////////
inline void parser::add_params(std::initializer_list<char const* const> init_list)
{
for (auto& name : init_list)
registeredParams_.insert(trim_leading_dashes(name));
}
}
+199
View File
@@ -0,0 +1,199 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <fmt/format.h>
#include "eqemu_command_handler.h"
#include "terminal_color.hpp"
#include "../platform.h"
namespace EQEmuCommand {
std::map<std::string, void (*)(
int argc,
char **argv,
argh::parser &cmd,
std::string &description
)> function_map;
/**
* @param cmd
*/
void DisplayDebug(argh::parser &cmd)
{
if (cmd[{"-d", "--debug"}]) {
std::cout << "Positional args:\n";
for (auto &pos_arg : cmd.pos_args())
std::cout << '\t' << pos_arg << std::endl;
std::cout << "\nFlags:\n";
for (auto &flag : cmd.flags())
std::cout << '\t' << flag << std::endl;
std::cout << "\nParameters:\n";
for (auto &param : cmd.params())
std::cout << '\t' << param.first << " : " << param.second << std::endl;
}
}
/**
* @param arguments
* @param options
* @param cmd
* @param argc
* @param argv
*/
void ValidateCmdInput(
std::vector<std::string> &arguments,
std::vector<std::string> &options,
argh::parser &cmd,
int argc,
char **argv
)
{
bool arguments_filled = true;
int index = 2;
for (auto &arg : arguments) {
if (cmd(arg).str().empty() && cmd(index).str().empty()) {
arguments_filled = false;
}
index++;
}
if (!arguments_filled || argc == 2 || cmd[{"-h", "--help"}]) {
std::string arguments_string;
for (auto &arg : arguments) {
arguments_string += " " + arg;
}
std::string options_string;
for (auto &opt : options) {
options_string += " " + opt + "\n";
}
std::stringstream command_string;
command_string <<
termcolor::colorize <<
termcolor::yellow <<
"\nCommand" <<
termcolor::reset << "\n\n" <<
termcolor::green << argv[1] << arguments_string << termcolor::reset << "\n" <<
termcolor::yellow << (!options_string.empty() ? "\nOptions\n\n" : "") <<
termcolor::reset << termcolor::cyan << options_string << termcolor::reset;
std::cout << command_string.str() << std::endl;
exit(0);
}
}
/**
* @param in_function_map
* @param cmd
* @param argc
* @param argv
*/
void HandleMenu(
std::map<std::string, void (*)(
int argc,
char **argv,
argh::parser &cmd,
std::string &description
)> &in_function_map,
argh::parser &cmd,
int argc,
char **argv
)
{
std::string description;
bool ran_command = false;
for (auto &it: in_function_map) {
if (it.first == argv[1]) {
(it.second)(argc, argv, cmd, description);
ran_command = true;
}
}
if (cmd[{"-h", "--help"}]) {
std::cout << std::endl;
std::cout <<
"> " <<
termcolor::yellow <<
"EQEmulator [" + GetPlatformName() + "] CLI Menu" <<
termcolor::reset
<< std::endl
<< std::endl;
/**
* Get max command length for padding length
*/
int max_command_length = 0;
for (auto &it: in_function_map) {
std::stringstream command;
command << termcolor::colorize << termcolor::yellow << it.first << termcolor::reset;
if (command.str().length() > max_command_length) {
max_command_length = command.str().length() + 1;
}
}
/**
* Display command menu
*/
std::string command_section;
for (auto &it: in_function_map) {
description = "";
(it.second)(argc, argv, cmd, description);
/**
* Print section header
*/
std::string command_prefix = it.first.substr(0, it.first.find(":"));
if (command_prefix.find("test") != std::string::npos) {
continue;
}
if (command_section != command_prefix) {
command_section = command_prefix;
std::cout << termcolor::reset << command_prefix << std::endl;
}
/**
* Print commands
*/
std::stringstream command;
command << termcolor::colorize << termcolor::yellow << it.first << termcolor::reset;
printf(" %-*s %s\n", max_command_length, command.str().c_str(), description.c_str());
}
std::cout << std::endl;
std::exit(0);
}
if (ran_command) {
std::exit(0);
}
}
}
+75
View File
@@ -0,0 +1,75 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef EQEMU_EQEMU_COMMAND_HANDLER_H
#define EQEMU_EQEMU_COMMAND_HANDLER_H
#include "argh.h"
namespace EQEmuCommand {
extern std::map<std::string, void (*)(
int argc,
char **argv,
argh::parser &cmd,
std::string &description
)> function_map;
/**
* @param arguments
* @param options
* @param cmd
* @param argc
* @param argv
*/
void ValidateCmdInput(
std::vector<std::string> &arguments,
std::vector<std::string> &options,
argh::parser &cmd,
int argc,
char **argv
);
/**
* @param cmd
*/
void DisplayDebug(argh::parser &cmd);
/**
* @param in_function_map
* @param cmd
* @param argc
* @param argv
*/
void HandleMenu(
std::map<std::string, void (*)(
int argc,
char **argv,
argh::parser &cmd,
std::string &description
)> &in_function_map,
argh::parser &cmd,
int argc,
char **argv
);
};
#endif //EQEMU_EQEMU_COMMAND_HANDLER_H
+557
View File
@@ -0,0 +1,557 @@
//!
//! termcolor
//! ~~~~~~~~~
//!
//! termcolor is a header-only c++ library for printing colored messages
//! to the terminal. Written just for fun with a help of the Force.
//!
//! :copyright: (c) 2013 by Ihor Kalnytskyi
//! :license: BSD, see LICENSE for details
//!
#ifndef TERMCOLOR_HPP_
#define TERMCOLOR_HPP_
// the following snippet of code detects the current OS and
// defines the appropriate macro that is used to wrap some
// platform specific things
#if defined(_WIN32) || defined(_WIN64)
# define TERMCOLOR_OS_WINDOWS
#elif defined(__APPLE__)
# define TERMCOLOR_OS_MACOS
#elif defined(__unix__) || defined(__unix)
# define TERMCOLOR_OS_LINUX
#else
# error unsupported platform
#endif
// This headers provides the `isatty()`/`fileno()` functions,
// which are used for testing whether a standart stream refers
// to the terminal. As for Windows, we also need WinApi funcs
// for changing colors attributes of the terminal.
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
# include <unistd.h>
#elif defined(TERMCOLOR_OS_WINDOWS)
# include <io.h>
# include <windows.h>
#endif
#include <iostream>
#include <cstdio>
namespace termcolor
{
// Forward declaration of the `_internal` namespace.
// All comments are below.
namespace _internal
{
// An index to be used to access a private storage of I/O streams. See
// colorize / nocolorize I/O manipulators for details.
static int colorize_index = std::ios_base::xalloc();
inline FILE* get_standard_stream(const std::ostream& stream);
inline bool is_colorized(std::ostream& stream);
inline bool is_atty(const std::ostream& stream);
#if defined(TERMCOLOR_OS_WINDOWS)
inline void win_change_attributes(std::ostream& stream, int foreground, int background=-1);
#endif
}
inline
std::ostream& colorize(std::ostream& stream)
{
stream.iword(_internal::colorize_index) = 1L;
return stream;
}
inline
std::ostream& nocolorize(std::ostream& stream)
{
stream.iword(_internal::colorize_index) = 0L;
return stream;
}
inline
std::ostream& reset(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;00m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1, -1);
#endif
}
return stream;
}
inline
std::ostream& bold(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;1m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& dark(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;2m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& underline(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;4m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& blink(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;5m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& reverse(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;7m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& concealed(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;8m";
#elif defined(TERMCOLOR_OS_WINDOWS)
#endif
}
return stream;
}
inline
std::ostream& grey(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;30m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
0 // grey (black)
);
#endif
}
return stream;
}
inline
std::ostream& red(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;31m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& green(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;32m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_GREEN
);
#endif
}
return stream;
}
inline
std::ostream& yellow(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;33m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_GREEN | FOREGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& blue(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;34m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_BLUE
);
#endif
}
return stream;
}
inline
std::ostream& magenta(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;35m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_BLUE | FOREGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& cyan(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;36m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_BLUE | FOREGROUND_GREEN
);
#endif
}
return stream;
}
inline
std::ostream& white(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;37m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream,
FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& on_grey(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;40m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
0 // grey (black)
);
#endif
}
return stream;
}
inline
std::ostream& on_red(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;41m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& on_green(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;42m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_GREEN
);
#endif
}
return stream;
}
inline
std::ostream& on_yellow(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;43m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_GREEN | BACKGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& on_blue(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;44m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_BLUE
);
#endif
}
return stream;
}
inline
std::ostream& on_magenta(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;45m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_BLUE | BACKGROUND_RED
);
#endif
}
return stream;
}
inline
std::ostream& on_cyan(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;46m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_GREEN | BACKGROUND_BLUE
);
#endif
}
return stream;
}
inline
std::ostream& on_white(std::ostream& stream)
{
if (_internal::is_colorized(stream))
{
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
stream << "\e[1;47m";
#elif defined(TERMCOLOR_OS_WINDOWS)
_internal::win_change_attributes(stream, -1,
BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
);
#endif
}
return stream;
}
//! Since C++ hasn't a way to hide something in the header from
//! the outer access, I have to introduce this namespace which
//! is used for internal purpose and should't be access from
//! the user code.
namespace _internal
{
//! Since C++ hasn't a true way to extract stream handler
//! from the a given `std::ostream` object, I have to write
//! this kind of hack.
inline
FILE* get_standard_stream(const std::ostream& stream)
{
if (&stream == &std::cout)
return stdout;
else if ((&stream == &std::cerr) || (&stream == &std::clog))
return stderr;
return 0;
}
// Say whether a given stream should be colorized or not. It's always
// true for ATTY streams and may be true for streams marked with
// colorize flag.
inline
bool is_colorized(std::ostream& stream)
{
return is_atty(stream) || static_cast<bool>(stream.iword(colorize_index));
}
//! Test whether a given `std::ostream` object refers to
//! a terminal.
inline
bool is_atty(const std::ostream& stream)
{
FILE* std_stream = get_standard_stream(stream);
// Unfortunately, fileno() ends with segmentation fault
// if invalid file descriptor is passed. So we need to
// handle this case gracefully and assume it's not a tty
// if standard stream is not detected, and 0 is returned.
if (!std_stream)
return false;
#if defined(TERMCOLOR_OS_MACOS) || defined(TERMCOLOR_OS_LINUX)
return ::isatty(fileno(std_stream));
#elif defined(TERMCOLOR_OS_WINDOWS)
return ::_isatty(_fileno(std_stream));
#endif
}
#if defined(TERMCOLOR_OS_WINDOWS)
//! Change Windows Terminal colors attribute. If some
//! parameter is `-1` then attribute won't changed.
inline void win_change_attributes(std::ostream& stream, int foreground, int background)
{
// yeah, i know.. it's ugly, it's windows.
static WORD defaultAttributes = 0;
// Windows doesn't have ANSI escape sequences and so we use special
// API to change Terminal output color. That means we can't
// manipulate colors by means of "std::stringstream" and hence
// should do nothing in this case.
if (!_internal::is_atty(stream))
return;
// get terminal handle
HANDLE hTerminal = INVALID_HANDLE_VALUE;
if (&stream == &std::cout)
hTerminal = GetStdHandle(STD_OUTPUT_HANDLE);
else if (&stream == &std::cerr)
hTerminal = GetStdHandle(STD_ERROR_HANDLE);
// save default terminal attributes if it unsaved
if (!defaultAttributes)
{
CONSOLE_SCREEN_BUFFER_INFO info;
if (!GetConsoleScreenBufferInfo(hTerminal, &info))
return;
defaultAttributes = info.wAttributes;
}
// restore all default settings
if (foreground == -1 && background == -1)
{
SetConsoleTextAttribute(hTerminal, defaultAttributes);
return;
}
// get current settings
CONSOLE_SCREEN_BUFFER_INFO info;
if (!GetConsoleScreenBufferInfo(hTerminal, &info))
return;
if (foreground != -1)
{
info.wAttributes &= ~(info.wAttributes & 0x0F);
info.wAttributes |= static_cast<WORD>(foreground);
}
if (background != -1)
{
info.wAttributes &= ~(info.wAttributes & 0xF0);
info.wAttributes |= static_cast<WORD>(background);
}
SetConsoleTextAttribute(hTerminal, info.wAttributes);
}
#endif // TERMCOLOR_OS_WINDOWS
} // namespace _internal
} // namespace termcolor
#undef TERMCOLOR_OS_WINDOWS
#undef TERMCOLOR_OS_MACOS
#undef TERMCOLOR_OS_LINUX
#endif // TERMCOLOR_HPP_
-153
View File
@@ -1,153 +0,0 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CLIENTVERSIONS_H
#define CLIENTVERSIONS_H
#include "types.h"
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_UF = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_RoF2 = 64;
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UFAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
enum class ClientVersion
{
Unknown = 0,
Client62, // Build: 'Aug 4 2005 15:40:59'
Titanium, // Build: 'Oct 31 2005 10:33:37'
SoF, // Build: 'Sep 7 2007 09:11:49'
SoD, // Build: 'Dec 19 2008 15:22:49'
UF, // Build: 'Jun 8 2010 16:44:32'
RoF, // Build: 'Dec 10 2012 17:35:44'
RoF2, // Build: 'May 10 2013 23:30:08'
MobNPC,
MobMerc,
MobBot,
MobPet,
};
#define CLIENT_VERSION_COUNT 12
#define LAST_PC_CLIENT ClientVersion::RoF2
#define LAST_NPC_CLIENT ClientVersion::MobPet
static const char* ClientVersionName(ClientVersion version)
{
switch (version)
{
case ClientVersion::Unknown:
return "Unknown";
case ClientVersion::Client62:
return "Client62";
case ClientVersion::Titanium:
return "Titanium";
case ClientVersion::SoF:
return "SoF";
case ClientVersion::SoD:
return "SoD";
case ClientVersion::UF:
return "UF";
case ClientVersion::RoF:
return "RoF";
case ClientVersion::RoF2:
return "RoF2";
case ClientVersion::MobNPC:
return "MobNPC";
case ClientVersion::MobMerc:
return "MobMerc";
case ClientVersion::MobBot:
return "MobBot";
case ClientVersion::MobPet:
return "MobPet";
default:
return "<ERROR> Invalid ClientVersion";
};
}
static uint32 ClientBitFromVersion(ClientVersion clientVersion)
{
switch (clientVersion)
{
case ClientVersion::Unknown:
case ClientVersion::Client62:
return 0;
case ClientVersion::Titanium:
case ClientVersion::SoF:
case ClientVersion::SoD:
case ClientVersion::UF:
case ClientVersion::RoF:
case ClientVersion::RoF2:
case ClientVersion::MobNPC:
case ClientVersion::MobMerc:
case ClientVersion::MobBot:
case ClientVersion::MobPet:
return ((uint32)1 << (static_cast<unsigned int>(clientVersion) - 1));
default:
return 0;
}
}
static ClientVersion ClientVersionFromBit(uint32 clientVersionBit)
{
switch (clientVersionBit)
{
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown):
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)):
return ClientVersion::Unknown;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)):
return ClientVersion::Titanium;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)):
return ClientVersion::SoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)):
return ClientVersion::SoD;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)):
return ClientVersion::UF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)):
return ClientVersion::RoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)):
return ClientVersion::RoF2;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobNPC) - 1)):
return ClientVersion::MobNPC;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobMerc) - 1)):
return ClientVersion::MobMerc;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobBot) - 1)):
return ClientVersion::MobBot;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobPet) - 1)):
return ClientVersion::MobPet;
default:
return ClientVersion::Unknown;
}
}
#endif /* CLIENTVERSIONS_H */
+82
View File
@@ -0,0 +1,82 @@
#include "global_define.h"
#include "types.h"
#include <string.h>
#include <zlib.h>
namespace EQ
{
uint32 EstimateDeflateBuffer(uint32 len) {
z_stream zstream;
memset(&zstream, 0, sizeof(zstream));
zstream.zalloc = Z_NULL;
zstream.zfree = Z_NULL;
zstream.opaque = Z_NULL;
if (deflateInit(&zstream, Z_FINISH) != Z_OK)
return 0;
return deflateBound(&zstream, len);
}
uint32 DeflateData(const char *buffer, uint32 len, char *out_buffer, uint32 out_len_max) {
z_stream zstream;
memset(&zstream, 0, sizeof(zstream));
int zerror;
zstream.next_in = const_cast<unsigned char*>(reinterpret_cast<const unsigned char*>(buffer));
zstream.avail_in = len;
zstream.zalloc = Z_NULL;
zstream.zfree = Z_NULL;
zstream.opaque = Z_NULL;
deflateInit(&zstream, Z_FINISH);
zstream.next_out = reinterpret_cast<unsigned char*>(out_buffer);
zstream.avail_out = out_len_max;
zerror = deflate(&zstream, Z_FINISH);
if (zerror == Z_STREAM_END)
{
deflateEnd(&zstream);
return (uint32)zstream.total_out;
}
else
{
zerror = deflateEnd(&zstream);
return 0;
}
}
uint32 InflateData(const char* buffer, uint32 len, char* out_buffer, uint32 out_len_max) {
z_stream zstream;
int zerror = 0;
int i;
zstream.next_in = const_cast<unsigned char*>(reinterpret_cast<const unsigned char*>(buffer));
zstream.avail_in = len;
zstream.next_out = reinterpret_cast<unsigned char*>(out_buffer);;
zstream.avail_out = out_len_max;
zstream.zalloc = Z_NULL;
zstream.zfree = Z_NULL;
zstream.opaque = Z_NULL;
i = inflateInit2(&zstream, 15);
if (i != Z_OK) {
return 0;
}
zerror = inflate(&zstream, Z_FINISH);
if (zerror == Z_STREAM_END) {
inflateEnd(&zstream);
return zstream.total_out;
}
else {
if (zerror == -4 && zstream.msg == 0)
{
return 0;
}
zerror = inflateEnd(&zstream);
return 0;
}
}
}
+8
View File
@@ -0,0 +1,8 @@
#pragma once
namespace EQ
{
uint32 EstimateDeflateBuffer(uint32 len);
uint32 DeflateData(const char *buffer, uint32 len, char *out_buffer, uint32 out_len_max);
uint32 InflateData(const char* buffer, uint32 len, char* out_buffer, uint32 out_len_max);
}
+120
View File
@@ -0,0 +1,120 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "world_content_service.h"
#include "../database.h"
#include "../rulesys.h"
#include "../eqemu_logsys.h"
#include "../repositories/content_flags_repository.h"
WorldContentService::WorldContentService()
{
SetCurrentExpansion(Expansion::EXPANSION_ALL);
}
int WorldContentService::GetCurrentExpansion() const
{
return current_expansion;
}
void WorldContentService::SetExpansionContext()
{
int expansion = RuleI(Expansion, CurrentExpansion);
if (expansion >= Expansion::Classic && expansion <= Expansion::MaxId) {
content_service.SetCurrentExpansion(expansion);
}
LogInfo(
"Current expansion is [{}] ({})",
GetCurrentExpansion(),
GetCurrentExpansionName()
);
}
std::string WorldContentService::GetCurrentExpansionName()
{
if (content_service.GetCurrentExpansion() == Expansion::EXPANSION_ALL) {
return "All Expansions";
}
if (current_expansion >= Expansion::Classic && current_expansion <= Expansion::MaxId) {
return Expansion::ExpansionName[content_service.GetCurrentExpansion()];
}
return "Unknown Expansion";
}
/**
* @param current_expansion
*/
void WorldContentService::SetCurrentExpansion(int current_expansion)
{
WorldContentService::current_expansion = current_expansion;
}
/**
* @return
*/
const std::vector<std::string> &WorldContentService::GetContentFlags() const
{
return content_flags;
}
/**
* @param content_flags
*/
void WorldContentService::SetContentFlags(std::vector<std::string> content_flags)
{
WorldContentService::content_flags = content_flags;
}
/**
* @param content_flag
* @return
*/
bool WorldContentService::IsContentFlagEnabled(const std::string& content_flag)
{
for (auto &flag : GetContentFlags()) {
if (flag == content_flag) {
return true;
}
}
return false;
}
void WorldContentService::ReloadContentFlags(Database &db)
{
std::vector<std::string> set_content_flags;
auto content_flags = ContentFlagsRepository::GetWhere(db, "enabled = 1");
set_content_flags.reserve(content_flags.size());
for (auto &flags: content_flags) {
set_content_flags.push_back(flags.flag_name);
}
LogInfo(
"Enabled content flags [{}]",
implode(", ", set_content_flags)
);
SetContentFlags(set_content_flags);
}
+176
View File
@@ -0,0 +1,176 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef EQEMU_WORLD_CONTENT_SERVICE_H
#define EQEMU_WORLD_CONTENT_SERVICE_H
#include <string>
#include <vector>
class Database;
namespace Expansion {
static const int EXPANSION_ALL = -1;
static const int EXPANSION_FILTER_MAX = 99;
enum ExpansionNumber {
Classic = 0,
TheRuinsOfKunark,
TheScarsOfVelious,
TheShadowsOfLuclin,
ThePlanesOfPower,
TheLegacyOfYkesha,
LostDungeonsOfNorrath,
GatesOfDiscord,
OmensOfWar,
DragonsOfNorrath,
DepthsOfDarkhollow,
ProphecyOfRo,
TheSerpentsSpine,
TheBuriedSea,
SecretsOfFaydwer,
SeedsOfDestruction,
Underfoot,
HouseOfThule,
VeilOfAlaris,
RainOfFear,
CallOfTheForsaken,
TheDarkendSea,
TheBrokenMirror,
EmpiresOfKunark,
RingOfScale,
TheBurningLands,
TormentOfVelious,
MaxId
};
/**
* If you add to this, make sure you update LogCategory
*/
static const char *ExpansionName[ExpansionNumber::MaxId] = {
"Classic",
"The Ruins of Kunark",
"The Scars of Velious",
"The Shadows of Luclin",
"The Planes of Power",
"The Legacy of Ykesha",
"Lost Dungeons of Norrath",
"Gates of Discord",
"Omens of War",
"Dragons of Norrath",
"Depths of Darkhollow",
"Prophecy of Ro",
"The Serpent's Spine",
"The Buried Sea",
"Secrets of Faydwer",
"Seeds of Destruction",
"Underfoot",
"House of Thule",
"Veil of Alaris",
"Rain of Fear",
"Call of the Forsaken",
"The Darkened Sea",
"The Broken Mirror",
"Empires of Kunark",
"Ring of Scale",
"The Burning Lands",
"Torment of Velious",
};
}
class WorldContentService {
public:
WorldContentService();
std::string GetCurrentExpansionName();
int GetCurrentExpansion() const;
void SetCurrentExpansion(int current_expansion);
bool IsClassicEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::Classic || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheRuinsOfKunarkEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheRuinsOfKunark || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheScarsOfVeliousEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheScarsOfVelious || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheShadowsOfLuclinEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheShadowsOfLuclin || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsThePlanesOfPowerEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::ThePlanesOfPower || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheLegacyOfYkeshaEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheLegacyOfYkesha || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsLostDungeonsOfNorrathEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::LostDungeonsOfNorrath || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsGatesOfDiscordEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::GatesOfDiscord || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsOmensOfWarEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::OmensOfWar || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsDragonsOfNorrathEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::DragonsOfNorrath || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsDepthsOfDarkhollowEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::DepthsOfDarkhollow || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsProphecyOfRoEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::ProphecyOfRo || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheSerpentsSpineEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheSerpentsSpine || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheBuriedSeaEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheBuriedSea || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsSecretsOfFaydwerEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::SecretsOfFaydwer || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsSeedsOfDestructionEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::SeedsOfDestruction || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsUnderfootEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::Underfoot || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsHouseOfThuleEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::HouseOfThule || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsVeilOfAlarisEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::VeilOfAlaris || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsRainOfFearEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RainOfFear || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsCallOfTheForsakenEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::CallOfTheForsaken || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheDarkendSeaEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheDarkendSea || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheBrokenMirrorEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheBrokenMirror || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsEmpiresOfKunarkEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::EmpiresOfKunark || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsRingOfScaleEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RingOfScale || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheBurningLandsEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheBurningLands || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTormentOfVeliousEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TormentOfVelious || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsCurrentExpansionClassic() { return current_expansion == Expansion::ExpansionNumber::Classic; }
bool IsCurrentExpansionTheRuinsOfKunark() { return current_expansion == Expansion::ExpansionNumber::TheRuinsOfKunark; }
bool IsCurrentExpansionTheScarsOfVelious() { return current_expansion == Expansion::ExpansionNumber::TheScarsOfVelious; }
bool IsCurrentExpansionTheShadowsOfLuclin() { return current_expansion == Expansion::ExpansionNumber::TheShadowsOfLuclin; }
bool IsCurrentExpansionThePlanesOfPower() { return current_expansion == Expansion::ExpansionNumber::ThePlanesOfPower; }
bool IsCurrentExpansionTheLegacyOfYkesha() { return current_expansion == Expansion::ExpansionNumber::TheLegacyOfYkesha; }
bool IsCurrentExpansionLostDungeonsOfNorrath() { return current_expansion == Expansion::ExpansionNumber::LostDungeonsOfNorrath; }
bool IsCurrentExpansionGatesOfDiscord() { return current_expansion == Expansion::ExpansionNumber::GatesOfDiscord; }
bool IsCurrentExpansionOmensOfWar() { return current_expansion == Expansion::ExpansionNumber::OmensOfWar; }
bool IsCurrentExpansionDragonsOfNorrath() { return current_expansion == Expansion::ExpansionNumber::DragonsOfNorrath; }
bool IsCurrentExpansionDepthsOfDarkhollow() { return current_expansion == Expansion::ExpansionNumber::DepthsOfDarkhollow; }
bool IsCurrentExpansionProphecyOfRo() { return current_expansion == Expansion::ExpansionNumber::ProphecyOfRo; }
bool IsCurrentExpansionTheSerpentsSpine() { return current_expansion == Expansion::ExpansionNumber::TheSerpentsSpine; }
bool IsCurrentExpansionTheBuriedSea() { return current_expansion == Expansion::ExpansionNumber::TheBuriedSea; }
bool IsCurrentExpansionSecretsOfFaydwer() { return current_expansion == Expansion::ExpansionNumber::SecretsOfFaydwer; }
bool IsCurrentExpansionSeedsOfDestruction() { return current_expansion == Expansion::ExpansionNumber::SeedsOfDestruction; }
bool IsCurrentExpansionUnderfoot() { return current_expansion == Expansion::ExpansionNumber::Underfoot; }
bool IsCurrentExpansionHouseOfThule() { return current_expansion == Expansion::ExpansionNumber::HouseOfThule; }
bool IsCurrentExpansionVeilOfAlaris() { return current_expansion == Expansion::ExpansionNumber::VeilOfAlaris; }
bool IsCurrentExpansionRainOfFear() { return current_expansion == Expansion::ExpansionNumber::RainOfFear; }
bool IsCurrentExpansionCallOfTheForsaken() { return current_expansion == Expansion::ExpansionNumber::CallOfTheForsaken; }
bool IsCurrentExpansionTheDarkendSea() { return current_expansion == Expansion::ExpansionNumber::TheDarkendSea; }
bool IsCurrentExpansionTheBrokenMirror() { return current_expansion == Expansion::ExpansionNumber::TheBrokenMirror; }
bool IsCurrentExpansionEmpiresOfKunark() { return current_expansion == Expansion::ExpansionNumber::EmpiresOfKunark; }
bool IsCurrentExpansionRingOfScale() { return current_expansion == Expansion::ExpansionNumber::RingOfScale; }
bool IsCurrentExpansionTheBurningLands() { return current_expansion == Expansion::ExpansionNumber::TheBurningLands; }
bool IsCurrentExpansionTormentOfVelious() { return current_expansion == Expansion::ExpansionNumber::TormentOfVelious; }
private:
int current_expansion{};
std::vector<std::string> content_flags;
public:
const std::vector<std::string> &GetContentFlags() const;
bool IsContentFlagEnabled(const std::string& content_flag);
void SetContentFlags(std::vector<std::string> content_flags);
void ReloadContentFlags(Database &db);
void SetExpansionContext();
};
extern WorldContentService content_service;
#endif //EQEMU_WORLD_CONTENT_SERVICE_H
+81 -23
View File
@@ -25,7 +25,7 @@ public:
}
}
Log.Out(Logs::General, Logs::Crash, buffer);
Log(Logs::General, Logs::Crash, buffer);
StackWalker::OnOutput(szText);
}
};
@@ -35,67 +35,67 @@ LONG WINAPI windows_exception_handler(EXCEPTION_POINTERS *ExceptionInfo)
switch(ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ACCESS_VIOLATION");
Log(Logs::General, Logs::Crash, "EXCEPTION_ACCESS_VIOLATION");
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
Log(Logs::General, Logs::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
break;
case EXCEPTION_BREAKPOINT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_BREAKPOINT");
Log(Logs::General, Logs::Crash, "EXCEPTION_BREAKPOINT");
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
Log(Logs::General, Logs::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_FLT_INEXACT_RESULT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
break;
case EXCEPTION_FLT_INVALID_OPERATION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
break;
case EXCEPTION_FLT_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_OVERFLOW");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_OVERFLOW");
break;
case EXCEPTION_FLT_STACK_CHECK:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_STACK_CHECK");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_STACK_CHECK");
break;
case EXCEPTION_FLT_UNDERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_UNDERFLOW");
Log(Logs::General, Logs::Crash, "EXCEPTION_FLT_UNDERFLOW");
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
Log(Logs::General, Logs::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
break;
case EXCEPTION_IN_PAGE_ERROR:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_IN_PAGE_ERROR");
Log(Logs::General, Logs::Crash, "EXCEPTION_IN_PAGE_ERROR");
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
Log(Logs::General, Logs::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_INT_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_OVERFLOW");
Log(Logs::General, Logs::Crash, "EXCEPTION_INT_OVERFLOW");
break;
case EXCEPTION_INVALID_DISPOSITION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INVALID_DISPOSITION");
Log(Logs::General, Logs::Crash, "EXCEPTION_INVALID_DISPOSITION");
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
Log(Logs::General, Logs::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
break;
case EXCEPTION_PRIV_INSTRUCTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_PRIV_INSTRUCTION");
Log(Logs::General, Logs::Crash, "EXCEPTION_PRIV_INSTRUCTION");
break;
case EXCEPTION_SINGLE_STEP:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_SINGLE_STEP");
Log(Logs::General, Logs::Crash, "EXCEPTION_SINGLE_STEP");
break;
case EXCEPTION_STACK_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_STACK_OVERFLOW");
Log(Logs::General, Logs::Crash, "EXCEPTION_STACK_OVERFLOW");
break;
default:
Log.Out(Logs::General, Logs::Crash, "Unknown Exception");
Log(Logs::General, Logs::Crash, "Unknown Exception");
break;
}
@@ -111,7 +111,65 @@ void set_exception_handler() {
SetUnhandledExceptionFilter(windows_exception_handler);
}
#else
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/fcntl.h>
#ifdef __FreeBSD__
#include <signal.h>
#include <sys/stat.h>
#endif
void print_trace()
{
auto uid = geteuid();
std::string temp_output_file = "/tmp/dump-output";
char pid_buf[30];
sprintf(pid_buf, "%d", getpid());
char name_buf[512];
name_buf[readlink("/proc/self/exe", name_buf, 511)] = 0;
int child_pid = fork();
if (!child_pid) {
int fd = open(temp_output_file.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
dup2(fd, 1); // redirect output to stderr
fprintf(stdout, "stack trace for %s pid=%s\n", name_buf, pid_buf);
if (uid == 0) {
execlp("gdb", "gdb", "--batch", "-n", "-ex", "thread", "-ex", "bt", name_buf, pid_buf, NULL);
}
else {
execlp("sudo", "gdb", "gdb", "--batch", "-n", "-ex", "thread", "-ex", "bt", name_buf, pid_buf, NULL);
}
close(fd);
abort(); /* If gdb failed to start */
}
else {
waitpid(child_pid, NULL, 0);
}
std::ifstream input(temp_output_file);
for (std::string line; getline(input, line);) {
LogCrash("{}", line);
}
std::remove(temp_output_file.c_str());
exit(1);
}
// crash is off or an unhandled platform
void set_exception_handler() {
void set_exception_handler()
{
signal(SIGABRT, reinterpret_cast<void (*)(int)>(print_trace));
signal(SIGFPE, reinterpret_cast<void (*)(int)>(print_trace));
signal(SIGFPE, reinterpret_cast<void (*)(int)>(print_trace));
signal(SIGSEGV, reinterpret_cast<void (*)(int)>(print_trace));
}
#endif
+876
View File
@@ -0,0 +1,876 @@
#pragma once
#include <vector>
#include <string>
#include <sstream>
#include <bitset>
#include <cctype>
#include <ctime>
#include <iomanip>
#include <algorithm>
#if __cplusplus > 201402L
#include <string_view>
#define CRONCPP_IS_CPP17
#endif
namespace cron
{
#ifdef CRONCPP_IS_CPP17
#define HAS_STRING_VIEW
#define STRING_VIEW std::string_view
#define STRING_VIEW_NPOS std::string_view::npos
#define CONSTEXPTR constexpr
#else
#define STRING_VIEW std::string const &
#define STRING_VIEW_NPOS std::string::npos
#define CONSTEXPTR
#endif
using cron_int = uint8_t;
constexpr std::time_t INVALID_TIME = static_cast<std::time_t>(-1);
constexpr size_t INVALID_CRON_INDEX = static_cast<size_t>(-1);
class cronexpr;
namespace detail
{
enum class cron_field
{
second,
minute,
hour_of_day,
day_of_week,
day_of_month,
month,
year
};
template <typename Traits>
static bool find_next(cronexpr const & cex,
std::tm& date,
size_t const dot);
}
struct bad_cronexpr : public std::runtime_error
{
public:
explicit bad_cronexpr(STRING_VIEW message) :
std::runtime_error(message.data())
{}
};
struct cron_standard_traits
{
static const cron_int CRON_MIN_SECONDS = 0;
static const cron_int CRON_MAX_SECONDS = 59;
static const cron_int CRON_MIN_MINUTES = 0;
static const cron_int CRON_MAX_MINUTES = 59;
static const cron_int CRON_MIN_HOURS = 0;
static const cron_int CRON_MAX_HOURS = 23;
static const cron_int CRON_MIN_DAYS_OF_WEEK = 0;
static const cron_int CRON_MAX_DAYS_OF_WEEK = 6;
static const cron_int CRON_MIN_DAYS_OF_MONTH = 1;
static const cron_int CRON_MAX_DAYS_OF_MONTH = 31;
static const cron_int CRON_MIN_MONTHS = 1;
static const cron_int CRON_MAX_MONTHS = 12;
static const cron_int CRON_MAX_YEARS_DIFF = 4;
#ifdef CRONCPP_IS_CPP17
static const inline std::vector<std::string> DAYS = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
static const inline std::vector<std::string> MONTHS = { "NIL", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
#else
static std::vector<std::string>& DAYS()
{
static std::vector<std::string> days = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
return days;
}
static std::vector<std::string>& MONTHS()
{
static std::vector<std::string> months = { "NIL", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
return months;
}
#endif
};
struct cron_oracle_traits
{
static const cron_int CRON_MIN_SECONDS = 0;
static const cron_int CRON_MAX_SECONDS = 59;
static const cron_int CRON_MIN_MINUTES = 0;
static const cron_int CRON_MAX_MINUTES = 59;
static const cron_int CRON_MIN_HOURS = 0;
static const cron_int CRON_MAX_HOURS = 23;
static const cron_int CRON_MIN_DAYS_OF_WEEK = 1;
static const cron_int CRON_MAX_DAYS_OF_WEEK = 7;
static const cron_int CRON_MIN_DAYS_OF_MONTH = 1;
static const cron_int CRON_MAX_DAYS_OF_MONTH = 31;
static const cron_int CRON_MIN_MONTHS = 0;
static const cron_int CRON_MAX_MONTHS = 11;
static const cron_int CRON_MAX_YEARS_DIFF = 4;
#ifdef CRONCPP_IS_CPP17
static const inline std::vector<std::string> DAYS = { "NIL", "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
static const inline std::vector<std::string> MONTHS = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
#else
static std::vector<std::string>& DAYS()
{
static std::vector<std::string> days = { "NIL", "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
return days;
}
static std::vector<std::string>& MONTHS()
{
static std::vector<std::string> months = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
return months;
}
#endif
};
struct cron_quartz_traits
{
static const cron_int CRON_MIN_SECONDS = 0;
static const cron_int CRON_MAX_SECONDS = 59;
static const cron_int CRON_MIN_MINUTES = 0;
static const cron_int CRON_MAX_MINUTES = 59;
static const cron_int CRON_MIN_HOURS = 0;
static const cron_int CRON_MAX_HOURS = 23;
static const cron_int CRON_MIN_DAYS_OF_WEEK = 1;
static const cron_int CRON_MAX_DAYS_OF_WEEK = 7;
static const cron_int CRON_MIN_DAYS_OF_MONTH = 1;
static const cron_int CRON_MAX_DAYS_OF_MONTH = 31;
static const cron_int CRON_MIN_MONTHS = 1;
static const cron_int CRON_MAX_MONTHS = 12;
static const cron_int CRON_MAX_YEARS_DIFF = 4;
#ifdef CRONCPP_IS_CPP17
static const inline std::vector<std::string> DAYS = { "NIL", "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
static const inline std::vector<std::string> MONTHS = { "NIL", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
#else
static std::vector<std::string>& DAYS()
{
static std::vector<std::string> days = { "NIL", "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
return days;
}
static std::vector<std::string>& MONTHS()
{
static std::vector<std::string> months = { "NIL", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
return months;
}
#endif
};
class cronexpr;
template <typename Traits = cron_standard_traits>
static cronexpr make_cron(STRING_VIEW expr);
class cronexpr
{
std::bitset<60> seconds;
std::bitset<60> minutes;
std::bitset<24> hours;
std::bitset<7> days_of_week;
std::bitset<31> days_of_month;
std::bitset<12> months;
friend bool operator==(cronexpr const & e1, cronexpr const & e2);
friend bool operator!=(cronexpr const & e1, cronexpr const & e2);
template <typename Traits>
friend bool detail::find_next(cronexpr const & cex,
std::tm& date,
size_t const dot);
friend std::string to_string(cronexpr const & cex);
template <typename Traits>
friend cronexpr make_cron(STRING_VIEW expr);
};
inline bool operator==(cronexpr const & e1, cronexpr const & e2)
{
return
e1.seconds == e2.seconds &&
e1.minutes == e2.minutes &&
e1.hours == e2.hours &&
e1.days_of_week == e2.days_of_week &&
e1.days_of_month == e2.days_of_month &&
e1.months == e2.months;
}
inline bool operator!=(cronexpr const & e1, cronexpr const & e2)
{
return !(e1 == e2);
}
inline std::string to_string(cronexpr const & cex)
{
return
cex.seconds.to_string() + " " +
cex.minutes.to_string() + " " +
cex.hours.to_string() + " " +
cex.days_of_month.to_string() + " " +
cex.months.to_string() + " " +
cex.days_of_week.to_string();
}
namespace utils
{
inline std::time_t tm_to_time(std::tm& date)
{
return std::mktime(&date);
}
inline std::tm* time_to_tm(std::time_t const * date, std::tm* const out)
{
#ifdef _WIN32
errno_t err = localtime_s(out, date);
return 0 == err ? out : nullptr;
#else
return localtime_r(date, out);
#endif
}
inline std::tm to_tm(STRING_VIEW time)
{
std::istringstream str(time.data());
str.imbue(std::locale(setlocale(LC_ALL, nullptr)));
std::tm result;
str >> std::get_time(&result, "%Y-%m-%d %H:%M:%S");
if (str.fail()) throw std::runtime_error("Parsing date failed!");
result.tm_isdst = -1; // DST info not available
return result;
}
inline std::string to_string(std::tm const & tm)
{
std::ostringstream str;
str.imbue(std::locale(setlocale(LC_ALL, nullptr)));
str << std::put_time(&tm, "%Y-%m-%d %H:%M:%S");
if (str.fail()) throw std::runtime_error("Writing date failed!");
return str.str();
}
inline std::string to_upper(std::string text)
{
std::transform(std::begin(text), std::end(text),
std::begin(text), static_cast<int(*)(int)>(std::toupper));
return text;
}
static std::vector<std::string> split(STRING_VIEW text, char const delimiter)
{
std::vector<std::string> tokens;
std::string token;
std::istringstream tokenStream(text.data());
while (std::getline(tokenStream, token, delimiter))
{
tokens.push_back(token);
}
return tokens;
}
CONSTEXPTR inline bool contains(STRING_VIEW text, char const ch) noexcept
{
return STRING_VIEW_NPOS != text.find_first_of(ch);
}
}
namespace detail
{
inline cron_int to_cron_int(STRING_VIEW text)
{
try
{
return static_cast<cron_int>(std::stoul(text.data()));
}
catch (std::exception const & ex)
{
throw bad_cronexpr(ex.what());
}
}
static std::string replace_ordinals(
std::string text,
std::vector<std::string> const & replacement)
{
for (size_t i = 0; i < replacement.size(); ++i)
{
auto pos = text.find(replacement[i]);
if (std::string::npos != pos)
text.replace(pos, 3 ,std::to_string(i));
}
return text;
}
static std::pair<cron_int, cron_int> make_range(
STRING_VIEW field,
cron_int const minval,
cron_int const maxval)
{
cron_int first = 0;
cron_int last = 0;
if (field.size() == 1 && field[0] == '*')
{
first = minval;
last = maxval;
}
else if (!utils::contains(field, '-'))
{
first = to_cron_int(field);
last = first;
}
else
{
auto parts = utils::split(field, '-');
if (parts.size() != 2)
throw bad_cronexpr("Specified range requires two fields");
first = to_cron_int(parts[0]);
last = to_cron_int(parts[1]);
}
if (first > maxval || last > maxval)
{
throw bad_cronexpr("Specified range exceeds maximum");
}
if (first < minval || last < minval)
{
throw bad_cronexpr("Specified range is less than minimum");
}
if (first > last)
{
throw bad_cronexpr("Specified range start exceeds range end");
}
return { first, last };
}
template <size_t N>
static void set_cron_field(
STRING_VIEW value,
std::bitset<N>& target,
cron_int const minval,
cron_int const maxval)
{
if(value.length() > 0 && value[value.length()-1] == ',')
throw bad_cronexpr("Value cannot end with comma");
auto fields = utils::split(value, ',');
if (fields.empty())
throw bad_cronexpr("Expression parsing error");
for (auto const & field : fields)
{
if (!utils::contains(field, '/'))
{
#ifdef CRONCPP_IS_CPP17
auto[first, last] = detail::make_range(field, minval, maxval);
#else
auto range = detail::make_range(field, minval, maxval);
auto first = range.first;
auto last = range.second;
#endif
for (cron_int i = first - minval; i <= last - minval; ++i)
{
target.set(i);
}
}
else
{
auto parts = utils::split(field, '/');
if (parts.size() != 2)
throw bad_cronexpr("Incrementer must have two fields");
#ifdef CRONCPP_IS_CPP17
auto[first, last] = detail::make_range(parts[0], minval, maxval);
#else
auto range = detail::make_range(parts[0], minval, maxval);
auto first = range.first;
auto last = range.second;
#endif
if (!utils::contains(parts[0], '-'))
{
last = maxval;
}
auto delta = detail::to_cron_int(parts[1]);
if(delta <= 0)
throw bad_cronexpr("Incrementer must be a positive value");
for (cron_int i = first - minval; i <= last - minval; i += delta)
{
target.set(i);
}
}
}
}
template <typename Traits>
static void set_cron_days_of_week(
std::string value,
std::bitset<7>& target)
{
auto days = utils::to_upper(value);
auto days_replaced = detail::replace_ordinals(
days,
#ifdef CRONCPP_IS_CPP17
Traits::DAYS
#else
Traits::DAYS()
#endif
);
if (days_replaced.size() == 1 && days_replaced[0] == '?')
days_replaced[0] = '*';
set_cron_field(
days_replaced,
target,
Traits::CRON_MIN_DAYS_OF_WEEK,
Traits::CRON_MAX_DAYS_OF_WEEK);
}
template <typename Traits>
static void set_cron_days_of_month(
std::string value,
std::bitset<31>& target)
{
if (value.size() == 1 && value[0] == '?')
value[0] = '*';
set_cron_field(
value,
target,
Traits::CRON_MIN_DAYS_OF_MONTH,
Traits::CRON_MAX_DAYS_OF_MONTH);
}
template <typename Traits>
static void set_cron_month(
std::string value,
std::bitset<12>& target)
{
auto month = utils::to_upper(value);
auto month_replaced = replace_ordinals(
month,
#ifdef CRONCPP_IS_CPP17
Traits::MONTHS
#else
Traits::MONTHS()
#endif
);
set_cron_field(
month_replaced,
target,
Traits::CRON_MIN_MONTHS,
Traits::CRON_MAX_MONTHS);
}
template <size_t N>
inline size_t next_set_bit(
std::bitset<N> const & target,
size_t /*minimum*/,
size_t /*maximum*/,
size_t offset)
{
for (auto i = offset; i < N; ++i)
{
if (target.test(i)) return i;
}
return INVALID_CRON_INDEX;
}
inline void add_to_field(
std::tm& date,
cron_field const field,
int const val)
{
switch (field)
{
case cron_field::second:
date.tm_sec += val;
break;
case cron_field::minute:
date.tm_min += val;
break;
case cron_field::hour_of_day:
date.tm_hour += val;
break;
case cron_field::day_of_week:
case cron_field::day_of_month:
date.tm_mday += val;
break;
case cron_field::month:
date.tm_mon += val;
break;
case cron_field::year:
date.tm_year += val;
break;
}
if (INVALID_TIME == utils::tm_to_time(date))
throw bad_cronexpr("Invalid time expression");
}
inline void set_field(
std::tm& date,
cron_field const field,
int const val)
{
switch (field)
{
case cron_field::second:
date.tm_sec = val;
break;
case cron_field::minute:
date.tm_min = val;
break;
case cron_field::hour_of_day:
date.tm_hour = val;
break;
case cron_field::day_of_week:
date.tm_wday = val;
break;
case cron_field::day_of_month:
date.tm_mday = val;
break;
case cron_field::month:
date.tm_mon = val;
break;
case cron_field::year:
date.tm_year = val;
break;
}
if (INVALID_TIME == utils::tm_to_time(date))
throw bad_cronexpr("Invalid time expression");
}
inline void reset_field(
std::tm& date,
cron_field const field)
{
switch (field)
{
case cron_field::second:
date.tm_sec = 0;
break;
case cron_field::minute:
date.tm_min = 0;
break;
case cron_field::hour_of_day:
date.tm_hour = 0;
break;
case cron_field::day_of_week:
date.tm_wday = 0;
break;
case cron_field::day_of_month:
date.tm_mday = 1;
break;
case cron_field::month:
date.tm_mon = 0;
break;
case cron_field::year:
date.tm_year = 0;
break;
}
if (INVALID_TIME == utils::tm_to_time(date))
throw bad_cronexpr("Invalid time expression");
}
inline void reset_all_fields(
std::tm& date,
std::bitset<7> const & marked_fields)
{
for (size_t i = 0; i < marked_fields.size(); ++i)
{
if (marked_fields.test(i))
reset_field(date, static_cast<cron_field>(i));
}
}
inline void mark_field(
std::bitset<7> & orders,
cron_field const field)
{
if (!orders.test(static_cast<size_t>(field)))
orders.set(static_cast<size_t>(field));
}
template <size_t N>
static size_t find_next(
std::bitset<N> const & target,
std::tm& date,
unsigned int const minimum,
unsigned int const maximum,
unsigned int const value,
cron_field const field,
cron_field const next_field,
std::bitset<7> const & marked_fields)
{
auto next_value = next_set_bit(target, minimum, maximum, value);
if (INVALID_CRON_INDEX == next_value)
{
add_to_field(date, next_field, 1);
reset_field(date, field);
next_value = next_set_bit(target, minimum, maximum, 0);
}
if (INVALID_CRON_INDEX == next_value || next_value != value)
{
set_field(date, field, static_cast<int>(next_value));
reset_all_fields(date, marked_fields);
}
return next_value;
}
template <typename Traits>
static size_t find_next_day(
std::tm& date,
std::bitset<31> const & days_of_month,
size_t day_of_month,
std::bitset<7> const & days_of_week,
size_t day_of_week,
std::bitset<7> const & marked_fields)
{
unsigned int count = 0;
unsigned int maximum = 366;
while (
(!days_of_month.test(day_of_month - Traits::CRON_MIN_DAYS_OF_MONTH) ||
!days_of_week.test(day_of_week - Traits::CRON_MIN_DAYS_OF_WEEK))
&& count++ < maximum)
{
add_to_field(date, cron_field::day_of_month, 1);
day_of_month = date.tm_mday;
day_of_week = date.tm_wday;
reset_all_fields(date, marked_fields);
}
return day_of_month;
}
template <typename Traits>
static bool find_next(cronexpr const & cex,
std::tm& date,
size_t const dot)
{
bool res = true;
std::bitset<7> marked_fields{ 0 };
std::bitset<7> empty_list{ 0 };
unsigned int second = date.tm_sec;
auto updated_second = find_next(
cex.seconds,
date,
Traits::CRON_MIN_SECONDS,
Traits::CRON_MAX_SECONDS,
second,
cron_field::second,
cron_field::minute,
empty_list);
if (second == updated_second)
{
mark_field(marked_fields, cron_field::second);
}
unsigned int minute = date.tm_min;
auto update_minute = find_next(
cex.minutes,
date,
Traits::CRON_MIN_MINUTES,
Traits::CRON_MAX_MINUTES,
minute,
cron_field::minute,
cron_field::hour_of_day,
marked_fields);
if (minute == update_minute)
{
mark_field(marked_fields, cron_field::minute);
}
else
{
res = find_next<Traits>(cex, date, dot);
if (!res) return res;
}
unsigned int hour = date.tm_hour;
auto updated_hour = find_next(
cex.hours,
date,
Traits::CRON_MIN_HOURS,
Traits::CRON_MAX_HOURS,
hour,
cron_field::hour_of_day,
cron_field::day_of_week,
marked_fields);
if (hour == updated_hour)
{
mark_field(marked_fields, cron_field::hour_of_day);
}
else
{
res = find_next<Traits>(cex, date, dot);
if (!res) return res;
}
unsigned int day_of_week = date.tm_wday;
unsigned int day_of_month = date.tm_mday;
auto updated_day_of_month = find_next_day<Traits>(
date,
cex.days_of_month,
day_of_month,
cex.days_of_week,
day_of_week,
marked_fields);
if (day_of_month == updated_day_of_month)
{
mark_field(marked_fields, cron_field::day_of_month);
}
else
{
res = find_next<Traits>(cex, date, dot);
if (!res) return res;
}
unsigned int month = date.tm_mon;
auto updated_month = find_next(
cex.months,
date,
Traits::CRON_MIN_MONTHS,
Traits::CRON_MAX_MONTHS,
month,
cron_field::month,
cron_field::year,
marked_fields);
if (month != updated_month)
{
if (date.tm_year - dot > Traits::CRON_MAX_YEARS_DIFF)
return false;
res = find_next<Traits>(cex, date, dot);
if (!res) return res;
}
return res;
}
}
template <typename Traits>
static cronexpr make_cron(STRING_VIEW expr)
{
cronexpr cex;
if (expr.empty())
throw bad_cronexpr("Invalid empty cron expression");
auto fields = utils::split(expr, ' ');
fields.erase(
std::remove_if(std::begin(fields), std::end(fields),
[](STRING_VIEW s) {return s.empty(); }),
std::end(fields));
if (fields.size() != 6)
throw bad_cronexpr("cron expression must have six fields");
detail::set_cron_field(fields[0], cex.seconds, Traits::CRON_MIN_SECONDS, Traits::CRON_MAX_SECONDS);
detail::set_cron_field(fields[1], cex.minutes, Traits::CRON_MIN_MINUTES, Traits::CRON_MAX_MINUTES);
detail::set_cron_field(fields[2], cex.hours, Traits::CRON_MIN_HOURS, Traits::CRON_MAX_HOURS);
detail::set_cron_days_of_week<Traits>(fields[5], cex.days_of_week);
detail::set_cron_days_of_month<Traits>(fields[3], cex.days_of_month);
detail::set_cron_month<Traits>(fields[4], cex.months);
return cex;
}
template <typename Traits = cron_standard_traits>
static std::tm cron_next(cronexpr const & cex, std::tm date)
{
time_t original = utils::tm_to_time(date);
if (INVALID_TIME == original) return {};
if (!detail::find_next<Traits>(cex, date, date.tm_year))
return {};
time_t calculated = utils::tm_to_time(date);
if (INVALID_TIME == calculated) return {};
if (calculated == original)
{
add_to_field(date, detail::cron_field::second, 1);
if (!detail::find_next<Traits>(cex, date, date.tm_year))
return {};
}
return date;
}
template <typename Traits = cron_standard_traits>
static std::time_t cron_next(cronexpr const & cex, std::time_t const & date)
{
std::tm val;
std::tm* dt = utils::time_to_tm(&date, &val);
if (dt == nullptr) return INVALID_TIME;
time_t original = utils::tm_to_time(*dt);
if (INVALID_TIME == original) return INVALID_TIME;
if(!detail::find_next<Traits>(cex, *dt, dt->tm_year))
return INVALID_TIME;
time_t calculated = utils::tm_to_time(*dt);
if (INVALID_TIME == calculated) return calculated;
if (calculated == original)
{
add_to_field(*dt, detail::cron_field::second, 1);
if(!detail::find_next<Traits>(cex, *dt, dt->tm_year))
return INVALID_TIME;
}
return utils::tm_to_time(*dt);
}
}
+48 -39
View File
@@ -1,48 +1,57 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_DATA_VERIFICATION_H
#define COMMON_DATA_VERIFICATION_H
#pragma once
#include <algorithm>
#include <cmath>
namespace EQEmu
{
namespace EQ {
template<typename T>
T Clamp(const T &value, const T &lower, const T &upper)
{
return std::max(lower, std::min(value, upper));
}
template <typename T, typename U, typename V>
T Clamp(const T& value, const U& lower, const V& upper) {
return std::max(static_cast<T>(lower), std::min(value, static_cast<T>(upper)));
}
template<typename T>
T ClampLower(const T &value, const T &lower)
{
return std::max(lower, value);
}
template <typename T, typename U>
T ClampLower(const T& value, const U& lower) {
return std::max(static_cast<T>(lower), value);
}
template<typename T>
T ClampUpper(const T &value, const T &upper)
{
return std::min(value, upper);
}
template <typename T, typename U>
T ClampUpper(const T& value, const U& upper) {
return std::min(value, static_cast<T>(upper));
}
template<typename T>
bool ValueWithin(const T &value, const T &lower, const T &upper)
{
return value >= lower && value <= upper;
}
template <typename T, typename U, typename V>
bool ValueWithin(const T& value, const U& lower, const V& upper) {
return value >= lower && value <= upper;
}
template<typename T1, typename T2, typename T3>
bool ValueWithin(const T1 &value, const T2 &lower, const T3 &upper)
{
return value >= (T1) lower && value <= (T1) upper;
}
} /*EQEmu*/
}
#endif
+931 -588
View File
File diff suppressed because it is too large Load Diff
+84 -68
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,11 +23,11 @@
#include "global_define.h"
#include "eqemu_logsys.h"
#include "types.h"
#include "dbcore.h"
#include "linked_list.h"
#include "eq_packet_structs.h"
#include "inventory.h"
#include <cmath>
#include <string>
@@ -37,27 +37,13 @@
//atoi is not uint32 or uint32 safe!!!!
#define atoul(str) strtoul(str, nullptr, 10)
class InventoryOld;
class MySQLRequestResult;
class Client;
struct EventLogDetails_Struct {
uint32 id;
char accountname[64];
uint32 account_id;
int16 status;
char charactername[64];
char targetname[64];
char timestamp[64];
char descriptiontype[64];
char details[128];
};
struct CharacterEventLog_Struct {
uint32 count;
uint8 eventid;
EventLogDetails_Struct eld[255];
};
namespace EQ
{
class InventoryProfile;
}
struct npcDecayTimes_Struct {
uint16 minlvl;
@@ -67,8 +53,14 @@ struct npcDecayTimes_Struct {
struct VarCache_Struct {
char varname[26];
char value[0];
std::map<std::string, std::string> m_cache;
uint32 last_update;
VarCache_Struct() : last_update(0) { }
void Add(const std::string &key, const std::string &value) { m_cache[key] = value; }
const std::string *Get(const std::string &key) {
auto it = m_cache.find(key);
return (it != m_cache.end() ? &it->second : nullptr);
}
};
class PTimerList;
@@ -84,31 +76,52 @@ class PTimerList;
# define _ISNAN_(a) std::isnan(a)
#endif
#define SQL(...) #__VA_ARGS__
class LogSettings;
class Database : public DBcore {
public:
Database();
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database, uint32 port, std::string connection_label = "default");
~Database();
/* Character Creation */
bool AddToNameFilter(const char* name);
bool CreateCharacter(uint32 account_id, char* name, uint16 gender, uint16 race, uint16 class_, uint8 str, uint8 sta, uint8 cha, uint8 dex, uint8 int_, uint8 agi, uint8 wis, uint8 face);
bool DeleteCharacter(char* name);
bool MoveCharacterToZone(const char* charname, const char* zonename);
bool MoveCharacterToZone(const char* charname, const char* zonename,uint32 zoneid);
bool MoveCharacterToZone(uint32 iCharID, const char* iZonename);
bool ReserveName(uint32 account_id, char* name);
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked);
bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone);
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, InventoryOld* inv);
bool UpdateName(const char* oldname, const char* newname);
bool AddToNameFilter(const char *name);
bool CreateCharacter(
uint32 account_id,
char *name,
uint16 gender,
uint16 race,
uint16 class_,
uint8 str,
uint8 sta,
uint8 cha,
uint8 dex,
uint8 int_,
uint8 agi,
uint8 wis,
uint8 face
);
bool DeleteCharacter(char *character_name);
bool MoveCharacterToZone(const char *charname, uint32 zone_id);
bool MoveCharacterToZone(uint32 character_id, uint32 zone_id);
bool ReserveName(uint32 account_id, char *name);
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct *pp);
bool SetHackerFlag(const char *accountname, const char *charactername, const char *hacked);
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const char *hacked, const char *zone);
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const std::string &hacked, const char *zone);
bool UpdateName(const char *oldname, const char *newname);
bool CopyCharacter(
std::string source_character_name,
std::string destination_character_name,
std::string destination_account_name
);
/* General Information Queries */
bool AddBannedIP(char* bannedIP, const char* notes); //Add IP address to the Banned_IPs table.
bool AddBannedIP(char* bannedIP, const char* notes); //Add IP address to the banned_ips table.
bool AddGMIP(char* ip_address, char* name);
bool CheckBannedIPs(const char* loginIP); //Check incoming connection against banned IP table.
bool CheckGMIPs(const char* loginIP, uint32 account_id);
@@ -117,13 +130,18 @@ public:
uint32 GetAccountIDByChar(const char* charname, uint32* oCharID = 0);
uint32 GetAccountIDByChar(uint32 char_id);
uint32 GetAccountIDByName(const char* accname, int16* status = 0, uint32* lsid = 0);
uint32 GetAccountIDByName(const char* accname, const char *loginserver, int16* status = 0, uint32* lsid = 0);
uint32 GetCharacterID(const char *name);
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0, float* oX = 0, float* oY = 0, float* oZ = 0);
uint32 GetGuildIDByCharID(uint32 char_id);
uint32 GetGroupIDByCharID(uint32 char_id);
uint32 GetRaidIDByCharID(uint32 char_id);
void GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID = 0);
void GetCharName(uint32 char_id, char* name);
std::string GetCharNameByID(uint32 char_id);
std::string GetNPCNameByID(uint32 npc_id);
std::string GetCleanNPCNameByID(uint32 npc_id);
void LoginIP(uint32 AccountID, const char* LoginIP);
/* Instancing */
@@ -140,7 +158,6 @@ public:
bool VerifyInstanceAlive(uint16 instance_id, uint32 char_id);
bool VerifyZoneInstance(uint32 zone_id, uint16 instance_id);
uint16 GetInstanceID(const char* zone, uint32 charid, int16 version);
uint16 GetInstanceID(uint32 zone, uint32 charid, int16 version);
uint16 GetInstanceVersion(uint16 instance_id);
uint32 GetTimeRemainingInstance(uint16 instance_id, bool &is_perma);
@@ -159,36 +176,41 @@ public:
/* Adventure related. */
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win);
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win = false, bool remove = false);
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
/* Account Related */
bool DeleteAccount(const char* name);
bool DeleteAccount(const char *name, const char* loginserver);
bool GetLiveChar(uint32 account_id, char* cname);
bool SetAccountStatus(const char* name, int16 status);
bool SetAccountStatus(const std::string& account_name, int16 status);
bool SetLocalPassword(uint32 accid, const char* password);
bool UpdateLiveChar(char* charname, uint32 lsaccount_id);
bool UpdateLiveChar(char* charname, uint32 account_id);
int16 CheckStatus(uint32 account_id);
uint32 CheckLogin(const char* name, const char* password, int16* oStatus = 0);
uint32 CreateAccount(const char* name, const char* password, int16 status, uint32 lsaccount_id = 0);
uint32 GetAccountIDFromLSID(uint32 iLSID, char* oAccountName = 0, int16* oStatus = 0);
uint32 GetMiniLoginAccount(char* ip);
uint32 CheckLogin(const char* name, const char* password, const char *loginserver, int16* oStatus = 0);
uint32 CreateAccount(const char* name, const char* password, int16 status, const char* loginserver, uint32 lsaccount_id);
uint32 GetAccountIDFromLSID(const std::string& in_loginserver_id, uint32 in_loginserver_account_id, char* in_account_name = 0, int16* in_status = 0);
uint8 GetAgreementFlag(uint32 acctid);
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
void SetAgreementFlag(uint32 acctid);
int GetIPExemption(std::string account_ip);
void SetIPExemption(std::string account_ip, int exemption_amount);
int GetInstanceID(uint32 char_id, uint32 zone_id);
/* Groups */
char* GetGroupLeaderForLogin(const char* name,char* leaderbuf);
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
uint32 GetGroupID(const char* name);
void ClearGroup(uint32 gid = 0);
void ClearGroupLeader(uint32 gid = 0);
void SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ismerc = false);
@@ -207,34 +229,28 @@ public:
void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, RaidLeadershipAA_Struct* RLAA = nullptr);
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
void PurgeAllDeletedDataBuckets();
/* Database Conversions 'database_conversions.cpp' */
bool CheckDatabaseConversions();
bool CheckDatabaseConvertBotsPostPPDeblob();
bool CheckDatabaseConvertCorpseDeblob();
bool CheckDatabaseConvertPPDeblob();
/* Database Variables */
bool GetVariable(const char* varname, char* varvalue, uint16 varvalue_len);
bool SetVariable(const char* varname, const char* varvalue);
bool GetVariable(std::string varname, std::string &varvalue);
bool SetVariable(const std::string varname, const std::string &varvalue);
bool LoadVariables();
uint32 LoadVariables_MQ(char** query);
bool LoadVariables_result(MySQLRequestResult results);
/* General Queries */
bool GetSafePoints(const char* short_name, uint32 version, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, int16* minstatus = 0, uint8* minlevel = 0, char *flag_needed = nullptr);
bool GetSafePoints(uint32 zoneID, uint32 version, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, int16* minstatus = 0, uint8* minlevel = 0, char *flag_needed = nullptr) { return GetSafePoints(GetZoneName(zoneID), version, safe_x, safe_y, safe_z, minstatus, minlevel, flag_needed); }
bool GetSafePoints(const char* zone_short_name, uint32 instance_version, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, float* safe_heading = 0, int16* minstatus = 0, uint8* minlevel = 0, char *flag_needed = nullptr);
bool GetZoneGraveyard(const uint32 graveyard_id, uint32* graveyard_zoneid = 0, float* graveyard_x = 0, float* graveyard_y = 0, float* graveyard_z = 0, float* graveyard_heading = 0);
bool GetZoneLongName(const char* short_name, char** long_name, char* file_name = 0, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, uint32* graveyard_id = 0, uint32* maxclients = 0);
bool LoadPTimers(uint32 charid, PTimerList &into);
bool LoadZoneNames();
const char* GetZoneName(uint32 zoneID, bool ErrorUnknown = false);
uint32 GetZoneGraveyardID(uint32 zone_id, uint32 version);
uint32 GetZoneID(const char* zonename);
uint8 GetPEQZone(uint32 zoneID, uint32 version);
uint8 GetRaceSkill(uint8 skillid, uint8 in_race);
@@ -242,6 +258,8 @@ public:
uint8 GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level);
void AddReport(std::string who, std::string against, std::string lines);
struct TimeOfDay_Struct LoadTime(time_t &realtime);
bool SaveTime(int8 minute, int8 hour, int8 day, int8 month, int16 year);
void ClearMerchantTemp();
void ClearPTimers(uint32 charid);
void SetFirstLogon(uint32 CharID, uint8 firstlogon);
@@ -249,18 +267,16 @@ public:
void SetLFP(uint32 CharID, bool LFP);
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
/* EQEmuLogSys */
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
int CountInvSnapshots();
void ClearInvSnapshots(bool from_now = false);
void SourceDatabaseTableFromUrl(std::string table_name, std::string url);
private:
void DBInitVars();
std::map<uint32,std::string> zonename_array;
Mutex Mvarcache;
uint32 varcache_max;
VarCache_Struct** varcache_array;
uint32 varcache_lastupdate;
Mutex Mvarcache;
VarCache_Struct varcache;
/* Groups, utility methods. */
void ClearAllGroupLeaders();
+579
View File
@@ -0,0 +1,579 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <string>
#include <cstdio>
#include <iterator>
#include "database_dump_service.h"
#include "../eqemu_logsys.h"
#include "../string_util.h"
#include "../eqemu_config.h"
#include "../database_schema.h"
#include "../file_util.h"
#include <ctime>
#if _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#endif
#define DATABASE_DUMP_PATH "backups/"
/**
* @param cmd
* @param return_result
* @return
*/
std::string DatabaseDumpService::execute(const std::string &cmd, bool return_result = true)
{
const char *file_name = "db-exec-result.txt";
if (return_result) {
#ifdef _WINDOWS
std::system((cmd + " > " + file_name + " 2>&1").c_str());
#else
std::system((cmd + " > " + file_name).c_str());
#endif
}
else {
std::system((cmd).c_str());
}
std::string result;
if (return_result) {
std::ifstream file(file_name);
result = {std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()};
std::remove(file_name);
}
return result;
}
/**
* @return bool
*/
bool DatabaseDumpService::IsMySQLInstalled()
{
std::string version_output = GetMySQLVersion();
return version_output.find("mysql") != std::string::npos && version_output.find("Ver") != std::string::npos;
}
/**
* Linux
* @return bool
*/
bool DatabaseDumpService::IsTarAvailable()
{
std::string version_output = execute("tar --version");
return version_output.find("GNU tar") != std::string::npos;
}
/**
* Windows
* @return bool
*/
bool DatabaseDumpService::Is7ZipAvailable()
{
std::string version_output = execute("7z --help");
return version_output.find("7-Zip") != std::string::npos;
}
/**
* @return
*/
bool DatabaseDumpService::HasCompressionBinary()
{
return IsTarAvailable() || Is7ZipAvailable();
}
/**
* @return
*/
std::string DatabaseDumpService::GetMySQLVersion()
{
std::string version_output = execute("mysql --version");
return trim(version_output);
}
/**
* @return
*/
std::string DatabaseDumpService::GetBaseMySQLDumpCommand()
{
auto config = EQEmuConfig::get();
if (IsDumpContentTables() && !config->ContentDbHost.empty()) {
return fmt::format(
"mysqldump -u {} -p{} -h {} --port={} {}",
config->ContentDbUsername,
config->ContentDbPassword,
config->ContentDbHost,
config->ContentDbPort,
config->ContentDbName
);
};
return fmt::format(
"mysqldump -u {} -p{} -h {} --port={} {}",
config->DatabaseUsername,
config->DatabasePassword,
config->DatabaseHost,
config->DatabasePort,
config->DatabaseDB
);
}
/**
* @return
*/
std::string DatabaseDumpService::GetPlayerTablesList()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetPlayerTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string DatabaseDumpService::GetLoginTableList()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetLoginTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string DatabaseDumpService::GetQueryServTables()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetQueryServerTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string DatabaseDumpService::GetSystemTablesList()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetServerTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
tables = DatabaseSchema::GetVersionTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string DatabaseDumpService::GetStateTablesList()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetStateTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string DatabaseDumpService::GetContentTablesList()
{
std::string tables_list;
std::vector<std::string> tables = DatabaseSchema::GetContentTables();
for (const auto &table : tables) {
tables_list += table + " ";
}
return trim(tables_list);
}
/**
* @return
*/
std::string GetDumpDate()
{
time_t now = time(nullptr);
struct tm time_struct{};
char buf[80];
time_struct = *localtime(&now);
strftime(buf, sizeof(buf), "%Y-%m-%d", &time_struct);
std::string time = buf;
return time;
}
/**
* @return
*/
std::string DatabaseDumpService::GetSetDumpPath()
{
return !GetDumpPath().empty() ? GetDumpPath() : DATABASE_DUMP_PATH;
}
/**
* @return
*/
std::string DatabaseDumpService::GetDumpFileNameWithPath()
{
return GetSetDumpPath() + GetDumpFileName();
}
void DatabaseDumpService::Dump()
{
if (!IsMySQLInstalled()) {
LogError("MySQL is not installed; Please check your PATH for a valid MySQL installation");
return;
}
if (IsDumpDropTableSyntaxOnly()) {
SetDumpOutputToConsole(true);
}
if (IsDumpOutputToConsole()) {
LogSys.SilenceConsoleLogging();
}
LogInfo("MySQL installed [{}]", GetMySQLVersion());
SetDumpFileName(EQEmuConfig::get()->DatabaseDB + '-' + GetDumpDate());
auto config = EQEmuConfig::get();
LogInfo(
"Database [{}] Host [{}] Username [{}]",
config->DatabaseDB,
config->DatabaseHost,
config->DatabaseUsername
);
std::string options = "--allow-keywords --extended-insert --max-allowed-packet=1G --net-buffer-length=32704";
if (IsDumpWithNoData()) {
options += " --no-data";
}
if (!IsDumpTableLock()) {
options += " --skip-lock-tables";
}
std::string tables_to_dump;
std::string dump_descriptor;
if (!IsDumpAllTables()) {
if (IsDumpPlayerTables()) {
tables_to_dump += GetPlayerTablesList() + " ";
dump_descriptor += "-player";
}
if (IsDumpSystemTables()) {
tables_to_dump += GetSystemTablesList() + " ";
dump_descriptor += "-system";
}
if (IsDumpStateTables()) {
tables_to_dump += GetStateTablesList() + " ";
dump_descriptor += "-state";
}
if (IsDumpContentTables()) {
tables_to_dump += GetContentTablesList() + " ";
dump_descriptor += "-content";
}
if (IsDumpLoginServerTables()) {
tables_to_dump += GetLoginTableList() + " ";
dump_descriptor += "-login";
}
if (IsDumpQueryServerTables()) {
tables_to_dump += GetQueryServTables();
dump_descriptor += "-queryserv";
}
}
if (!dump_descriptor.empty()) {
SetDumpFileName(GetDumpFileName() + dump_descriptor);
}
/**
* If we are dumping to stdout then we don't generate a file
*/
std::string pipe_file;
if (!IsDumpOutputToConsole()) {
pipe_file = fmt::format(" > {}.sql", GetDumpFileNameWithPath());
}
std::string execute_command = fmt::format(
"{} {} {} {}",
GetBaseMySQLDumpCommand(),
options,
tables_to_dump,
pipe_file
);
if (!FileUtil::exists(GetSetDumpPath()) && !IsDumpOutputToConsole()) {
FileUtil::mkdir(GetSetDumpPath());
}
if (IsDumpDropTableSyntaxOnly()) {
std::vector<std::string> tables = SplitString(tables_to_dump, ' ');
for (auto &table : tables) {
std::cout << "DROP TABLE IF EXISTS `" << table << "`;" << std::endl;
}
if (tables_to_dump.empty()) {
std::cerr << "No tables were specified" << std::endl;
}
}
else {
std::string execution_result = execute(execute_command, IsDumpOutputToConsole());
if (!execution_result.empty()) {
std::cout << execution_result;
}
}
if (!tables_to_dump.empty()) {
LogInfo("Dumping Tables [{}]", tables_to_dump);
}
LogInfo("Database dump created at [{}.sql]", GetDumpFileNameWithPath());
if (IsDumpWithCompression() && !IsDumpOutputToConsole()) {
if (HasCompressionBinary()) {
LogInfo("Compression requested... Compressing dump [{}.sql]", GetDumpFileNameWithPath());
if (IsTarAvailable()) {
execute(
fmt::format(
"tar -zcvf {}.tar.gz -C {} {}.sql",
GetDumpFileNameWithPath(),
GetSetDumpPath(),
GetDumpFileName()
)
);
LogInfo("Compressed dump created at [{}.tar.gz]", GetDumpFileNameWithPath());
}
else if (Is7ZipAvailable()) {
execute(
fmt::format(
"7z a -t7z {}.zip {}.sql",
GetDumpFileNameWithPath(),
GetDumpFileNameWithPath()
)
);
LogInfo("Compressed dump created at [{}.zip]", GetDumpFileNameWithPath());
}
else {
LogInfo("Compression requested, but no available compression binary was found");
}
}
else {
LogWarning("Compression requested but binary not found... Skipping...");
}
}
// LogDebug("[{}] dump-to-console", IsDumpOutputToConsole());
// LogDebug("[{}] dump-path", GetSetDumpPath());
// LogDebug("[{}] compression", (IsDumpWithCompression() ? "true" : "false"));
// LogDebug("[{}] query-serv", (IsDumpQueryServerTables() ? "true" : "false"));
// LogDebug("[{}] has-compression-binary", (HasCompressionBinary() ? "true" : "false"));
// LogDebug("[{}] content", (IsDumpContentTables() ? "true" : "false"));
// LogDebug("[{}] no-data", (IsDumpWithNoData() ? "true" : "false"));
// LogDebug("[{}] login", (IsDumpLoginServerTables() ? "true" : "false"));
// LogDebug("[{}] player", (IsDumpPlayerTables() ? "true" : "false"));
// LogDebug("[{}] system", (IsDumpSystemTables() ? "true" : "false"));
}
bool DatabaseDumpService::IsDumpSystemTables() const
{
return dump_system_tables;
}
void DatabaseDumpService::SetDumpSystemTables(bool dump_system_tables)
{
DatabaseDumpService::dump_system_tables = dump_system_tables;
}
bool DatabaseDumpService::IsDumpContentTables() const
{
return dump_content_tables;
}
void DatabaseDumpService::SetDumpContentTables(bool dump_content_tables)
{
DatabaseDumpService::dump_content_tables = dump_content_tables;
}
bool DatabaseDumpService::IsDumpPlayerTables() const
{
return dump_player_tables;
}
void DatabaseDumpService::SetDumpPlayerTables(bool dump_player_tables)
{
DatabaseDumpService::dump_player_tables = dump_player_tables;
}
bool DatabaseDumpService::IsDumpLoginServerTables() const
{
return dump_login_server_tables;
}
void DatabaseDumpService::SetDumpLoginServerTables(bool dump_login_server_tables)
{
DatabaseDumpService::dump_login_server_tables = dump_login_server_tables;
}
bool DatabaseDumpService::IsDumpWithNoData() const
{
return dump_with_no_data;
}
void DatabaseDumpService::SetDumpWithNoData(bool dump_with_no_data)
{
DatabaseDumpService::dump_with_no_data = dump_with_no_data;
}
bool DatabaseDumpService::IsDumpAllTables() const
{
return dump_all_tables;
}
void DatabaseDumpService::SetDumpAllTables(bool dump_all_tables)
{
DatabaseDumpService::dump_all_tables = dump_all_tables;
}
bool DatabaseDumpService::IsDumpTableLock() const
{
return dump_table_lock;
}
void DatabaseDumpService::SetDumpTableLock(bool dump_table_lock)
{
DatabaseDumpService::dump_table_lock = dump_table_lock;
}
bool DatabaseDumpService::IsDumpWithCompression() const
{
return dump_with_compression;
}
void DatabaseDumpService::SetDumpWithCompression(bool dump_with_compression)
{
DatabaseDumpService::dump_with_compression = dump_with_compression;
}
const std::string &DatabaseDumpService::GetDumpPath() const
{
return dump_path;
}
void DatabaseDumpService::SetDumpPath(const std::string &dump_path)
{
DatabaseDumpService::dump_path = dump_path;
}
void DatabaseDumpService::SetDumpFileName(const std::string &dump_file_name)
{
DatabaseDumpService::dump_file_name = dump_file_name;
}
const std::string &DatabaseDumpService::GetDumpFileName() const
{
return dump_file_name;
}
bool DatabaseDumpService::IsDumpQueryServerTables() const
{
return dump_query_server_tables;
}
void DatabaseDumpService::SetDumpQueryServerTables(bool dump_query_server_tables)
{
DatabaseDumpService::dump_query_server_tables = dump_query_server_tables;
}
bool DatabaseDumpService::IsDumpOutputToConsole() const
{
return dump_output_to_console;
}
void DatabaseDumpService::SetDumpOutputToConsole(bool dump_output_to_console)
{
DatabaseDumpService::dump_output_to_console = dump_output_to_console;
}
bool DatabaseDumpService::IsDumpDropTableSyntaxOnly() const
{
return dump_drop_table_syntax_only;
}
void DatabaseDumpService::SetDumpDropTableSyntaxOnly(bool dump_drop_table_syntax_only)
{
DatabaseDumpService::dump_drop_table_syntax_only = dump_drop_table_syntax_only;
}
bool DatabaseDumpService::IsDumpStateTables() const
{
return dump_state_tables;
}
void DatabaseDumpService::SetDumpStateTables(bool dump_state_tables)
{
DatabaseDumpService::dump_state_tables = dump_state_tables;
}
+91
View File
@@ -0,0 +1,91 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef EQEMU_DATABASE_DUMP_SERVICE_H
#define EQEMU_DATABASE_DUMP_SERVICE_H
class DatabaseDumpService {
public:
void Dump();
bool IsDumpAllTables() const;
void SetDumpAllTables(bool dump_all_tables);
bool IsDumpWithNoData() const;
void SetDumpWithNoData(bool dump_with_no_data);
bool IsDumpSystemTables() const;
void SetDumpSystemTables(bool dump_system_tables);
bool IsDumpContentTables() const;
void SetDumpContentTables(bool dump_content_tables);
bool IsDumpPlayerTables() const;
void SetDumpPlayerTables(bool dump_player_tables);
bool IsDumpLoginServerTables() const;
void SetDumpLoginServerTables(bool dump_login_server_tables);
bool IsDumpTableLock() const;
void SetDumpTableLock(bool dump_table_lock);
bool IsDumpWithCompression() const;
void SetDumpWithCompression(bool dump_with_compression);
const std::string &GetDumpPath() const;
void SetDumpPath(const std::string &dump_path);
const std::string &GetDumpFileName() const;
void SetDumpFileName(const std::string &dump_file_name);
bool IsDumpQueryServerTables() const;
void SetDumpQueryServerTables(bool dump_query_server_tables);
bool IsDumpOutputToConsole() const;
void SetDumpOutputToConsole(bool dump_output_to_console);
bool IsDumpDropTableSyntaxOnly() const;
void SetDumpDropTableSyntaxOnly(bool dump_drop_table_syntax_only);
bool IsDumpStateTables() const;
void SetDumpStateTables(bool dump_state_tables);
private:
bool dump_all_tables = false;
bool dump_state_tables = false;
bool dump_system_tables = false;
bool dump_content_tables = false;
bool dump_player_tables = false;
bool dump_query_server_tables = false;
bool dump_login_server_tables = false;
bool dump_with_no_data = false;
bool dump_table_lock = false;
bool dump_with_compression = false;
bool dump_output_to_console = false;
bool dump_drop_table_syntax_only = false;
std::string dump_path;
std::string dump_file_name;
std::string execute(const std::string &cmd, bool return_result);
bool IsMySQLInstalled();
std::string GetMySQLVersion();
std::string GetBaseMySQLDumpCommand();
std::string GetPlayerTablesList();
std::string GetSystemTablesList();
std::string GetStateTablesList();
std::string GetContentTablesList();
std::string GetLoginTableList();
bool IsTarAvailable();
bool Is7ZipAvailable();
bool HasCompressionBinary();
std::string GetDumpFileNameWithPath();
std::string GetSetDumpPath();
std::string GetQueryServTables();
};
#endif //EQEMU_DATABASE_DUMP_SERVICE_H
+21 -199
View File
@@ -41,11 +41,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#pragma pack(1)
// all const/macro reference values should really be converted to a magic number for this
// process to ensure that the struct sizes and offsets match up to the corresponding blob
/* Conversion Structs */
namespace Convert {
struct BindStruct {
/*000*/ uint32 zoneId;
/*000*/ uint32 zone_id;
/*004*/ float x;
/*008*/ float y;
/*012*/ float z;
@@ -186,7 +189,7 @@ namespace Convert {
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*510*/ uint32 Items[EQ::textures::materialCount];
/*546*/ char Name[64];
/*610*/
};
@@ -214,7 +217,7 @@ namespace Convert {
/*0245*/ uint8 guildbanker;
/*0246*/ uint8 unknown0246[6]; //
/*0252*/ uint32 intoxication;
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
/*0256*/ uint32 spellSlotRefresh[9]; //in ms
/*0292*/ uint32 abilitySlotRefresh;
/*0296*/ uint8 haircolor; // Player hair color
/*0297*/ uint8 beardcolor; // Player beard color
@@ -227,9 +230,9 @@ namespace Convert {
/*0304*/ uint8 ability_time_minutes;
/*0305*/ uint8 ability_time_hours; //place holder
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
/*0312*/ uint32 item_material[EQ::textures::materialCount]; // Item texture/material of worn/held items
/*0348*/ uint8 unknown0348[44];
/*0392*/ Convert::Color_Struct item_tint[_MaterialCount];
/*0392*/ Convert::Color_Struct item_tint[EQ::textures::materialCount];
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
/*2348*/ float unknown2384; //seen ~128, ~47
/*2352*/ char servername[32]; // length probably not right
@@ -253,9 +256,9 @@ namespace Convert {
/*2505*/ uint8 unknown2541[47]; // ?
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
/*2580*/ uint8 unknown2616[4];
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
/*2584*/ uint32 spell_book[480];
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
/*4632*/ uint32 mem_spells[9];
/*4668*/ uint8 unknown4704[32]; //
/*4700*/ float y; // Player y position
/*4704*/ float x; // Player x position
@@ -330,7 +333,7 @@ namespace Convert {
/*7212*/ uint32 tribute_points;
/*7216*/ uint32 unknown7252;
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Convert::Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
/*7224*/ Convert::Tribute_Struct tributes[5];
/*7264*/ Convert::Disciplines_Struct disciplines;
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
/*7744*/ char unknown7780[160];
@@ -470,34 +473,10 @@ static inline void loadbar(unsigned int x, unsigned int n, unsigned int w = 50)
bool Database::CheckDatabaseConversions() {
CheckDatabaseConvertPPDeblob();
CheckDatabaseConvertBotsPostPPDeblob();
CheckDatabaseConvertCorpseDeblob();
/* Fetch Automatic Upgrade Script */
if (!std::ifstream("eqemu_update.pl")){
std::cout << "Pulling down automatic database upgrade script..." << std::endl;
#ifdef _WIN32
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_update.pl'); if ($response->is_success){ open(FILE, '> eqemu_update.pl'); print FILE $response->decoded_content; close(FILE); }\"");
#else
system("wget --no-check-certificate -O eqemu_update.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_update.pl");
#endif
}
/*
Automatic (Database) Upgrade Script
Script: eqemu_update.pl V 1 - the number that world passes to the script will
force the script to check for a newer version to update itself with
eqemu_update.pl ran_from_world - won't bring up a menu if your database versions match
eqemu_update.pl - ran standalone will bring up a menu prompt
*/
/* Check for a new version of this script, the arg passed
would have to be higher than the copy they have downloaded
locally and they will re fetch */
system("perl eqemu_update.pl V 7");
/* Run Automatic Database Upgrade Script */
system("perl eqemu_update.pl ran_from_world");
/* Run EQEmu Server script (Checks for database updates) */
if(system("perl eqemu_server.pl ran_from_world"));
return true;
}
@@ -1341,18 +1320,18 @@ bool Database::CheckDatabaseConvertPPDeblob(){
if (rquery != ""){ results = QueryDatabase(rquery); }
/* Run Bind Home Convert */
if (pp->binds[4].zoneId < 999 && !_ISNAN_(pp->binds[4].x) && !_ISNAN_(pp->binds[4].y) && !_ISNAN_(pp->binds[4].z) && !_ISNAN_(pp->binds[4].heading)) {
if (pp->binds[4].zone_id < 999 && !_ISNAN_(pp->binds[4].x) && !_ISNAN_(pp->binds[4].y) && !_ISNAN_(pp->binds[4].z) && !_ISNAN_(pp->binds[4].heading)) {
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
" VALUES (%u, %u, %u, %f, %f, %f, %f, 1)",
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading);
character_id, pp->binds[4].zone_id, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading);
if (rquery != ""){ results = QueryDatabase(rquery); }
}
/* Run Bind Convert */
if (pp->binds[0].zoneId < 999 && !_ISNAN_(pp->binds[0].x) && !_ISNAN_(pp->binds[0].y) && !_ISNAN_(pp->binds[0].z) && !_ISNAN_(pp->binds[0].heading)) {
if (pp->binds[0].zone_id < 999 && !_ISNAN_(pp->binds[0].x) && !_ISNAN_(pp->binds[0].y) && !_ISNAN_(pp->binds[0].z) && !_ISNAN_(pp->binds[0].heading)) {
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
" VALUES (%u, %u, %u, %f, %f, %f, %f, 0)",
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading);
character_id, pp->binds[0].zone_id, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading);
if (rquery != ""){ results = QueryDatabase(rquery); }
}
/* Run Language Convert */
@@ -1381,7 +1360,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
if (rquery != ""){ results = QueryDatabase(rquery); }
/* Run Spell Convert */
first_entry = 0; rquery = "";
for (i = 0; i < MAX_PP_REF_SPELLBOOK; i++){
for (i = 0; i < 480; i++){
if (pp->spell_book[i] > 0 && pp->spell_book[i] != 4294967295 && pp->spell_book[i] < 40000 && pp->spell_book[i] != 1){
if (first_entry != 1){
rquery = StringFormat("REPLACE INTO `character_spells` (id, slot_id, spell_id) VALUES (%u, %u, %u)", character_id, i, pp->spell_book[i]);
@@ -1393,7 +1372,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
if (rquery != ""){ results = QueryDatabase(rquery); }
/* Run Max Memmed Spell Convert */
first_entry = 0; rquery = "";
for (i = 0; i < MAX_PP_REF_MEMSPELL; i++){
for (i = 0; i < 9; i++){
if (pp->mem_spells[i] > 0 && pp->mem_spells[i] != 65535 && pp->mem_spells[i] != 4294967295){
if (first_entry != 1){
rquery = StringFormat("REPLACE INTO `character_memmed_spells` (id, slot_id, spell_id) VALUES (%u, %u, %u)", character_id, i, pp->mem_spells[i]);
@@ -1417,7 +1396,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
if (rquery != ""){ results = QueryDatabase(rquery); }
/* Run Material Color Convert */
first_entry = 0; rquery = "";
for (i = 0; i < _MaterialCount; i++){
for (i = EQ::textures::textureBegin; i < EQ::textures::materialCount; i++){
if (pp->item_tint[i].color > 0){
if (first_entry != 1){
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
@@ -1429,7 +1408,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
if (rquery != ""){ results = QueryDatabase(rquery); }
/* Run Tribute Convert */
first_entry = 0; rquery = "";
for (i = 0; i < EmuConstants::TRIBUTE_SIZE; i++){
for (i = 0; i < 5; i++){
if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != 4294967295){
if (first_entry != 1){
rquery = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
@@ -1491,163 +1470,6 @@ bool Database::CheckDatabaseConvertPPDeblob(){
return true;
}
bool Database::CheckDatabaseConvertBotsPostPPDeblob(){
#ifdef BOTS
int runbotsconvert = 0;
/* Check For Legacy Bot References */
std::string rquery = StringFormat("SHOW CREATE VIEW `vwBotCharacterMobs`");
auto results = QueryDatabase(rquery);
if (results.RowCount() == 1){
auto row = results.begin();
std::string table_check = row[1];
if (table_check.find("character_data") == -1){
runbotsconvert = 1;
printf("\n\n::: Legacy Bot Views and Function Detected... \n");
printf("----------------------------------------------------------\n\n");
printf(" Database currently has bot view/function linkage to obselete \n");
printf(" table references and will now be converted...\n\n");
printf(" It is recommended that you backup your database \n");
printf(" before continuing the automatic conversion process...\n\n");
printf("----------------------------------------------------------\n\n");
std::cout << "Press ENTER to continue....." << std::endl << std::endl;
std::cin.ignore(1);
}
}
if (runbotsconvert == 1){
printf("Running bot views/function database conversion... \n");
/* Update view `vwbotcharactermobs` */
rquery = StringFormat("DROP VIEW `vwBotCharacterMobs`;");
results = QueryDatabase(rquery);
rquery = StringFormat(
"CREATE VIEW `vwBotCharacterMobs` AS\n"
"SELECT _utf8'C' AS mobtype,\n" // Natedog: '_utf8'
"c.`id`,\n"
"c.`name`,\n"
"c.`class`,\n"
"c.`level`,\n"
"c.`last_login`,\n"
"c.`zone_id`\n"
"FROM `character_data` AS c\n"
"UNION ALL\n"
"SELECT _utf8'B' AS mobtype,\n" // Natedog: '_utf8'
"b.`BotID` AS id,\n"
"b.`Name` AS name,\n"
"b.`Class` AS class,\n"
"b.`BotLevel` AS level,\n"
"0 AS timelaston,\n"
"0 AS zoneid\n"
"FROM bots AS b;"
);
results = QueryDatabase(rquery);
/* Update function `GetMobType` */
rquery = StringFormat("DROP FUNCTION IF EXISTS `GetMobType`;");
results = QueryDatabase(rquery);
rquery = StringFormat(
"CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)\n"
"BEGIN\n"
" DECLARE Result CHAR(1);\n"
"\n"
" SET Result = NULL;\n"
"\n"
" IF (SELECT COUNT(*) FROM `character_data` WHERE `name` = mobname) > 0 THEN\n"
" SET Result = 'C';\n"
" ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN\n"
" SET Result = 'B';\n"
" END IF;\n "
"\n"
" RETURN Result;\n"
"END"
);
results = QueryDatabase(rquery);
/* Update view `vwgroups` */
rquery = StringFormat("DROP VIEW IF EXISTS `vwGroups`;");
results = QueryDatabase(rquery);
rquery = StringFormat(
"CREATE VIEW `vwGroups` AS\n"
"SELECT g.`groupid` AS groupid,\n"
"GetMobType(g.`name`) AS mobtype,\n"
"g.`name` AS name,\n"
"g.`charid` AS mobid,\n"
"IFNULL(c.`level`, b.`BotLevel`) AS level\n"
"FROM `group_id` AS g\n"
"LEFT JOIN `character_data` AS c ON g.`name` = c.`name`\n"
"LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;"
);
results = QueryDatabase(rquery);
/* Update view `vwbotgroups` */
rquery = StringFormat("DROP VIEW IF EXISTS `vwBotGroups`;");
results = QueryDatabase(rquery);
rquery = StringFormat(
"CREATE VIEW `vwBotGroups` AS\n"
"SELECT g.`BotGroupId`,\n"
"g.`BotGroupName`,\n"
"g.`BotGroupLeaderBotId`,\n"
"b.`Name` AS BotGroupLeaderName,\n"
"b.`BotOwnerCharacterId`,\n"
"c.`name` AS BotOwnerCharacterName\n"
"FROM `botgroup` AS g\n"
"JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`\n"
"JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`\n"
"ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;"
);
results = QueryDatabase(rquery);
/* Update view `vwguildmembers` */
rquery = StringFormat("DROP VIEW IF EXISTS `vwGuildMembers`;");
results = QueryDatabase(rquery);
rquery = StringFormat(
"CREATE VIEW `vwGuildMembers` AS\n"
"SELECT 'C' AS mobtype,\n"
"cm.`char_id`,\n"
"cm.`guild_id`,\n"
"cm.`rank`,\n"
"cm.`tribute_enable`,\n"
"cm.`total_tribute`,\n"
"cm.`last_tribute`,\n"
"cm.`banker`,\n"
"cm.`public_note`,\n"
"cm.`alt`\n"
"FROM `guild_members` AS cm\n"
"UNION ALL\n"
"SELECT 'B' AS mobtype,\n"
"bm.`char_id`,\n"
"bm.`guild_id`,\n"
"bm.`rank`,\n"
"bm.`tribute_enable`,\n"
"bm.`total_tribute`,\n"
"bm.`last_tribute`,\n"
"bm.`banker`,\n"
"bm.`public_note`,\n"
"bm.`alt`\n"
"FROM `botguildmembers` AS bm;"
);
results = QueryDatabase(rquery);
}
if (runbotsconvert == 1){
printf("\n\nBot views/function conversion complete, continuing world bootup...\n");
}
#endif
return true;
}
bool Database::CheckDatabaseConvertCorpseDeblob(){
Convert::DBPlayerCorpse_Struct_temp* dbpc;
Convert::classic_db_temp::DBPlayerCorpse_Struct_temp* dbpc_c;
+131 -94
View File
@@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../common/rulesys.h"
#include "../common/string_util.h"
#include "../common/timer.h"
#include "../common/repositories/dynamic_zone_members_repository.h"
#include "../common/repositories/dynamic_zones_repository.h"
#include "database.h"
@@ -34,20 +36,28 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define strcasecmp _stricmp
#else
#include "unix.h"
#include "../zone/zonedb.h"
#include <netinet/in.h>
#include <sys/time.h>
#endif
/**
* @param instance_id
* @param char_id
* @return
*/
bool Database::AddClientToInstance(uint16 instance_id, uint32 char_id)
{
std::string query = StringFormat(
"REPLACE INTO `instance_list_player` (id, charid) "
"VALUES "
"(%lu, %lu)",
(unsigned long)instance_id,
(unsigned long)char_id
);
(unsigned long) instance_id,
(unsigned long) char_id
);
auto results = QueryDatabase(query);
return results.Success();
}
@@ -90,42 +100,53 @@ bool Database::CheckInstanceExists(uint16 instance_id) {
bool Database::CheckInstanceExpired(uint16 instance_id)
{
int32 start_time = 0;
int32 duration = 0;
int32 start_time = 0;
int32 duration = 0;
uint32 never_expires = 0;
std::string query = StringFormat("SELECT start_time, duration, never_expires FROM instance_list WHERE id=%u", instance_id);
std::string query = StringFormat(
"SELECT start_time, duration, never_expires FROM instance_list WHERE id=%u",
instance_id
);
auto results = QueryDatabase(query);
if (!results.Success())
if (!results.Success()) {
return true;
}
if (results.RowCount() == 0)
if (results.RowCount() == 0) {
return true;
}
auto row = results.begin();
start_time = atoi(row[0]);
duration = atoi(row[1]);
start_time = atoi(row[0]);
duration = atoi(row[1]);
never_expires = atoi(row[2]);
if (never_expires == 1)
if (never_expires == 1) {
return false;
}
timeval tv;
timeval tv{};
gettimeofday(&tv, nullptr);
if ((start_time + duration) <= tv.tv_sec)
return true;
return (start_time + duration) <= tv.tv_sec;
return false;
}
bool Database::CreateInstance(uint16 instance_id, uint32 zone_id, uint32 version, uint32 duration)
{
std::string query = StringFormat("INSERT INTO instance_list (id, zone, version, start_time, duration)"
" values(%lu, %lu, %lu, UNIX_TIMESTAMP(), %lu)",
(unsigned long)instance_id, (unsigned long)zone_id, (unsigned long)version, (unsigned long)duration);
std::string query = StringFormat(
"INSERT INTO instance_list (id, zone, version, start_time, duration)"
" values (%u, %u, %u, UNIX_TIMESTAMP(), %u)",
instance_id,
zone_id,
version,
duration
);
auto results = QueryDatabase(query);
return results.Success();
@@ -133,66 +154,84 @@ bool Database::CreateInstance(uint16 instance_id, uint32 zone_id, uint32 version
bool Database::GetUnusedInstanceID(uint16 &instance_id)
{
uint32 count = RuleI(Zone, ReservedInstances);
uint32 max = 65535;
uint32 max_reserved_instance_id = RuleI(Instances, ReservedInstances);
uint32 max = 32000;
std::string query = StringFormat(
"SELECT IFNULL(MAX(id),%u)+1 FROM instance_list WHERE id > %u",
max_reserved_instance_id,
max_reserved_instance_id
);
if (RuleB(Instances, RecycleInstanceIds)) {
query = (
SQL(
SELECT i.id + 1 AS next_available
FROM instance_list i
LEFT JOIN instance_list i2 ON i2.id = i.id + 1
WHERE i2.id IS NULL
ORDER BY i.id
LIMIT 0, 1;
)
);
}
std::string query = StringFormat("SELECT IFNULL(MAX(id),%u)+1 FROM instance_list WHERE id > %u", count, count);
auto results = QueryDatabase(query);
if (!results.Success())
{
if (!results.Success()) {
instance_id = 0;
return false;
}
if (results.RowCount() == 0)
{
instance_id = 0;
return false;
if (results.RowCount() == 0) {
instance_id = max_reserved_instance_id;
return true;
}
auto row = results.begin();
if (atoi(row[0]) <= max)
{
if (atoi(row[0]) <= max) {
instance_id = atoi(row[0]);
return true;
}
query = StringFormat("SELECT id FROM instance_list where id > %u ORDER BY id", count);
if (instance_id < max_reserved_instance_id) {
instance_id = max_reserved_instance_id;
return true;
}
query = StringFormat("SELECT id FROM instance_list where id > %u ORDER BY id", max_reserved_instance_id);
results = QueryDatabase(query);
if (!results.Success())
{
if (!results.Success()) {
instance_id = 0;
return false;
}
if (results.RowCount() == 0)
{
if (results.RowCount() == 0) {
instance_id = 0;
return false;
}
count++;
for (auto row = results.begin(); row != results.end(); ++row)
{
if (count < atoi(row[0]))
{
instance_id = count;
max_reserved_instance_id++;
for (auto row = results.begin(); row != results.end(); ++row) {
if (max_reserved_instance_id < atoi(row[0])) {
instance_id = max_reserved_instance_id;
return true;
}
if (count > max)
{
if (max_reserved_instance_id > max) {
instance_id = 0;
return false;
}
count++;
max_reserved_instance_id++;
}
instance_id = count;
instance_id = max_reserved_instance_id;
return true;
}
@@ -269,36 +308,6 @@ bool Database::VerifyZoneInstance(uint32 zone_id, uint16 instance_id)
return true;
}
uint16 Database::GetInstanceID(const char* zone, uint32 character_id, int16 version) {
std::string query = StringFormat(
"SELECT "
"instance_list.id "
"FROM "
"instance_list, "
"instance_list_player "
"WHERE "
"instance_list.zone = %u "
"AND instance_list.version = %u "
"AND instance_list.id = instance_list_player.id "
"AND instance_list_player.charid = %u "
"LIMIT 1 ",
GetZoneID(zone),
version,
character_id
);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
uint16 Database::GetInstanceID(uint32 zone, uint32 character_id, int16 version)
{
if (!zone)
@@ -465,23 +474,18 @@ void Database::AssignRaidToInstance(uint32 raid_id, uint32 instance_id)
}
void Database::BuryCorpsesInInstance(uint16 instance_id) {
std::string query = StringFormat(
"UPDATE `character_corpses` "
"SET `is_buried` = 1, "
"`instance_id` = 0 "
"WHERE "
"`instance_id` = %u ",
instance_id
);
auto results = QueryDatabase(query);
QueryDatabase(
fmt::format(
"UPDATE character_corpses SET is_buried = 1, instance_id = 0 WHERE instance_id = {}",
instance_id
)
);
}
void Database::DeleteInstance(uint16 instance_id)
{
std::string query = StringFormat("DELETE FROM instance_list WHERE id=%u", instance_id);
QueryDatabase(query);
std::string query;
query = StringFormat("DELETE FROM instance_list_player WHERE id=%u", instance_id);
QueryDatabase(query);
@@ -491,6 +495,9 @@ void Database::DeleteInstance(uint16 instance_id)
query = StringFormat("DELETE FROM spawn_condition_values WHERE instance_id=%u", instance_id);
QueryDatabase(query);
DynamicZoneMembersRepository::DeleteByInstance(*this, instance_id);
DynamicZonesRepository::DeleteWhere(*this, fmt::format("instance_id = {}", instance_id));
BuryCorpsesInInstance(instance_id);
}
@@ -502,7 +509,7 @@ void Database::FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 char
char ln[128];
memset(ln, 0, 128);
strcpy(ln, GetGroupLeadershipInfo(gid, ln));
GetGroupLeadershipInfo(gid, ln);
uint32 l_charid = GetCharacterID((const char*)ln);
uint16 l_id = GetInstanceID(zone, l_charid, version);
@@ -541,17 +548,47 @@ void Database::GetCharactersInInstance(uint16 instance_id, std::list<uint32> &ch
void Database::PurgeExpiredInstances()
{
std::string query("SELECT id FROM instance_list where (start_time+duration) <= UNIX_TIMESTAMP() and never_expires = 0");
/**
* Delay purging by a day so that we can continue using adjacent free instance id's
* from the table without risking the chance we immediately re-allocate a zone that freshly expired but
* has not been fully de-allocated
*/
std::string query =
SQL(
SELECT
id
FROM
instance_list
where
(start_time + duration) <= (UNIX_TIMESTAMP() - 86400)
and never_expires = 0
);
auto results = QueryDatabase(query);
if (!results.Success())
if (!results.Success()) {
return;
}
if (results.RowCount() == 0)
if (results.RowCount() == 0) {
return;
}
for (auto row = results.begin(); row != results.end(); ++row)
DeleteInstance(atoi(row[0]));
std::vector<std::string> instance_ids;
for (auto row = results.begin(); row != results.end(); ++row) {
instance_ids.emplace_back(row[0]);
}
std::string imploded_instance_ids = implode(",", instance_ids);
QueryDatabase(fmt::format("DELETE FROM instance_list WHERE id IN ({})", imploded_instance_ids));
QueryDatabase(fmt::format("DELETE FROM instance_list_player WHERE id IN ({})", imploded_instance_ids));
QueryDatabase(fmt::format("DELETE FROM respawn_times WHERE instance_id IN ({})", imploded_instance_ids));
QueryDatabase(fmt::format("DELETE FROM spawn_condition_values WHERE instance_id IN ({})", imploded_instance_ids));
QueryDatabase(fmt::format("UPDATE character_corpses SET is_buried = 1, instance_id = 0 WHERE instance_id IN ({})", imploded_instance_ids));
DynamicZoneMembersRepository::DeleteByManyInstances(*this, imploded_instance_ids);
DynamicZonesRepository::DeleteWhere(*this, fmt::format("instance_id IN ({})", imploded_instance_ids));
}
void Database::SetInstanceDuration(uint16 instance_id, uint32 new_duration)
@@ -559,4 +596,4 @@ void Database::SetInstanceDuration(uint16 instance_id, uint32 new_duration)
std::string query = StringFormat("UPDATE `instance_list` SET start_time=UNIX_TIMESTAMP(), "
"duration=%u WHERE id=%u", new_duration, instance_id);
auto results = QueryDatabase(query);
}
}
+380
View File
@@ -0,0 +1,380 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef EQEMU_DATABASE_SCHEMA_H
#define EQEMU_DATABASE_SCHEMA_H
#include <vector>
#include <map>
namespace DatabaseSchema {
/**
* Character-specific tables
*
* Does not included related meta-data tables such as 'guilds', 'accounts'
* @return
*/
static std::map<std::string, std::string> GetCharacterTables()
{
return {
{"adventure_stats", "player_id"},
{"buyer", "charid"},
{"char_recipe_list", "char_id"},
{"character_activities", "charid"},
{"character_alt_currency", "char_id"},
{"character_alternate_abilities", "id"},
{"character_auras", "id"},
{"character_bandolier", "id"},
{"character_bind", "id"},
{"character_buffs", "character_id"},
{"character_corpses", "id"},
{"character_currency", "id"},
{"character_data", "id"},
{"character_disciplines", "id"},
{"character_enabledtasks", "charid"},
{"character_expedition_lockouts", "character_id"},
{"character_exp_modifiers", "character_id"},
{"character_inspect_messages", "id"},
{"character_instance_safereturns", "character_id"},
{"character_item_recast", "id"},
{"character_languages", "id"},
{"character_leadership_abilities", "id"},
{"character_material", "id"},
{"character_memmed_spells", "id"},
{"character_pet_buffs", "char_id"},
{"character_pet_info", "char_id"},
{"character_pet_inventory", "char_id"},
{"character_potionbelt", "id"},
{"character_skills", "id"},
{"character_spells", "id"},
{"character_task_timers", "character_id"},
{"character_tasks", "charid"},
{"character_tribute", "id"},
{"completed_tasks", "charid"},
{"data_buckets", "id"},
{"faction_values", "char_id"},
{"friends", "charid"},
{"guild_members", "char_id"},
{"guilds", "id"},
{"instance_list_player", "id"},
{"inventory", "charid"},
{"inventory_snapshots", "charid"},
{"keyring", "char_id"},
{"mail", "charid"},
{"player_titlesets", "char_id"},
{"quest_globals", "charid"},
{"timers", "char_id"},
{"titles", "char_id"},
{"trader", "char_id"},
{"zone_flags", "charID"}
};
}
/**
* @description Gets all player and meta-data tables
* @note These tables have no content in the PEQ daily dump
*
* @return
*/
static std::vector<std::string> GetPlayerTables()
{
return {
"account",
"account_ip",
"account_flags",
"account_rewards",
"adventure_details",
"adventure_stats",
"buyer",
"char_recipe_list",
"character_activities",
"character_alt_currency",
"character_alternate_abilities",
"character_auras",
"character_bandolier",
"character_bind",
"character_buffs",
"character_corpse_items",
"character_corpses",
"character_currency",
"character_data",
"character_disciplines",
"character_enabledtasks",
"character_expedition_lockouts",
"character_exp_modifiers",
"character_inspect_messages",
"character_instance_safereturns",
"character_item_recast",
"character_languages",
"character_leadership_abilities",
"character_material",
"character_memmed_spells",
"character_pet_buffs",
"character_pet_info",
"character_pet_inventory",
"character_potionbelt",
"character_skills",
"character_spells",
"character_task_timers",
"character_tasks",
"character_tribute",
"completed_tasks",
"data_buckets",
"discovered_items",
"faction_values",
"friends",
"guild_bank",
"guild_members",
"guild_ranks",
"guild_relations",
"guilds",
"instance_list_player",
"inventory",
"inventory_snapshots",
"keyring",
"mail",
"petitions",
"player_titlesets",
"quest_globals",
"sharedbank",
"spell_buckets",
"spell_globals",
"timers",
"titles",
"trader",
"trader_audit",
"zone_flags"
};
}
/**
* Gets content tables
*
* @return
*/
static std::vector<std::string> GetContentTables()
{
return {
"aa_ability",
"aa_rank_effects",
"aa_rank_prereqs",
"aa_ranks",
"adventure_template",
"adventure_template_entry",
"adventure_template_entry_flavor",
"alternate_currency",
"auras",
"base_data",
"blocked_spells",
"books",
"char_create_combinations",
"char_create_point_allocations",
"damageshieldtypes",
"doors",
"faction_base_data",
"faction_list",
"faction_list_mod",
"fishing",
"forage",
"global_loot",
"goallists",
"graveyard",
"grid",
"grid_entries",
"ground_spawns",
"horses",
"items",
"ldon_trap_entries",
"ldon_trap_templates",
"lootdrop",
"lootdrop_entries",
"loottable",
"loottable_entries",
"merchantlist",
"npc_emotes",
"npc_faction",
"npc_faction_entries",
"npc_scale_global_base",
"npc_spells",
"npc_spells_effects",
"npc_spells_effects_entries",
"npc_spells_entries",
"npc_types",
"npc_types_tint",
"object",
"pets",
"pets_beastlord_data",
"pets_equipmentset",
"pets_equipmentset_entries",
"proximities",
"skill_caps",
"spawn2",
"spawn_conditions",
"spawnentry",
"spawngroup",
"spells_new",
"start_zones",
"starting_items",
"task_activities",
"tasks",
"tasksets",
"tradeskill_recipe",
"tradeskill_recipe_entries",
"traps",
"tribute_levels",
"tributes",
"veteran_reward_templates",
"zone",
"zone_points",
};
}
/**
* Gets server tables
*
* @return
*/
static std::vector<std::string> GetServerTables()
{
return {
"chatchannels",
"command_settings",
"content_flags",
"db_str",
"eqtime",
"launcher",
"launcher_zones",
"spawn_condition_values",
"spawn_events",
"level_exp_mods",
"logsys_categories",
"name_filter",
"perl_event_export_settings",
"profanity_list",
"rule_sets",
"rule_values",
"variables",
};
}
/**
* Gets QueryServer tables
*
* @return
*/
static std::vector<std::string> GetQueryServerTables()
{
return {
"qs_merchant_transaction_record",
"qs_merchant_transaction_record_entries",
"qs_player_aa_rate_hourly",
"qs_player_delete_record",
"qs_player_delete_record_entries",
"qs_player_events",
"qs_player_handin_record",
"qs_player_handin_record_entries",
"qs_player_move_record",
"qs_player_move_record_entries",
"qs_player_npc_kill_record",
"qs_player_npc_kill_record_entries",
"qs_player_speech",
"qs_player_trade_record",
"qs_player_trade_record_entries",
};
}
/**
* Gets state tables
* Tables that keep track of server state
*
* @return
*/
static std::vector<std::string> GetStateTables()
{
return {
"adventure_members",
"banned_ips",
"bug_reports",
"bugs",
"completed_shared_task_activity_state",
"completed_shared_task_members",
"completed_shared_tasks",
"dynamic_zone_members",
"dynamic_zones",
"eventlog",
"expedition_lockouts",
"expeditions",
"gm_ips",
"group_id",
"group_leaders",
"hackers",
"instance_list",
"ip_exemptions",
"item_tick",
"lfguild",
"merchantlist_temp",
"object_contents",
"raid_details",
"raid_leaders",
"raid_members",
"reports",
"respawn_times",
"saylink",
"server_scheduled_events",
"shared_task_activity_state",
"shared_task_dynamic_zones",
"shared_task_members",
"shared_tasks",
};
}
/**
* Gets login tables
*
* @return
*/
static std::vector<std::string> GetLoginTables()
{
return {
"login_accounts",
"login_api_tokens",
"login_server_admins",
"login_server_list_types",
"login_world_servers",
};
}
/**
* Gets login tables
*
* @return
*/
static std::vector<std::string> GetVersionTables()
{
return {
"db_version",
"inventory_versions",
};
}
}
#endif //EQEMU_DATABASE_SCHEMA_H
+166 -75
View File
@@ -2,8 +2,9 @@
#include <winsock2.h>
#endif
#include "../common/misc_functions.h"
#include "../common/eqemu_logsys.h"
#include "misc_functions.h"
#include "eqemu_logsys.h"
#include "timer.h"
#include "dbcore.h"
@@ -14,33 +15,51 @@
#include <string.h>
#ifdef _WINDOWS
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#include <process.h>
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#include <process.h>
#else
#include "unix.h"
#include <pthread.h>
#include "unix.h"
#include <pthread.h>
#endif
#ifdef _EQDEBUG
#define DEBUG_MYSQL_QUERIES 0
#define DEBUG_MYSQL_QUERIES 0
#else
#define DEBUG_MYSQL_QUERIES 0
#define DEBUG_MYSQL_QUERIES 0
#endif
DBcore::DBcore() {
DBcore::DBcore()
{
mysql_init(&mysql);
pHost = 0;
pUser = 0;
pPassword = 0;
pDatabase = 0;
pCompress = false;
pSSL = false;
pStatus = Closed;
pHost = nullptr;
pUser = nullptr;
pPassword = nullptr;
pDatabase = nullptr;
pCompress = false;
pSSL = false;
pStatus = Closed;
}
DBcore::~DBcore() {
DBcore::~DBcore()
{
/**
* This prevents us from doing a double free in multi-tenancy setups where we
* are re-using the default database connection pointer when we dont have an
* external configuration setup ex: (content_database)
*/
std::string mysql_connection_host;
if (mysql.host) {
mysql_connection_host = mysql.host;
}
if (GetOriginHost() != mysql_connection_host) {
return;
}
mysql_close(&mysql);
safe_delete_array(pHost);
safe_delete_array(pUser);
@@ -49,7 +68,8 @@ DBcore::~DBcore() {
}
// Sends the MySQL server a keepalive
void DBcore::ping() {
void DBcore::ping()
{
if (!MDatabase.trylock()) {
// well, if's it's locked, someone's using it. If someone's using it, it doesnt need a keepalive
return;
@@ -63,34 +83,44 @@ MySQLRequestResult DBcore::QueryDatabase(std::string query, bool retryOnFailureO
return QueryDatabase(query.c_str(), query.length(), retryOnFailureOnce);
}
MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce)
bool DBcore::DoesTableExist(std::string table_name)
{
auto results = QueryDatabase(fmt::format("SHOW TABLES LIKE '{}'", table_name));
return results.RowCount() > 0;
}
MySQLRequestResult DBcore::QueryDatabase(const char *query, uint32 querylen, bool retryOnFailureOnce)
{
BenchTimer timer;
timer.reset();
LockMutex lock(&MDatabase);
// Reconnect if we are not connected before hand.
if (pStatus != Connected)
if (pStatus != Connected) {
Open();
}
// request query. != 0 indicates some kind of error.
if (mysql_real_query(&mysql, query, querylen) != 0)
{
if (mysql_real_query(&mysql, query, querylen) != 0) {
unsigned int errorNumber = mysql_errno(&mysql);
if (errorNumber == CR_SERVER_GONE_ERROR)
if (errorNumber == CR_SERVER_GONE_ERROR) {
pStatus = Error;
}
// error appears to be a disconnect error, may need to try again.
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR)
{
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR) {
if (retryOnFailureOnce)
{
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
if (retryOnFailureOnce) {
LogInfo("Database Error: Lost connection, attempting to recover");
MySQLRequestResult requestResult = QueryDatabase(query, querylen, false);
if (requestResult.Success())
{
std::cout << "Reconnection to database successful." << std::endl;
if (requestResult.Success()) {
LogInfo("Reconnection to database successful");
return requestResult;
}
@@ -98,113 +128,174 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
pStatus = Error;
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
auto errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32) mysql_errno(&mysql), errorBuffer);
}
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
auto errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
/* Implement Logging at the Root */
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
if (Log.log_settings[Logs::MySQLError].is_category_enabled == 1)
Log.Out(Logs::General, Logs::MySQLError, "%i: %s \n %s", mysql_errno(&mysql), mysql_error(&mysql), query);
/**
* Error logging
*/
if (mysql_errno(&mysql) > 0 && strlen(query) > 0) {
LogMySQLError("[{}] [{}]\n[{}]", mysql_errno(&mysql), mysql_error(&mysql), query);
}
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql), errorBuffer);
}
// successful query. get results.
MYSQL_RES* res = mysql_store_result(&mysql);
uint32 rowCount = 0;
MYSQL_RES *res = mysql_store_result(&mysql);
uint32 rowCount = 0;
if (res != nullptr)
rowCount = (uint32)mysql_num_rows(res);
if (res != nullptr) {
rowCount = (uint32) mysql_num_rows(res);
}
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
if (Log.log_settings[Logs::MySQLQuery].is_category_enabled == 1)
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u rows returned)", query, rowCount, requestResult.RowCount());
MySQLRequestResult requestResult(
res,
(uint32) mysql_affected_rows(&mysql),
rowCount,
(uint32) mysql_field_count(&mysql),
(uint32) mysql_insert_id(&mysql)
);
if (LogSys.log_settings[Logs::MySQLQuery].is_category_enabled == 1) {
if ((strncasecmp(query, "select", 6) == 0)) {
LogMySQLQuery(
"{0} ({1} row{2} returned) ({3}s)",
query,
requestResult.RowCount(),
requestResult.RowCount() == 1 ? "" : "s",
std::to_string(timer.elapsed())
);
}
else {
LogMySQLQuery(
"{0} ({1} row{2} affected) ({3}s)",
query,
requestResult.RowsAffected(),
requestResult.RowsAffected() == 1 ? "" : "s",
std::to_string(timer.elapsed())
);
}
}
return requestResult;
}
void DBcore::TransactionBegin() {
void DBcore::TransactionBegin()
{
QueryDatabase("START TRANSACTION");
}
void DBcore::TransactionCommit() {
void DBcore::TransactionCommit()
{
QueryDatabase("COMMIT");
}
void DBcore::TransactionRollback() {
void DBcore::TransactionRollback()
{
QueryDatabase("ROLLBACK");
}
uint32 DBcore::DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen) {
uint32 DBcore::DoEscapeString(char *tobuf, const char *frombuf, uint32 fromlen)
{
// No good reason to lock the DB, we only need it in the first place to check char encoding.
// LockMutex lock(&MDatabase);
return mysql_real_escape_string(&mysql, tobuf, frombuf, fromlen);
}
bool DBcore::Open(const char* iHost, const char* iUser, const char* iPassword, const char* iDatabase,uint32 iPort, uint32* errnum, char* errbuf, bool iCompress, bool iSSL) {
bool DBcore::Open(
const char *iHost,
const char *iUser,
const char *iPassword,
const char *iDatabase,
uint32 iPort,
uint32 *errnum,
char *errbuf,
bool iCompress,
bool iSSL
)
{
LockMutex lock(&MDatabase);
safe_delete(pHost);
safe_delete(pUser);
safe_delete(pPassword);
safe_delete(pDatabase);
pHost = strcpy(new char[strlen(iHost) + 1], iHost);
pUser = strcpy(new char[strlen(iUser) + 1], iUser);
safe_delete_array(pHost);
safe_delete_array(pUser);
safe_delete_array(pPassword);
safe_delete_array(pDatabase);
pHost = strcpy(new char[strlen(iHost) + 1], iHost);
pUser = strcpy(new char[strlen(iUser) + 1], iUser);
pPassword = strcpy(new char[strlen(iPassword) + 1], iPassword);
pDatabase = strcpy(new char[strlen(iDatabase) + 1], iDatabase);
pCompress = iCompress;
pPort = iPort;
pSSL = iSSL;
pPort = iPort;
pSSL = iSSL;
return Open(errnum, errbuf);
}
bool DBcore::Open(uint32* errnum, char* errbuf) {
if (errbuf)
bool DBcore::Open(uint32 *errnum, char *errbuf)
{
if (errbuf) {
errbuf[0] = 0;
}
LockMutex lock(&MDatabase);
if (GetStatus() == Connected)
if (GetStatus() == Connected) {
return true;
}
if (GetStatus() == Error) {
mysql_close(&mysql);
mysql_init(&mysql); // Initialize structure again
mysql_init(&mysql); // Initialize structure again
}
if (!pHost)
if (!pHost) {
return false;
}
/*
Added CLIENT_FOUND_ROWS flag to the connect
otherwise DB update calls would say 0 rows affected when the value already equalled
what the function was tring to set it to, therefore the function would think it failed
*/
uint32 flags = CLIENT_FOUND_ROWS;
if (pCompress)
if (pCompress) {
flags |= CLIENT_COMPRESS;
if (pSSL)
}
if (pSSL) {
flags |= CLIENT_SSL;
}
if (mysql_real_connect(&mysql, pHost, pUser, pPassword, pDatabase, pPort, 0, flags)) {
pStatus = Connected;
std::string connected_origin_host = pHost;
SetOriginHost(connected_origin_host);
return true;
}
else {
if (errnum)
if (errnum) {
*errnum = mysql_errno(&mysql);
if (errbuf)
}
if (errbuf) {
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
}
pStatus = Error;
return false;
}
}
void DBcore::SetMysql(MYSQL *mysql)
{
DBcore::mysql = *mysql;
}
const std::string &DBcore::GetOriginHost() const
{
return origin_host;
}
void DBcore::SetOriginHost(const std::string &origin_host)
{
DBcore::origin_host = origin_host;
}
+42 -21
View File
@@ -2,8 +2,8 @@
#define DBCORE_H
#ifdef _WINDOWS
#include <winsock.h>
#include <windows.h>
#include <winsock2.h>
#include <windows.h>
#endif
#include "../common/mutex.h"
@@ -15,36 +15,57 @@
class DBcore {
public:
enum eStatus { Closed, Connected, Error };
enum eStatus {
Closed, Connected, Error
};
DBcore();
~DBcore();
eStatus GetStatus() { return pStatus; }
MySQLRequestResult QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce = true);
MySQLRequestResult QueryDatabase(std::string query, bool retryOnFailureOnce = true);
eStatus GetStatus() { return pStatus; }
MySQLRequestResult QueryDatabase(const char *query, uint32 querylen, bool retryOnFailureOnce = true);
MySQLRequestResult QueryDatabase(std::string query, bool retryOnFailureOnce = true);
void TransactionBegin();
void TransactionCommit();
void TransactionRollback();
uint32 DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen);
void ping();
MYSQL* getMySQL(){ return &mysql; }
uint32 DoEscapeString(char *tobuf, const char *frombuf, uint32 fromlen);
void ping();
MYSQL *getMySQL() { return &mysql; }
void SetMysql(MYSQL *mysql);
const std::string &GetOriginHost() const;
void SetOriginHost(const std::string &origin_host);
bool DoesTableExist(std::string table_name);
protected:
bool Open(const char* iHost, const char* iUser, const char* iPassword, const char* iDatabase, uint32 iPort, uint32* errnum = 0, char* errbuf = 0, bool iCompress = false, bool iSSL = false);
private:
bool Open(uint32* errnum = 0, char* errbuf = 0);
bool Open(
const char *iHost,
const char *iUser,
const char *iPassword,
const char *iDatabase,
uint32 iPort,
uint32 *errnum = 0,
char *errbuf = 0,
bool iCompress = false,
bool iSSL = false
);
MYSQL mysql;
Mutex MDatabase;
private:
bool Open(uint32 *errnum = nullptr, char *errbuf = nullptr);
MYSQL mysql;
Mutex MDatabase;
eStatus pStatus;
char* pHost;
char* pUser;
char* pPassword;
char* pDatabase;
bool pCompress;
uint32 pPort;
bool pSSL;
std::string origin_host;
char *pHost;
char *pUser;
char *pPassword;
char *pDatabase;
bool pCompress;
uint32 pPort;
bool pSSL;
};
+149
View File
@@ -0,0 +1,149 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "deity.h"
EQ::deity::DeityTypeBit EQ::deity::ConvertDeityTypeToDeityTypeBit(DeityType deity_type)
{
switch (deity_type) {
case DeityBertoxxulous:
return bit_DeityBertoxxulous;
case DeityBrellSirilis:
return bit_DeityBrellSirilis;
case DeityCazicThule:
return bit_DeityCazicThule;
case DeityErollisiMarr:
return bit_DeityErollisiMarr;
case DeityBristlebane:
return bit_DeityBristlebane;
case DeityInnoruuk:
return bit_DeityInnoruuk;
case DeityKarana:
return bit_DeityKarana;
case DeityMithanielMarr:
return bit_DeityMithanielMarr;
case DeityPrexus:
return bit_DeityPrexus;
case DeityQuellious:
return bit_DeityQuellious;
case DeityRallosZek:
return bit_DeityRallosZek;
case DeityRodcetNife:
return bit_DeityRodcetNife;
case DeitySolusekRo:
return bit_DeitySolusekRo;
case DeityTheTribunal:
return bit_DeityTheTribunal;
case DeityTunare:
return bit_DeityTunare;
case DeityVeeshan:
return bit_DeityVeeshan;
case DeityAgnostic_LB:
case DeityAgnostic:
return bit_DeityAgnostic;
default:
return bit_DeityAll;
};
}
EQ::deity::DeityType EQ::deity::ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit)
{
switch (deity_type_bit) {
case bit_DeityAgnostic:
return DeityAgnostic;
case bit_DeityBertoxxulous:
return DeityBertoxxulous;
case bit_DeityBrellSirilis:
return DeityBrellSirilis;
case bit_DeityCazicThule:
return DeityCazicThule;
case bit_DeityErollisiMarr:
return DeityErollisiMarr;
case bit_DeityBristlebane:
return DeityBristlebane;
case bit_DeityInnoruuk:
return DeityInnoruuk;
case bit_DeityKarana:
return DeityKarana;
case bit_DeityMithanielMarr:
return DeityMithanielMarr;
case bit_DeityPrexus:
return DeityPrexus;
case bit_DeityQuellious:
return DeityQuellious;
case bit_DeityRallosZek:
return DeityRallosZek;
case bit_DeityRodcetNife:
return DeityRodcetNife;
case bit_DeitySolusekRo:
return DeitySolusekRo;
case bit_DeityTheTribunal:
return DeityTheTribunal;
case bit_DeityTunare:
return DeityTunare;
case bit_DeityVeeshan:
return DeityVeeshan;
default:
return DeityUnknown;
};
}
const char* EQ::deity::DeityName(DeityType deity_type)
{
switch (deity_type) {
case DeityBertoxxulous:
return "Bertoxxulous";
case DeityBrellSirilis:
return "Brell Serilis";
case DeityCazicThule:
return "Cazic-Thule";
case DeityErollisiMarr:
return "Erollisi Marr";
case DeityBristlebane:
return "Bristlebane";
case DeityInnoruuk:
return "Innoruuk";
case DeityKarana:
return "Karana";
case DeityMithanielMarr:
return "Mithaniel Marr";
case DeityPrexus:
return "Prexus";
case DeityQuellious:
return "Quellious";
case DeityRallosZek:
return "Rallos Zek";
case DeityRodcetNife:
return "Rodcet Nife";
case DeitySolusekRo:
return "Solusek Ro";
case DeityTheTribunal:
return "The Tribunal";
case DeityTunare:
return "Tunare";
case DeityVeeshan:
return "Veeshan";
case DeityAgnostic_LB:
case DeityAgnostic:
return "Agnostic";
default:
return "Unknown";
};
}
+56 -141
View File
@@ -1,5 +1,6 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,154 +14,68 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEITY_H
#define DEITY_H
#ifndef COMMON_DEITY_H
#define COMMON_DEITY_H
#include "types.h"
#include <string>
// NOTE: This code is not fully implemented since there are no references in the existing code
/*
** Diety types
**
** (ref: eqstr_us.txt)
**
** (Another orphaned enumeration...)
*/
enum DeityTypes
namespace EQ
{
/*----*/ DeityUnknown = 0,
/*----*/ DeityAgnostic_LB = 140,
/*3251*/ DeityBertoxxulous = 201,
/*3262*/ DeityBrellSirilis,
/*3253*/ DeityCazicThule,
/*3256*/ DeityErollisiMarr,
/*3252*/ DeityBristlebane,
/*3254*/ DeityInnoruuk,
/*3255*/ DeityKarana,
/*3257*/ DeityMithanielMarr,
/*3259*/ DeityPrexus,
/*3260*/ DeityQuellious,
/*3266*/ DeityRallosZek,
/*3258*/ DeityRodcetNife,
/*3261*/ DeitySolusekRo,
/*3263*/ DeityTheTribunal,
/*3264*/ DeityTunare,
/*3265*/ DeityVeeshan,
/*3250*/ DeityAgnostic = 396
};
namespace deity {
enum DeityType {
DeityUnknown = 0,
DeityAgnostic_LB = 140,
DeityBertoxxulous = 201,
DeityBrellSirilis,
DeityCazicThule,
DeityErollisiMarr,
DeityBristlebane,
DeityInnoruuk,
DeityKarana,
DeityMithanielMarr,
DeityPrexus,
DeityQuellious,
DeityRallosZek,
DeityRodcetNife,
DeitySolusekRo,
DeityTheTribunal,
DeityTunare,
DeityVeeshan,
DeityAgnostic = 396
};
/*
** Deity type bits
**
** (New orphan, but make use of it!)
*/
enum DeityTypeBits : uint32
{
BIT_DeityAll = 0x00000000,
BIT_DeityAgnostic = 0x00000001,
BIT_DeityBertoxxulous = 0x00000002,
BIT_DeityBrellSirilis = 0x00000004,
BIT_DeityCazicThule = 0x00000008,
BIT_DeityErollisiMarr = 0x00000010,
BIT_DeityBristlebane = 0x00000020,
BIT_DeityInnoruuk = 0x00000040,
BIT_DeityKarana = 0x00000080,
BIT_DeityMithanielMarr = 0x00000100,
BIT_DeityPrexus = 0x00000200,
BIT_DeityQuellious = 0x00000400,
BIT_DeityRallosZek = 0x00000800,
BIT_DeityRodcetNife = 0x00001000,
BIT_DeitySolusekRo = 0x00002000,
BIT_DeityTheTribunal = 0x00004000,
BIT_DeityTunare = 0x00008000,
BIT_DeityVeeshan = 0x00010000
};
enum DeityTypeBit : uint32 {
bit_DeityNone = 0x00000000,
bit_DeityAgnostic = 0x00000001,
bit_DeityBertoxxulous = 0x00000002,
bit_DeityBrellSirilis = 0x00000004,
bit_DeityCazicThule = 0x00000008,
bit_DeityErollisiMarr = 0x00000010,
bit_DeityBristlebane = 0x00000020,
bit_DeityInnoruuk = 0x00000040,
bit_DeityKarana = 0x00000080,
bit_DeityMithanielMarr = 0x00000100,
bit_DeityPrexus = 0x00000200,
bit_DeityQuellious = 0x00000400,
bit_DeityRallosZek = 0x00000800,
bit_DeityRodcetNife = 0x00001000,
bit_DeitySolusekRo = 0x00002000,
bit_DeityTheTribunal = 0x00004000,
bit_DeityTunare = 0x00008000,
bit_DeityVeeshan = 0x00010000,
bit_DeityAll = 0xFFFFFFFF
};
static DeityTypeBits ConvertDeityToBitDeity(DeityTypes deity)
{
switch(deity)
{
case DeityBertoxxulous: { return BIT_DeityBertoxxulous; }
case DeityBrellSirilis: { return BIT_DeityBrellSirilis; }
case DeityCazicThule: { return BIT_DeityCazicThule; }
case DeityErollisiMarr: { return BIT_DeityErollisiMarr; }
case DeityBristlebane: { return BIT_DeityBristlebane; }
case DeityInnoruuk: { return BIT_DeityInnoruuk; }
case DeityKarana: { return BIT_DeityKarana; }
case DeityMithanielMarr: { return BIT_DeityMithanielMarr; }
case DeityPrexus: { return BIT_DeityPrexus; }
case DeityQuellious: { return BIT_DeityQuellious; }
case DeityRallosZek: { return BIT_DeityRallosZek; }
case DeityRodcetNife: { return BIT_DeityRodcetNife; }
case DeitySolusekRo: { return BIT_DeitySolusekRo; }
case DeityTheTribunal: { return BIT_DeityTheTribunal; }
case DeityTunare: { return BIT_DeityTunare; }
case DeityVeeshan: { return BIT_DeityVeeshan; }
case DeityAgnostic_LB:
case DeityAgnostic: { return BIT_DeityAgnostic; }
default: { break; }
};
extern DeityTypeBit ConvertDeityTypeToDeityTypeBit(DeityType deity_type);
extern DeityType ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit);
extern const char* DeityName(DeityType deity_type);
return BIT_DeityAll;
};
} /*deity*/
static DeityTypes ConvertBitDeityToDeity(DeityTypeBits deity_bit)
{
switch(deity_bit)
{
case BIT_DeityAgnostic: { return DeityAgnostic; }
case BIT_DeityBertoxxulous: { return DeityBertoxxulous; }
case BIT_DeityBrellSirilis: { return DeityBrellSirilis; }
case BIT_DeityCazicThule: { return DeityCazicThule; }
case BIT_DeityErollisiMarr: { return DeityErollisiMarr; }
case BIT_DeityBristlebane: { return DeityBristlebane; }
case BIT_DeityInnoruuk: { return DeityInnoruuk; }
case BIT_DeityKarana: { return DeityKarana; }
case BIT_DeityMithanielMarr: { return DeityMithanielMarr; }
case BIT_DeityPrexus: { return DeityPrexus; }
case BIT_DeityQuellious: { return DeityQuellious; }
case BIT_DeityRallosZek: { return DeityRallosZek; }
case BIT_DeityRodcetNife: { return DeityRodcetNife; }
case BIT_DeitySolusekRo: { return DeitySolusekRo; }
case BIT_DeityTheTribunal: { return DeityTheTribunal; }
case BIT_DeityTunare: { return DeityTunare; }
case BIT_DeityVeeshan: { return DeityVeeshan; }
default: { break; }
};
} /*EQEmu*/
return DeityUnknown;
};
static std::string GetDeityName(DeityTypes deity)
{
switch(deity)
{
case DeityBertoxxulous: { return "Bertoxxulous"; }
case DeityBrellSirilis: { return "Brell Serilis"; }
case DeityCazicThule: { return "Cazic-Thule"; }
case DeityErollisiMarr: { return "Erollisi Marr"; }
case DeityBristlebane: { return "Bristlebane"; }
case DeityInnoruuk: { return "Innoruuk"; }
case DeityKarana: { return "Karana"; }
case DeityMithanielMarr: { return "Mithaniel Marr"; }
case DeityPrexus: { return "Prexus"; }
case DeityQuellious: { return "Quellious"; }
case DeityRallosZek: { return "Rallos Zek"; }
case DeityRodcetNife: { return "Rodcet Nife"; }
case DeitySolusekRo: { return "Solusek Ro"; }
case DeityTheTribunal: { return "The Tribunal"; }
case DeityTunare: { return "Tunare"; }
case DeityVeeshan: { return "Veeshan"; }
case DeityAgnostic_LB:
case DeityAgnostic: { return "Agnostic"; }
default: { break; }
};
return "Unknown";
};
#endif
#endif /* COMMON_DEITY_H */
+599
View File
@@ -0,0 +1,599 @@
#include "dynamic_zone_base.h"
#include "database.h"
#include "eqemu_logsys.h"
#include "repositories/instance_list_repository.h"
#include "repositories/instance_list_player_repository.h"
#include "rulesys.h"
#include "servertalk.h"
#include "util/uuid.h"
DynamicZoneBase::DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& entry)
{
LoadRepositoryResult(std::move(entry));
}
uint32_t DynamicZoneBase::Create()
{
if (GetInstanceID() == 0)
{
CreateInstance();
}
m_uuid = EQ::Util::UUID::Generate().ToString();
m_id = SaveToDatabase();
return m_id;
}
uint32_t DynamicZoneBase::CreateInstance()
{
if (m_instance_id)
{
LogDynamicZones("CreateInstance failed, instance id [{}] already created", m_instance_id);
return 0;
}
if (!m_zone_id)
{
LogDynamicZones("CreateInstance failed, invalid zone id [{}]", m_zone_id);
return 0;
}
uint16_t unused_instance_id = 0;
if (!GetDatabase().GetUnusedInstanceID(unused_instance_id)) // todo: doesn't this race with insert?
{
LogDynamicZones("Failed to find unused instance id");
return 0;
}
m_start_time = std::chrono::system_clock::now();
m_expire_time = m_start_time + m_duration;
auto insert_instance = InstanceListRepository::NewEntity();
insert_instance.id = unused_instance_id;
insert_instance.zone = m_zone_id;
insert_instance.version = m_zone_version;
insert_instance.start_time = static_cast<int>(std::chrono::system_clock::to_time_t(m_start_time));
insert_instance.duration = static_cast<int>(m_duration.count());
insert_instance.never_expires = m_never_expires;
auto instance = InstanceListRepository::InsertOne(GetDatabase(), insert_instance);
if (instance.id == 0)
{
LogDynamicZones("Failed to create instance [{}] for zone [{}]", unused_instance_id, m_zone_id);
return 0;
}
m_instance_id = instance.id;
return m_instance_id;
}
void DynamicZoneBase::LoadRepositoryResult(DynamicZonesRepository::DynamicZoneInstance&& dz_entry)
{
m_id = dz_entry.id;
m_uuid = std::move(dz_entry.uuid);
m_name = std::move(dz_entry.name);
m_leader.id = dz_entry.leader_id;
m_min_players = dz_entry.min_players;
m_max_players = dz_entry.max_players;
m_instance_id = dz_entry.instance_id;
m_type = static_cast<DynamicZoneType>(dz_entry.type);
m_compass.zone_id = dz_entry.compass_zone_id;
m_compass.x = dz_entry.compass_x;
m_compass.y = dz_entry.compass_y;
m_compass.z = dz_entry.compass_z;
m_safereturn.zone_id = dz_entry.safe_return_zone_id;
m_safereturn.x = dz_entry.safe_return_x;
m_safereturn.y = dz_entry.safe_return_y;
m_safereturn.z = dz_entry.safe_return_z;
m_safereturn.heading = dz_entry.safe_return_heading;
m_zonein.x = dz_entry.zone_in_x;
m_zonein.y = dz_entry.zone_in_y;
m_zonein.z = dz_entry.zone_in_z;
m_zonein.heading = dz_entry.zone_in_heading;
m_has_zonein = (dz_entry.has_zone_in != 0);
// instance_list portion
m_zone_id = dz_entry.zone;
m_zone_version = dz_entry.version;
m_start_time = std::chrono::system_clock::from_time_t(dz_entry.start_time);
m_duration = std::chrono::seconds(dz_entry.duration);
m_never_expires = (dz_entry.never_expires != 0);
m_expire_time = m_start_time + m_duration;
}
void DynamicZoneBase::AddMemberFromRepositoryResult(
DynamicZoneMembersRepository::MemberWithName&& entry)
{
auto status = DynamicZoneMemberStatus::Unknown;
if (m_leader.id == entry.character_id)
{
m_leader.name = entry.character_name;
}
AddInternalMember({ entry.character_id, std::move(entry.character_name), status });
}
uint32_t DynamicZoneBase::SaveToDatabase()
{
LogDynamicZonesDetail("Saving dz instance [{}] to database", m_instance_id);
if (m_instance_id != 0)
{
auto insert_dz = DynamicZonesRepository::NewEntity();
insert_dz.uuid = m_uuid;
insert_dz.name = m_name;
insert_dz.leader_id = m_leader.id;
insert_dz.min_players = m_min_players;
insert_dz.max_players = m_max_players;
insert_dz.instance_id = m_instance_id,
insert_dz.type = static_cast<int>(m_type);
insert_dz.compass_zone_id = m_compass.zone_id;
insert_dz.compass_x = m_compass.x;
insert_dz.compass_y = m_compass.y;
insert_dz.compass_z = m_compass.z;
insert_dz.safe_return_zone_id = m_safereturn.zone_id;
insert_dz.safe_return_x = m_safereturn.x;
insert_dz.safe_return_y = m_safereturn.y;
insert_dz.safe_return_z = m_safereturn.z;
insert_dz.safe_return_heading = m_safereturn.heading;
insert_dz.zone_in_x = m_zonein.x;
insert_dz.zone_in_y = m_zonein.y;
insert_dz.zone_in_z = m_zonein.z;
insert_dz.zone_in_heading = m_zonein.heading;
insert_dz.has_zone_in = m_has_zonein;
auto inserted_dz = DynamicZonesRepository::InsertOne(GetDatabase(), insert_dz);
return inserted_dz.id;
}
return 0;
}
bool DynamicZoneBase::AddMember(const DynamicZoneMember& add_member)
{
if (HasMember(add_member.id))
{
return false;
}
DynamicZoneMembersRepository::AddMember(GetDatabase(), m_id, add_member.id);
GetDatabase().AddClientToInstance(m_instance_id, add_member.id);
ProcessMemberAddRemove(add_member, false);
SendServerPacket(CreateServerMemberAddRemovePacket(add_member, false).get());
return true;
}
bool DynamicZoneBase::RemoveMember(uint32_t character_id)
{
auto remove_member = GetMemberData(character_id);
return RemoveMember(remove_member);
}
bool DynamicZoneBase::RemoveMember(const std::string& character_name)
{
auto remove_member = GetMemberData(character_name);
return RemoveMember(remove_member);
}
bool DynamicZoneBase::RemoveMember(const DynamicZoneMember& remove_member)
{
if (remove_member.id == 0)
{
return false;
}
DynamicZoneMembersRepository::RemoveMember(GetDatabase(), m_id, remove_member.id);
GetDatabase().RemoveClientFromInstance(m_instance_id, remove_member.id);
ProcessMemberAddRemove(remove_member, true);
SendServerPacket(CreateServerMemberAddRemovePacket(remove_member, true).get());
return true;
}
bool DynamicZoneBase::SwapMember(
const DynamicZoneMember& add_member, const std::string& remove_char_name)
{
auto remove_member = GetMemberData(remove_char_name);
if (!add_member.IsValid() || !remove_member.IsValid())
{
return false;
}
// make remove and add atomic to avoid racing with separate world messages
DynamicZoneMembersRepository::RemoveMember(GetDatabase(), m_id, remove_member.id);
GetDatabase().RemoveClientFromInstance(m_instance_id, remove_member.id);
DynamicZoneMembersRepository::AddMember(GetDatabase(), m_id, add_member.id);
GetDatabase().AddClientToInstance(m_instance_id, add_member.id);
ProcessMemberAddRemove(remove_member, true);
ProcessMemberAddRemove(add_member, false);
SendServerPacket(CreateServerMemberSwapPacket(remove_member, add_member).get());
return true;
}
void DynamicZoneBase::RemoveAllMembers()
{
DynamicZoneMembersRepository::RemoveAllMembers(GetDatabase(), m_id);
GetDatabase().RemoveClientsFromInstance(GetInstanceID());
ProcessRemoveAllMembers();
SendServerPacket(CreateServerRemoveAllMembersPacket().get());
}
void DynamicZoneBase::SaveMembers(const std::vector<DynamicZoneMember>& members)
{
LogDynamicZonesDetail("Saving [{}] member(s) for dz [{}]", members.size(), m_id);
m_members = members;
// the lower level instance_list_players needs to be kept updated as well
std::vector<DynamicZoneMembersRepository::DynamicZoneMembers> insert_members;
std::vector<InstanceListPlayerRepository::InstanceListPlayer> insert_players;
for (const auto& member : m_members)
{
DynamicZoneMembersRepository::DynamicZoneMembers member_entry{};
member_entry.dynamic_zone_id = m_id;
member_entry.character_id = member.id;
insert_members.emplace_back(member_entry);
InstanceListPlayerRepository::InstanceListPlayer player_entry;
player_entry.id = static_cast<int>(m_instance_id);
player_entry.charid = static_cast<int>(member.id);
insert_players.emplace_back(player_entry);
}
DynamicZoneMembersRepository::InsertOrUpdateMany(GetDatabase(), insert_members);
InstanceListPlayerRepository::InsertOrUpdateMany(GetDatabase(), insert_players);
}
void DynamicZoneBase::SetCompass(const DynamicZoneLocation& location, bool update_db)
{
ProcessCompassChange(location);
if (update_db)
{
LogDynamicZonesDetail("Saving [{}] compass zone: [{}] xyz: ([{}], [{}], [{}])",
m_id, m_compass.zone_id, m_compass.x, m_compass.y, m_compass.z);
DynamicZonesRepository::UpdateCompass(GetDatabase(),
m_id, m_compass.zone_id, m_compass.x, m_compass.y, m_compass.z);
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetCompass, location).get());
}
}
void DynamicZoneBase::SetCompass(uint32_t zone_id, float x, float y, float z, bool update_db)
{
SetCompass({ zone_id, x, y, z, 0.0f }, update_db);
}
void DynamicZoneBase::SetSafeReturn(const DynamicZoneLocation& location, bool update_db)
{
m_safereturn = location;
if (update_db)
{
LogDynamicZonesDetail("Saving [{}] safereturn zone: [{}] xyzh: ([{}], [{}], [{}], [{}])",
m_id, m_safereturn.zone_id, m_safereturn.x, m_safereturn.y, m_safereturn.z, m_safereturn.heading);
DynamicZonesRepository::UpdateSafeReturn(GetDatabase(), m_id, m_safereturn.zone_id,
m_safereturn.x, m_safereturn.y, m_safereturn.z, m_safereturn.heading);
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetSafeReturn, location).get());
}
}
void DynamicZoneBase::SetSafeReturn(uint32_t zone_id, float x, float y, float z, float heading, bool update_db)
{
SetSafeReturn({ zone_id, x, y, z, heading }, update_db);
}
void DynamicZoneBase::SetZoneInLocation(const DynamicZoneLocation& location, bool update_db)
{
m_zonein = location;
m_has_zonein = true;
if (update_db)
{
LogDynamicZonesDetail("Saving [{}] zonein zone: [{}] xyzh: ([{}], [{}], [{}], [{}])",
m_id, m_zone_id, m_zonein.x, m_zonein.y, m_zonein.z, m_zonein.heading);
DynamicZonesRepository::UpdateZoneIn(GetDatabase(), m_id, m_zone_id,
m_zonein.x, m_zonein.y, m_zonein.z, m_zonein.heading, m_has_zonein);
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetZoneIn, location).get());
}
}
void DynamicZoneBase::SetZoneInLocation(float x, float y, float z, float heading, bool update_db)
{
SetZoneInLocation({ 0, x, y, z, heading }, update_db);
}
void DynamicZoneBase::SetLeader(const DynamicZoneMember& new_leader, bool update_db)
{
m_leader = new_leader;
if (update_db)
{
DynamicZonesRepository::UpdateLeaderID(GetDatabase(), m_id, new_leader.id);
}
}
uint32_t DynamicZoneBase::GetSecondsRemaining() const
{
auto remaining = std::chrono::duration_cast<std::chrono::seconds>(GetDurationRemaining()).count();
return std::max(0, static_cast<int>(remaining));
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberAddRemovePacket(
const DynamicZoneMember& member, bool removed)
{
constexpr uint32_t pack_size = sizeof(ServerDzMember_Struct);
auto pack = std::make_unique<ServerPacket>(ServerOP_DzAddRemoveMember, pack_size);
auto buf = reinterpret_cast<ServerDzMember_Struct*>(pack->pBuffer);
buf->dz_id = GetID();
buf->dz_zone_id = GetZoneID();
buf->dz_instance_id = GetInstanceID();
buf->sender_zone_id = GetCurrentZoneID();
buf->sender_instance_id = GetCurrentInstanceID();
buf->removed = removed;
buf->character_id = member.id;
buf->character_status = static_cast<uint8_t>(member.status);
strn0cpy(buf->character_name, member.name.c_str(), sizeof(buf->character_name));
return pack;
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberSwapPacket(
const DynamicZoneMember& remove_member, const DynamicZoneMember& add_member)
{
constexpr uint32_t pack_size = sizeof(ServerDzMemberSwap_Struct);
auto pack = std::make_unique<ServerPacket>(ServerOP_DzSwapMembers, pack_size);
auto buf = reinterpret_cast<ServerDzMemberSwap_Struct*>(pack->pBuffer);
buf->dz_id = GetID();
buf->dz_zone_id = GetZoneID();
buf->dz_instance_id = GetInstanceID();
buf->sender_zone_id = GetCurrentZoneID();
buf->sender_instance_id = GetCurrentInstanceID();
buf->add_character_status = static_cast<uint8_t>(add_member.status);
buf->add_character_id = add_member.id;
buf->remove_character_id = remove_member.id;
strn0cpy(buf->add_character_name, add_member.name.c_str(), sizeof(buf->add_character_name));
strn0cpy(buf->remove_character_name, remove_member.name.c_str(), sizeof(buf->remove_character_name));
return pack;
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerRemoveAllMembersPacket()
{
constexpr uint32_t pack_size = sizeof(ServerDzID_Struct);
auto pack = std::make_unique<ServerPacket>(ServerOP_DzRemoveAllMembers, pack_size);
auto buf = reinterpret_cast<ServerDzID_Struct*>(pack->pBuffer);
buf->dz_id = GetID();
buf->dz_zone_id = GetZoneID();
buf->dz_instance_id = GetInstanceID();
buf->sender_zone_id = GetCurrentZoneID();
buf->sender_instance_id = GetCurrentInstanceID();
return pack;
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerDzLocationPacket(
uint16_t server_opcode, const DynamicZoneLocation& location)
{
constexpr uint32_t pack_size = sizeof(ServerDzLocation_Struct);
auto pack = std::make_unique<ServerPacket>(server_opcode, pack_size);
auto buf = reinterpret_cast<ServerDzLocation_Struct*>(pack->pBuffer);
buf->dz_id = GetID();
buf->sender_zone_id = GetCurrentZoneID();
buf->sender_instance_id = GetCurrentInstanceID();
buf->zone_id = location.zone_id;
buf->x = location.x;
buf->y = location.y;
buf->z = location.z;
buf->heading = location.heading;
return pack;
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberStatusPacket(
uint32_t character_id, DynamicZoneMemberStatus status)
{
constexpr uint32_t pack_size = sizeof(ServerDzMemberStatus_Struct);
auto pack = std::make_unique<ServerPacket>(ServerOP_DzUpdateMemberStatus, pack_size);
auto buf = reinterpret_cast<ServerDzMemberStatus_Struct*>(pack->pBuffer);
buf->dz_id = GetID();
buf->sender_zone_id = GetCurrentZoneID();
buf->sender_instance_id = GetCurrentInstanceID();
buf->status = static_cast<uint8_t>(status);
buf->character_id = character_id;
return pack;
}
uint32_t DynamicZoneBase::GetDatabaseMemberCount()
{
return DynamicZoneMembersRepository::GetCountWhere(GetDatabase(),
fmt::format("dynamic_zone_id = {}", m_id));
}
bool DynamicZoneBase::HasDatabaseMember(uint32_t character_id)
{
if (character_id == 0)
{
return false;
}
auto entries = DynamicZoneMembersRepository::GetWhere(GetDatabase(), fmt::format(
"dynamic_zone_id = {} AND character_id = {}",
m_id, character_id
));
return entries.size() != 0;
}
void DynamicZoneBase::AddInternalMember(const DynamicZoneMember& member)
{
if (!HasMember(member.id))
{
m_members.emplace_back(member);
}
}
void DynamicZoneBase::RemoveInternalMember(uint32_t character_id)
{
m_members.erase(std::remove_if(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) { return member.id == character_id; }
), m_members.end());
}
bool DynamicZoneBase::HasMember(uint32_t character_id)
{
return std::any_of(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) { return member.id == character_id; });
}
bool DynamicZoneBase::HasMember(const std::string& character_name)
{
return std::any_of(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) {
return strcasecmp(member.name.c_str(), character_name.c_str()) == 0;
});
}
DynamicZoneMember DynamicZoneBase::GetMemberData(uint32_t character_id)
{
auto it = std::find_if(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) { return member.id == character_id; });
DynamicZoneMember member_data;
if (it != m_members.end())
{
member_data = *it;
}
return member_data;
}
DynamicZoneMember DynamicZoneBase::GetMemberData(const std::string& character_name)
{
auto it = std::find_if(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) {
return strcasecmp(member.name.c_str(), character_name.c_str()) == 0;
});
DynamicZoneMember member_data;
if (it != m_members.end())
{
member_data = *it;
}
return member_data;
}
bool DynamicZoneBase::SetInternalMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status)
{
if (status == DynamicZoneMemberStatus::InDynamicZone && !RuleB(DynamicZone, EnableInDynamicZoneStatus))
{
status = DynamicZoneMemberStatus::Online;
}
if (character_id == m_leader.id)
{
m_leader.status = status;
}
auto it = std::find_if(m_members.begin(), m_members.end(),
[&](const DynamicZoneMember& member) { return member.id == character_id; });
if (it != m_members.end() && it->status != status)
{
it->status = status;
return true;
}
return false;
}
void DynamicZoneBase::SetMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status)
{
auto update_member = GetMemberData(character_id);
if (update_member.IsValid())
{
ProcessMemberStatusChange(character_id, status);
SendServerPacket(CreateServerMemberStatusPacket(character_id, status).get());
}
}
void DynamicZoneBase::ProcessMemberAddRemove(const DynamicZoneMember& member, bool removed)
{
if (!removed)
{
AddInternalMember(member);
}
else
{
RemoveInternalMember(member.id);
}
}
bool DynamicZoneBase::ProcessMemberStatusChange(uint32_t character_id, DynamicZoneMemberStatus status)
{
return SetInternalMemberStatus(character_id, status);
}
std::string DynamicZoneBase::GetDynamicZoneTypeName(DynamicZoneType dz_type)
{
switch (dz_type)
{
case DynamicZoneType::Expedition:
return "Expedition";
case DynamicZoneType::Tutorial:
return "Tutorial";
case DynamicZoneType::Task:
return "Task";
case DynamicZoneType::Mission:
return "Mission";
case DynamicZoneType::Quest:
return "Quest";
}
return "Unknown";
}
EQ::Net::DynamicPacket DynamicZoneBase::GetSerializedDzPacket()
{
EQ::Net::DynamicPacket dyn_pack;
dyn_pack.PutSerialize(0, *this);
LogDynamicZonesDetail("Serialized server dz size [{}]", dyn_pack.Length());
return dyn_pack;
}
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerDzCreatePacket(
uint16_t origin_zone_id, uint16_t origin_instance_id)
{
EQ::Net::DynamicPacket dyn_pack = GetSerializedDzPacket();
auto pack_size = sizeof(ServerDzCreateSerialized_Struct) + dyn_pack.Length();
auto pack = std::make_unique<ServerPacket>(ServerOP_DzCreated, static_cast<uint32_t>(pack_size));
auto buf = reinterpret_cast<ServerDzCreateSerialized_Struct*>(pack->pBuffer);
buf->origin_zone_id = origin_zone_id;
buf->origin_instance_id = origin_instance_id;
buf->cereal_size = static_cast<uint32_t>(dyn_pack.Length());
memcpy(buf->cereal_data, dyn_pack.Data(), dyn_pack.Length());
return pack;
}
void DynamicZoneBase::LoadSerializedDzPacket(char* cereal_data, uint32_t cereal_size)
{
LogDynamicZonesDetail("Deserializing server dz size [{}]", cereal_size);
EQ::Util::MemoryStreamReader ss(cereal_data, cereal_size);
cereal::BinaryInputArchive archive(ss);
archive(*this);
}
+211
View File
@@ -0,0 +1,211 @@
#ifndef COMMON_DYNAMIC_ZONE_BASE_H
#define COMMON_DYNAMIC_ZONE_BASE_H
#include "eq_constants.h"
#include "net/packet.h"
#include "repositories/dynamic_zones_repository.h"
#include "repositories/dynamic_zone_members_repository.h"
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
class Database;
class ServerPacket;
struct DynamicZoneMember
{
uint32_t id = 0;
std::string name;
DynamicZoneMemberStatus status = DynamicZoneMemberStatus::Unknown;
DynamicZoneMember() = default;
DynamicZoneMember(uint32_t id, std::string name_)
: id(id), name{std::move(name_)} {}
DynamicZoneMember(uint32_t id, std::string name_, DynamicZoneMemberStatus status_)
: id(id), name{std::move(name_)}, status(status_) {}
bool IsOnline() const { return status == DynamicZoneMemberStatus::Online ||
status == DynamicZoneMemberStatus::InDynamicZone; }
bool IsValid() const { return id != 0 && !name.empty(); }
template<class Archive>
void serialize(Archive& archive)
{
archive(id, name, status);
}
};
struct DynamicZoneLocation
{
uint32_t zone_id = 0;
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
float heading = 0.0f;
DynamicZoneLocation() = default;
DynamicZoneLocation(uint32_t zone_id_, float x_, float y_, float z_, float heading_)
: zone_id(zone_id_), x(x_), y(y_), z(z_), heading(heading_) {}
template<class Archive>
void serialize(Archive& archive)
{
archive(zone_id, x, y, z, heading);
}
};
class DynamicZoneBase
{
public:
virtual ~DynamicZoneBase() = default;
DynamicZoneBase(const DynamicZoneBase&) = default;
DynamicZoneBase(DynamicZoneBase&&) = default;
DynamicZoneBase& operator=(const DynamicZoneBase&) = default;
DynamicZoneBase& operator=(DynamicZoneBase&&) = default;
DynamicZoneBase() = default;
DynamicZoneBase(uint32_t dz_id) : m_id(dz_id) {}
DynamicZoneBase(DynamicZoneType type) : m_type(type) {}
DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& entry);
static std::string GetDynamicZoneTypeName(DynamicZoneType dz_type);
virtual void SetSecondsRemaining(uint32_t seconds_remaining) = 0;
uint64_t GetExpireTime() const { return std::chrono::system_clock::to_time_t(m_expire_time); }
uint32_t GetID() const { return m_id; }
uint16_t GetInstanceID() const { return static_cast<uint16_t>(m_instance_id); }
uint32_t GetLeaderID() const { return m_leader.id; }
uint32_t GetMaxPlayers() const { return m_max_players; }
uint32_t GetMemberCount() const { return static_cast<uint32_t>(m_members.size()); }
uint32_t GetMinPlayers() const { return m_min_players; }
uint32_t GetSecondsRemaining() const;
uint16_t GetZoneID() const { return static_cast<uint16_t>(m_zone_id); }
uint32_t GetZoneIndex() const { return (m_instance_id << 16) | (m_zone_id & 0xffff); }
uint32_t GetZoneVersion() const { return m_zone_version; }
DynamicZoneType GetType() const { return m_type; }
const std::string& GetLeaderName() const { return m_leader.name; }
const std::string& GetName() const { return m_name; }
const std::string& GetUUID() const { return m_uuid; }
const DynamicZoneMember& GetLeader() const { return m_leader; }
const std::vector<DynamicZoneMember>& GetMembers() const { return m_members; }
const DynamicZoneLocation& GetCompassLocation() const { return m_compass; }
const DynamicZoneLocation& GetSafeReturnLocation() const { return m_safereturn; }
const DynamicZoneLocation& GetZoneInLocation() const { return m_zonein; }
std::chrono::system_clock::duration GetDurationRemaining() const { return m_expire_time - std::chrono::system_clock::now(); }
bool AddMember(const DynamicZoneMember& add_member);
void AddMemberFromRepositoryResult(DynamicZoneMembersRepository::MemberWithName&& entry);
uint32_t GetDatabaseMemberCount();
DynamicZoneMember GetMemberData(uint32_t character_id);
DynamicZoneMember GetMemberData(const std::string& character_name);
EQ::Net::DynamicPacket GetSerializedDzPacket();
bool HasDatabaseMember(uint32_t character_id);
bool HasMember(uint32_t character_id);
bool HasMember(const std::string& character_name);
bool HasMembers() const { return !m_members.empty(); }
bool HasZoneInLocation() const { return m_has_zonein; }
bool IsExpired() const { return m_expire_time < std::chrono::system_clock::now(); }
bool IsInstanceID(uint32_t instance_id) const { return (m_instance_id != 0 && m_instance_id == instance_id); }
bool IsValid() const { return m_instance_id != 0; }
bool IsSameDz(uint32_t zone_id, uint32_t instance_id) const { return zone_id == m_zone_id && instance_id == m_instance_id; }
void LoadSerializedDzPacket(char* cereal_data, uint32_t cereal_size);
void RemoveAllMembers();
bool RemoveMember(uint32_t character_id);
bool RemoveMember(const std::string& character_name);
bool RemoveMember(const DynamicZoneMember& remove_member);
void SaveMembers(const std::vector<DynamicZoneMember>& members);
void SetCompass(const DynamicZoneLocation& location, bool update_db = false);
void SetCompass(uint32_t zone_id, float x, float y, float z, bool update_db = false);
void SetDuration(uint32_t seconds) { m_duration = std::chrono::seconds(seconds); }
void SetLeader(const DynamicZoneMember& leader, bool update_db = false);
void SetMaxPlayers(uint32_t max_players) { m_max_players = max_players; }
void SetMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
void SetMinPlayers(uint32_t min_players) { m_min_players = min_players; }
void SetName(const std::string& name) { m_name = name; }
void SetSafeReturn(const DynamicZoneLocation& location, bool update_db = false);
void SetSafeReturn(uint32_t zone_id, float x, float y, float z, float heading, bool update_db = false);
void SetType(DynamicZoneType type) { m_type = type; }
void SetUUID(std::string uuid) { m_uuid = std::move(uuid); }
void SetZoneInLocation(const DynamicZoneLocation& location, bool update_db = false);
void SetZoneInLocation(float x, float y, float z, float heading, bool update_db = false);
bool SwapMember(const DynamicZoneMember& add_member, const std::string& remove_char_name);
protected:
virtual uint16_t GetCurrentInstanceID() { return 0; }
virtual uint16_t GetCurrentZoneID() { return 0; }
virtual Database& GetDatabase() = 0;
virtual void ProcessCompassChange(const DynamicZoneLocation& location) { m_compass = location; }
virtual void ProcessMemberAddRemove(const DynamicZoneMember& member, bool removed);
virtual bool ProcessMemberStatusChange(uint32_t member_id, DynamicZoneMemberStatus status);
virtual void ProcessRemoveAllMembers(bool silent = false) { m_members.clear(); }
virtual bool SendServerPacket(ServerPacket* packet) = 0;
void AddInternalMember(const DynamicZoneMember& member);
uint32_t Create();
uint32_t CreateInstance();
void LoadRepositoryResult(DynamicZonesRepository::DynamicZoneInstance&& dz_entry);
void RemoveInternalMember(uint32_t character_id);
uint32_t SaveToDatabase();
bool SetInternalMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
std::unique_ptr<ServerPacket> CreateServerDzCreatePacket(uint16_t origin_zone_id, uint16_t origin_instance_id);
std::unique_ptr<ServerPacket> CreateServerDzLocationPacket(uint16_t server_opcode, const DynamicZoneLocation& location);
std::unique_ptr<ServerPacket> CreateServerMemberAddRemovePacket(const DynamicZoneMember& member, bool removed);
std::unique_ptr<ServerPacket> CreateServerMemberStatusPacket(uint32_t character_id, DynamicZoneMemberStatus status);
std::unique_ptr<ServerPacket> CreateServerMemberSwapPacket(const DynamicZoneMember& remove_member, const DynamicZoneMember& add_member);
std::unique_ptr<ServerPacket> CreateServerRemoveAllMembersPacket();
uint32_t m_id = 0;
uint32_t m_zone_id = 0;
uint32_t m_instance_id = 0;
uint32_t m_zone_version = 0;
uint32_t m_min_players = 0;
uint32_t m_max_players = 0;
bool m_never_expires = false;
bool m_has_zonein = false;
bool m_has_member_statuses = false;
std::string m_name;
std::string m_uuid;
DynamicZoneMember m_leader;
DynamicZoneType m_type{ DynamicZoneType::None };
DynamicZoneLocation m_compass;
DynamicZoneLocation m_safereturn;
DynamicZoneLocation m_zonein;
std::chrono::seconds m_duration;
std::chrono::time_point<std::chrono::system_clock> m_start_time;
std::chrono::time_point<std::chrono::system_clock> m_expire_time;
std::vector<DynamicZoneMember> m_members;
public:
template<class Archive>
void serialize(Archive& archive)
{
archive(
m_id,
m_zone_id,
m_instance_id,
m_zone_version,
m_min_players,
m_max_players,
m_never_expires,
m_has_zonein,
m_has_member_statuses,
m_name,
m_uuid,
m_leader,
m_type,
m_compass,
m_safereturn,
m_zonein,
m_duration,
m_start_time,
m_expire_time,
m_members
);
}
};
#endif
+199
View File
@@ -0,0 +1,199 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "emu_constants.h"
#include "languages.h"
int16 EQ::invtype::GetInvTypeSize(int16 inv_type) {
static const int16 local_array[] = {
POSSESSIONS_SIZE,
BANK_SIZE,
SHARED_BANK_SIZE,
TRADE_SIZE,
WORLD_SIZE,
LIMBO_SIZE,
TRIBUTE_SIZE,
TROPHY_TRIBUTE_SIZE,
GUILD_TRIBUTE_SIZE,
MERCHANT_SIZE,
DELETED_SIZE,
CORPSE_SIZE,
BAZAAR_SIZE,
INSPECT_SIZE,
REAL_ESTATE_SIZE,
VIEW_MOD_PC_SIZE,
VIEW_MOD_BANK_SIZE,
VIEW_MOD_SHARED_BANK_SIZE,
VIEW_MOD_LIMBO_SIZE,
ALT_STORAGE_SIZE,
ARCHIVED_SIZE,
MAIL_SIZE,
GUILD_TROPHY_TRIBUTE_SIZE,
KRONO_SIZE,
OTHER_SIZE,
};
if (inv_type < TYPE_BEGIN || inv_type > TYPE_END)
return INULL;
return local_array[inv_type];
}
const char* EQ::bug::CategoryIDToCategoryName(CategoryID category_id) {
switch (category_id) {
case catVideo:
return "Video";
case catAudio:
return "Audio";
case catPathing:
return "Pathing";
case catQuest:
return "Quest";
case catTradeskills:
return "Tradeskills";
case catSpellStacking:
return "Spell stacking";
case catDoorsPortals:
return "Doors/Portals";
case catItems:
return "Items";
case catNPC:
return "NPC";
case catDialogs:
return "Dialogs";
case catLoNTCG:
return "LoN - TCG";
case catMercenaries:
return "Mercenaries";
case catOther:
default:
return "Other";
}
}
EQ::bug::CategoryID EQ::bug::CategoryNameToCategoryID(const char* category_name) {
if (!category_name)
return catOther;
if (!strcmp(category_name, "Video"))
return catVideo;
if (!strcmp(category_name, "Audio"))
return catAudio;
if (!strcmp(category_name, "Pathing"))
return catPathing;
if (!strcmp(category_name, "Quest"))
return catQuest;
if (!strcmp(category_name, "Tradeskills"))
return catTradeskills;
if (!strcmp(category_name, "Spell stacking"))
return catSpellStacking;
if (!strcmp(category_name, "Doors/Portals"))
return catDoorsPortals;
if (!strcmp(category_name, "Items"))
return catItems;
if (!strcmp(category_name, "NPC"))
return catNPC;
if (!strcmp(category_name, "Dialogs"))
return catDialogs;
if (!strcmp(category_name, "LoN - TCG"))
return catLoNTCG;
if (!strcmp(category_name, "Mercenaries"))
return catMercenaries;
return catOther;
}
const char *EQ::constants::GetStanceName(StanceType stance_type) {
switch (stance_type) {
case stanceUnknown:
return "Unknown";
case stancePassive:
return "Passive";
case stanceBalanced:
return "Balanced";
case stanceEfficient:
return "Efficient";
case stanceReactive:
return "Reactive";
case stanceAggressive:
return "Aggressive";
case stanceAssist:
return "Assist";
case stanceBurn:
return "Burn";
case stanceEfficient2:
return "Efficient2";
case stanceBurnAE:
return "BurnAE";
default:
return "Invalid";
}
}
int EQ::constants::ConvertStanceTypeToIndex(StanceType stance_type) {
if (stance_type >= EQ::constants::stancePassive && stance_type <= EQ::constants::stanceBurnAE)
return (stance_type - EQ::constants::stancePassive);
return 0;
}
const std::map<int, std::string>& EQ::constants::GetLanguageMap()
{
static const std::map<int, std::string> language_map = {
{ LANG_COMMON_TONGUE, "Common Tongue" },
{ LANG_BARBARIAN, "Barbarian" },
{ LANG_ERUDIAN, "Erudian" },
{ LANG_ELVISH, "Elvish" },
{ LANG_DARK_ELVISH, "Dark Elvish" },
{ LANG_DWARVISH, "Dwarvish" },
{ LANG_TROLL, "Troll" },
{ LANG_OGRE, "Ogre" },
{ LANG_GNOMISH, "Gnomish" },
{ LANG_HALFLING, "Halfling" },
{ LANG_THIEVES_CANT, "Thieves Cant" },
{ LANG_OLD_ERUDIAN, "Old Erudian" },
{ LANG_ELDER_ELVISH, "Elder Elvish" },
{ LANG_FROGLOK, "Froglok" },
{ LANG_GOBLIN, "Goblin" },
{ LANG_GNOLL, "Gnoll" },
{ LANG_COMBINE_TONGUE, "Combine Tongue" },
{ LANG_ELDER_TEIRDAL, "Elder Teirdal" },
{ LANG_LIZARDMAN, "Lizardman" },
{ LANG_ORCISH, "Orcish" },
{ LANG_FAERIE, "Faerie" },
{ LANG_DRAGON, "Dragon" },
{ LANG_ELDER_DRAGON, "Elder Dragon" },
{ LANG_DARK_SPEECH, "Dark Speech" },
{ LANG_VAH_SHIR, "Vah Shir" },
{ LANG_ALARAN, "Alaran" },
{ LANG_HADAL, "Hadal" },
{ LANG_UNKNOWN, "Unknown" }
};
return language_map;
}
std::string EQ::constants::GetLanguageName(int language_id)
{
if (language_id >= LANG_COMMON_TONGUE && language_id <= LANG_UNKNOWN) {
auto languages = EQ::constants::GetLanguageMap();
return languages[language_id];
}
return std::string();
}
+340
View File
@@ -0,0 +1,340 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_CONSTANTS_H
#define COMMON_EMU_CONSTANTS_H
#include "eq_limits.h"
#include "emu_versions.h"
#include <string.h>
// local definitions are the result of using hybrid-client or server-only values and methods
namespace EQ
{
using RoF2::IINVALID;
using RoF2::INULL;
namespace inventory {
} /*inventory*/
namespace invtype {
using namespace RoF2::invtype::enum_;
using RoF2::invtype::POSSESSIONS_SIZE;
using RoF2::invtype::BANK_SIZE;
using RoF2::invtype::SHARED_BANK_SIZE;
using RoF2::invtype::TRADE_SIZE;
using RoF2::invtype::WORLD_SIZE;
using RoF2::invtype::LIMBO_SIZE;
using RoF2::invtype::TRIBUTE_SIZE;
using RoF2::invtype::TROPHY_TRIBUTE_SIZE;
using RoF2::invtype::GUILD_TRIBUTE_SIZE;
using RoF2::invtype::MERCHANT_SIZE;
using RoF2::invtype::DELETED_SIZE;
using RoF2::invtype::CORPSE_SIZE;
using RoF2::invtype::BAZAAR_SIZE;
using RoF2::invtype::INSPECT_SIZE;
using RoF2::invtype::REAL_ESTATE_SIZE;
using RoF2::invtype::VIEW_MOD_PC_SIZE;
using RoF2::invtype::VIEW_MOD_BANK_SIZE;
using RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE;
using RoF2::invtype::VIEW_MOD_LIMBO_SIZE;
using RoF2::invtype::ALT_STORAGE_SIZE;
using RoF2::invtype::ARCHIVED_SIZE;
using RoF2::invtype::MAIL_SIZE;
using RoF2::invtype::GUILD_TROPHY_TRIBUTE_SIZE;
using RoF2::invtype::KRONO_SIZE;
using RoF2::invtype::OTHER_SIZE;
using Titanium::invtype::TRADE_NPC_SIZE;
using RoF2::invtype::TYPE_INVALID;
using RoF2::invtype::TYPE_BEGIN;
using RoF2::invtype::TYPE_END;
using RoF2::invtype::TYPE_COUNT;
int16 GetInvTypeSize(int16 inv_type);
using RoF2::invtype::GetInvTypeName;
} // namespace invtype
namespace DevTools {
const int32 GM_ACCOUNT_STATUS_LEVEL = 150;
}
namespace popupresponse {
const int32 SERVER_INTERNAL_USE_BASE = 2000000000;
const int32 MOB_INFO_DISMISS = 2000000001;
}
namespace invslot {
using namespace RoF2::invslot::enum_;
using RoF2::invslot::SLOT_INVALID;
using RoF2::invslot::SLOT_BEGIN;
using Titanium::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
const int16 SLOT_AUGMENT_GENERIC_RETURN = 1001; // clients don't appear to use this method... (internal inventory return value)
using RoF2::invslot::POSSESSIONS_BEGIN;
using RoF2::invslot::POSSESSIONS_END;
using RoF2::invslot::POSSESSIONS_COUNT;
using RoF2::invslot::EQUIPMENT_BEGIN;
using RoF2::invslot::EQUIPMENT_END;
using RoF2::invslot::EQUIPMENT_COUNT;
using RoF2::invslot::GENERAL_BEGIN;
using RoF2::invslot::GENERAL_END;
using RoF2::invslot::GENERAL_COUNT;
using RoF2::invslot::BONUS_BEGIN;
using RoF2::invslot::BONUS_STAT_END;
using RoF2::invslot::BONUS_SKILL_END;
using Titanium::invslot::BANK_BEGIN;
using SoF::invslot::BANK_END;
using Titanium::invslot::SHARED_BANK_BEGIN;
using Titanium::invslot::SHARED_BANK_END;
using Titanium::invslot::TRADE_BEGIN;
using Titanium::invslot::TRADE_END;
using Titanium::invslot::TRADE_NPC_END;
using Titanium::invslot::WORLD_BEGIN;
using Titanium::invslot::WORLD_END;
using Titanium::invslot::TRIBUTE_BEGIN;
using Titanium::invslot::TRIBUTE_END;
using Titanium::invslot::GUILD_TRIBUTE_BEGIN;
using Titanium::invslot::GUILD_TRIBUTE_END;
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
const int16 CORPSE_END = CORPSE_BEGIN + invslot::slotCursor;
using RoF2::invslot::EQUIPMENT_BITMASK;
using RoF2::invslot::GENERAL_BITMASK;
using RoF2::invslot::CURSOR_BITMASK;
using RoF2::invslot::POSSESSIONS_BITMASK;
using RoF2::invslot::CORPSE_BITMASK;
using RoF2::invslot::GetInvPossessionsSlotName;
using RoF2::invslot::GetInvSlotName;
} // namespace invslot
namespace invbag {
using Titanium::invbag::SLOT_INVALID;
using Titanium::invbag::SLOT_BEGIN;
using Titanium::invbag::SLOT_END;
using Titanium::invbag::SLOT_COUNT;
using Titanium::invbag::GENERAL_BAGS_BEGIN;
const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT;
const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1;
const int16 GENERAL_BAGS_8_COUNT = 8 * SLOT_COUNT;
const int16 GENERAL_BAGS_8_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_8_COUNT) - 1;
const int16 CURSOR_BAG_BEGIN = 351;
const int16 CURSOR_BAG_COUNT = SLOT_COUNT;
const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1;
using Titanium::invbag::BANK_BAGS_BEGIN;
const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT);
const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1;
const int16 BANK_BAGS_16_COUNT = 16 * SLOT_COUNT;
const int16 BANK_BAGS_16_END = (BANK_BAGS_BEGIN + BANK_BAGS_16_COUNT) - 1;
using Titanium::invbag::SHARED_BANK_BAGS_BEGIN;
const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT;
const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1;
using Titanium::invbag::TRADE_BAGS_BEGIN;
const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT;
const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1;
using Titanium::invbag::GetInvBagIndexName;
} // namespace invbag
namespace invaug {
using RoF2::invaug::SOCKET_INVALID;
using RoF2::invaug::SOCKET_BEGIN;
using RoF2::invaug::SOCKET_END;
using RoF2::invaug::SOCKET_COUNT;
using RoF2::invaug::GetInvAugIndexName;
} // namespace invaug
namespace constants {
const EQ::versions::ClientVersion CHARACTER_CREATION_CLIENT = EQ::versions::ClientVersion::Titanium;
using RoF2::constants::EXPANSION;
using RoF2::constants::EXPANSION_BIT;
using RoF2::constants::EXPANSIONS_MASK;
using RoF2::constants::CHARACTER_CREATION_LIMIT;
const size_t SAY_LINK_OPENER_SIZE = 1;
using RoF2::constants::SAY_LINK_BODY_SIZE;
const size_t SAY_LINK_TEXT_SIZE = 256; // this may be varied until it breaks something (tested:374) - the others are constant
const size_t SAY_LINK_CLOSER_SIZE = 1;
const size_t SAY_LINK_MAXIMUM_SIZE = (SAY_LINK_OPENER_SIZE + SAY_LINK_BODY_SIZE + SAY_LINK_TEXT_SIZE + SAY_LINK_CLOSER_SIZE);
enum StanceType : int {
stanceUnknown = 0,
stancePassive,
stanceBalanced,
stanceEfficient,
stanceReactive,
stanceAggressive,
stanceAssist,
stanceBurn,
stanceEfficient2,
stanceBurnAE
};
const char *GetStanceName(StanceType stance_type);
int ConvertStanceTypeToIndex(StanceType stance_type);
extern const std::map<int, std::string>& GetLanguageMap();
std::string GetLanguageName(int language_id);
const int STANCE_TYPE_FIRST = stancePassive;
const int STANCE_TYPE_LAST = stanceBurnAE;
const int STANCE_TYPE_COUNT = stanceBurnAE;
} /*constants*/
namespace profile {
using RoF2::profile::BANDOLIERS_SIZE;
using RoF2::profile::BANDOLIER_ITEM_COUNT;
using RoF2::profile::POTION_BELT_SIZE;
using RoF2::profile::SKILL_ARRAY_SIZE;
} // namespace profile
namespace behavior {
using RoF2::behavior::CoinHasWeight;
} // namespace behavior
namespace spells {
enum class CastingSlot : uint32 { // hybrid declaration
Gem1 = 0,
Gem2 = 1,
Gem3 = 2,
Gem4 = 3,
Gem5 = 4,
Gem6 = 5,
Gem7 = 6,
Gem8 = 7,
Gem9 = 8,
Gem10 = 9,
Gem11 = 10,
Gem12 = 11,
MaxGems = 12,
Ability = 20, // HT/LoH for Tit
PotionBelt = 21, // Tit uses a different slot for PB
Item = 22,
Discipline = 23,
AltAbility = 0xFF
};
using RoF2::spells::SPELL_ID_MAX;
using RoF2::spells::SPELLBOOK_SIZE;
using UF::spells::SPELL_GEM_COUNT; // RoF+ clients define more than UF client..but, they are not valid beyond UF
using RoF2::spells::LONG_BUFFS;
using RoF2::spells::SHORT_BUFFS;
using RoF2::spells::DISC_BUFFS;
using RoF2::spells::TOTAL_BUFFS;
using RoF2::spells::NPC_BUFFS;
using RoF2::spells::PET_BUFFS;
using RoF2::spells::MERC_BUFFS;
} // namespace spells
namespace bug {
enum CategoryID : uint32 {
catOther = 0,
catVideo,
catAudio,
catPathing,
catQuest,
catTradeskills,
catSpellStacking,
catDoorsPortals,
catItems,
catNPC,
catDialogs,
catLoNTCG,
catMercenaries
};
enum OptionalInfoFlag : uint32 {
infoNoOptionalInfo = 0x0,
infoCanDuplicate = 0x1,
infoCrashBug = 0x2,
infoTargetInfo = 0x4,
infoCharacterFlags = 0x8,
infoUnknownValue = 0xFFFFFFF0
};
const char* CategoryIDToCategoryName(CategoryID category_id);
CategoryID CategoryNameToCategoryID(const char* category_name);
} // namespace bug
enum WaypointStatus : int {
RoamBoxPauseInProgress = -3,
QuestControlNoGrid = -2,
QuestControlGrid = -1
};
namespace consent {
enum eConsentType : uint8 {
Normal = 0,
Group,
Raid,
Guild
};
}; // namespace consent
} /*EQEmu*/
#endif /*COMMON_EMU_CONSTANTS_H*/
/* hack list to prevent circular references
eq_limits.h:EQ::inventory::LookupEntry::InventoryTypeSize[n];
*/
+4 -32
View File
@@ -1,5 +1,6 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -10,37 +11,8 @@
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __QUEST_H__
#define __QUEST_H__
#include "zonedb.h"
typedef struct _tag_quest_entry{
char *m_pQuestName;
char *m_pQuestText;
char *m_pQuestEnd;
int m_iNpcId;
int m_iQuestObject;
int m_iQuestPrice;
int m_iQuestCash;
int m_iQuestExp;
}quest_entry,*pquest_entry;
class Quest{
public:
Quest();
~Quest();
static pquest_entry Test(int NpcId, int QuestObject);
static pquest_entry m_pQuests;
static int m_nQuests;
};
#endif
+128
View File
@@ -0,0 +1,128 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_LIMITS_H
#define COMMON_EMU_LIMITS_H
#include "types.h"
#include <stdlib.h>
namespace EntityLimits
{
namespace NPC {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*NPC*/
namespace NPCMerchant {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*NPCMerchant*/
namespace Merc {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*Merc*/
namespace Bot {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 8;
} // namespace invtype
namespace invslot {
const uint64 EQUIPMENT_BITMASK = 0x00000000007FFFFF;
const uint64 GENERAL_BITMASK = 0x0000000000000000;
const uint64 CURSOR_BITMASK = 0x0000000000000000;
const uint64 POSSESSIONS_BITMASK = (EQUIPMENT_BITMASK | GENERAL_BITMASK | CURSOR_BITMASK); // based on 34-slot count (RoF+)
} // namespace invslot
} /*Bot*/
namespace ClientPet {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*Pet*/
namespace NPCPet {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*Pet*/
namespace MercPet {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*Pet*/
namespace BotPet {
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace invtype {
const int16 TRADE_SIZE = 4;
} // namespace invtype
} /*Pet*/
}; /*EntityLimits*/
#endif /*COMMON_EMU_LIMITS_H*/
+40 -7
View File
@@ -9,6 +9,7 @@ N(OP_AcceptNewTask),
N(OP_AckPacket),
N(OP_Action),
N(OP_Action2),
N(OP_AddNimbusEffect),
N(OP_AdventureData),
N(OP_AdventureDetails),
N(OP_AdventureFinish),
@@ -25,6 +26,9 @@ N(OP_AdventureRequest),
N(OP_AdventureStatsReply),
N(OP_AdventureStatsRequest),
N(OP_AdventureUpdate),
N(OP_AggroMeterLockTarget),
N(OP_AggroMeterTargetInfo),
N(OP_AggroMeterUpdate),
N(OP_AltCurrency),
N(OP_AltCurrencyMerchantReply),
N(OP_AltCurrencyMerchantRequest),
@@ -64,6 +68,7 @@ N(OP_BuffRemoveRequest),
N(OP_Bug),
N(OP_CameraEffect),
N(OP_Camp),
N(OP_CancelSneakHide),
N(OP_CancelTask),
N(OP_CancelTrade),
N(OP_CastSpell),
@@ -131,20 +136,22 @@ N(OP_Dye),
N(OP_DynamicWall),
N(OP_DzAddPlayer),
N(OP_DzChooseZone),
N(OP_DzChooseZoneReply),
N(OP_DzCompass),
N(OP_DzExpeditionEndsWarning),
N(OP_DzExpeditionInfo),
N(OP_DzExpeditionList),
N(OP_DzJoinExpeditionConfirm),
N(OP_DzJoinExpeditionReply),
N(OP_DzLeaderStatus),
N(OP_DzExpeditionInvite),
N(OP_DzExpeditionInviteResponse),
N(OP_DzExpeditionLockoutTimers),
N(OP_DzListTimers),
N(OP_DzMakeLeader),
N(OP_DzMemberList),
N(OP_DzMemberStatus),
N(OP_DzMemberListName),
N(OP_DzMemberListStatus),
N(OP_DzPlayerList),
N(OP_DzQuit),
N(OP_DzRemovePlayer),
N(OP_DzSetLeaderName),
N(OP_DzSwapPlayer),
N(OP_Emote),
N(OP_EndLootRequest),
@@ -164,6 +171,7 @@ N(OP_FinishTrade),
N(OP_FinishWindow),
N(OP_FinishWindow2),
N(OP_Fishing),
N(OP_Fling),
N(OP_FloatListThing),
N(OP_Forage),
N(OP_ForceFindPerson),
@@ -215,6 +223,7 @@ N(OP_GroupUpdate),
N(OP_GroupUpdateB),
N(OP_GroupUpdateLeaderAA),
N(OP_GuildBank),
N(OP_GuildBankItemList),
N(OP_GuildCreate),
N(OP_GuildDelete),
N(OP_GuildDemote),
@@ -264,6 +273,7 @@ N(OP_ItemVerifyRequest),
N(OP_ItemViewUnknown),
N(OP_Jump),
N(OP_KeyRing),
N(OP_KickPlayers),
N(OP_KnowledgeBase),
N(OP_LDoNButton),
N(OP_LDoNDisarmTraps),
@@ -286,6 +296,7 @@ N(OP_LFGuild),
N(OP_LFPCommand),
N(OP_LFPGetMatchesRequest),
N(OP_LFPGetMatchesResponse),
N(OP_LinkedReuse),
N(OP_LoadSpellSet),
N(OP_LocInfo),
N(OP_LockoutTimerInfo),
@@ -332,6 +343,7 @@ N(OP_MOTD),
N(OP_MoveCoin),
N(OP_MoveDoor),
N(OP_MoveItem),
N(OP_MoveMultipleItems),
N(OP_MoveLogDisregard),
N(OP_MoveLogRequest),
N(OP_MultiLineMsg),
@@ -343,11 +355,11 @@ N(OP_OpenContainer),
N(OP_OpenDiscordMerchant),
N(OP_OpenGuildTributeMaster),
N(OP_OpenInventory),
N(OP_OpenNewTasksWindow),
N(OP_OpenTributeMaster),
N(OP_PDeletePetition),
N(OP_PetBuffWindow),
N(OP_PetCommands),
N(OP_PetCommandState),
N(OP_PetHoTT),
N(OP_Petition),
N(OP_PetitionBug),
@@ -383,6 +395,7 @@ N(OP_PVPLeaderBoardReply),
N(OP_PVPLeaderBoardRequest),
N(OP_PVPStats),
N(OP_QueryResponseThing),
N(OP_QueryUCSServerStatus),
N(OP_RaidInvite),
N(OP_RaidJoin),
N(OP_RaidUpdate),
@@ -400,6 +413,7 @@ N(OP_ReloadUI),
N(OP_RemoveAllDoors),
N(OP_RemoveBlockedBuffs),
N(OP_RemoveNimbusEffect),
N(OP_RemoveTrap),
N(OP_Report),
N(OP_ReqClientSpawn),
N(OP_ReqNewZone),
@@ -449,6 +463,19 @@ N(OP_SetServerFilter),
N(OP_SetStartCity),
N(OP_SetTitle),
N(OP_SetTitleReply),
N(OP_SharedTaskMemberList),
N(OP_SharedTaskAddPlayer),
N(OP_SharedTaskRemovePlayer),
N(OP_SharedTaskMakeLeader),
N(OP_SharedTaskMemberInvite),
N(OP_SharedTaskInvite),
N(OP_SharedTaskInviteResponse),
N(OP_SharedTaskAcceptNew),
N(OP_SharedTaskMemberChange),
N(OP_SharedTaskPlayerList),
N(OP_SharedTaskSelectWindow),
N(OP_SharedTaskQuit),
N(OP_TaskTimers),
N(OP_Shielding),
N(OP_ShopDelItem),
N(OP_ShopEnd),
@@ -484,7 +511,8 @@ N(OP_TaskActivityComplete),
N(OP_TaskDescription),
N(OP_TaskHistoryReply),
N(OP_TaskHistoryRequest),
N(OP_TaskMemberList),
N(OP_TaskRequestTimer),
N(OP_TaskSelectWindow),
N(OP_Taunt),
N(OP_TestBuff),
N(OP_TGB),
@@ -515,6 +543,7 @@ N(OP_TributeToggle),
N(OP_TributeUpdate),
N(OP_Untargetable),
N(OP_UpdateAA),
N(OP_UpdateAura),
N(OP_UpdateLeadershipAA),
N(OP_VetClaimReply),
N(OP_VetClaimRequest),
@@ -535,6 +564,8 @@ N(OP_WorldLogout),
N(OP_WorldObjectsSent),
N(OP_WorldUnknown001),
N(OP_XTargetAutoAddHaters),
N(OP_XTargetOpen),
N(OP_XTargetOpenResponse),
N(OP_XTargetRequest),
N(OP_XTargetResponse),
N(OP_YellForHelp),
@@ -548,4 +579,6 @@ N(OP_ZoneServerInfo),
N(OP_ZoneServerReady),
N(OP_ZoneSpawns),
N(OP_ZoneUnavail),
N(OP_ResetAA),
N(OP_UnderWorld),
// mail and chat opcodes located in ../mail_oplist.h
-817
View File
@@ -1,817 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
There are really two or three different objects shoe-hored into this
connection object. Sombody really needs to factor out the relay link
crap into its own subclass of this object, it will clean things up
tremendously.
*/
#include "../common/global_define.h"
#include <iostream>
#include <string.h>
#include "emu_tcp_connection.h"
#include "emu_tcp_server.h"
#include "../common/servertalk.h"
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
#define MSG_NOSIGNAL 0
#endif
#define TCPN_DEBUG 0
#define TCPN_DEBUG_Console 0
#define TCPN_DEBUG_Memory 0
#define TCPN_LOG_PACKETS 0
#define TCPN_LOG_RAW_DATA_OUT 0
#define TCPN_LOG_RAW_DATA_IN 0
//server side case
EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, SOCKET in_socket, uint32 irIP, uint16 irPort, bool iOldFormat)
: TCPConnection(ID, in_socket, irIP, irPort),
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
id = 0;
Server = nullptr;
pOldFormat = iOldFormat;
#ifdef MINILOGIN
TCPMode = modePacket;
PacketMode = packetModeLogin;
#else
if (pOldFormat)
TCPMode = modePacket;
else
TCPMode = modeConsole;
PacketMode = packetModeZone;
#endif
RelayLink = 0;
RelayServer = false;
RelayCount = 0;
RemoteID = 0;
}
//client outgoing connection case (and client side relay)
EmuTCPConnection::EmuTCPConnection(bool iOldFormat, EmuTCPServer* iRelayServer, eTCPMode iMode)
: TCPConnection(),
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
Server = iRelayServer;
if (Server)
RelayServer = true;
else
RelayServer = false;
RelayLink = 0;
RelayCount = 0;
RemoteID = 0;
pOldFormat = iOldFormat;
TCPMode = iMode;
PacketMode = packetModeZone;
#if TCPN_DEBUG_Memory >= 7
std::cout << "Constructor #1 on outgoing TCP# " << GetID() << std::endl;
#endif
}
//server side relay case
EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConnection* iRelayLink, uint32 iRemoteID, uint32 irIP, uint16 irPort)
: TCPConnection(ID, 0, irIP, irPort),
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
Server = iServer;
RelayLink = iRelayLink;
RelayServer = true;
RelayCount = 0;
RemoteID = iRemoteID;
pOldFormat = false;
ConnectionType = Incoming;
TCPMode = modePacket;
PacketMode = packetModeZone;
#if TCPN_DEBUG_Memory >= 7
std::cout << "Constructor #3 on outgoing TCP# " << GetID() << std::endl;
#endif
}
EmuTCPConnection::~EmuTCPConnection() {
//the queues free their content right now I believe.
}
EmuTCPNetPacket_Struct* EmuTCPConnection::MakePacket(ServerPacket* pack, uint32 iDestination) {
int32 size = sizeof(EmuTCPNetPacket_Struct) + pack->size;
if (pack->compressed) {
size += 4;
}
if (iDestination) {
size += 4;
}
EmuTCPNetPacket_Struct* tnps = (EmuTCPNetPacket_Struct*) new uchar[size];
tnps->size = size;
tnps->opcode = pack->opcode;
*((uint8*) &tnps->flags) = 0;
uchar* buffer = tnps->buffer;
if (pack->compressed) {
tnps->flags.compressed = 1;
*((int32*) buffer) = pack->InflatedSize;
buffer += 4;
}
if (iDestination) {
tnps->flags.destination = 1;
*((int32*) buffer) = iDestination;
buffer += 4;
}
memcpy(buffer, pack->pBuffer, pack->size);
return tnps;
}
SPackSendQueue* EmuTCPConnection::MakeOldPacket(ServerPacket* pack) {
SPackSendQueue* spsq = (SPackSendQueue*) new uchar[sizeof(SPackSendQueue) + pack->size + 4];
if (pack->pBuffer != 0 && pack->size != 0)
memcpy((char *) &spsq->buffer[4], (char *) pack->pBuffer, pack->size);
memcpy((char *) &spsq->buffer[0], (char *) &pack->opcode, 2);
spsq->size = pack->size+4;
memcpy((char *) &spsq->buffer[2], (char *) &spsq->size, 2);
return spsq;
}
bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
if (!Connected())
return false;
eTCPMode tmp = GetMode();
if (tmp != modePacket && tmp != modeTransition)
return false;
LockMutex lock(&MState);
if (RemoteID)
return RelayLink->SendPacket(pack, RemoteID);
else if (pOldFormat) {
#if TCPN_LOG_PACKETS >= 1
if (pack && pack->opcode != 0) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
else
DumpPacket(pack);
#endif
#if TCPN_LOG_PACKETS >= 3
DumpPacket(pack);
#endif
}
#endif
SPackSendQueue* spsq = MakeOldPacket(pack);
ServerSendQueuePushEnd(spsq->buffer, spsq->size);
safe_delete_array(spsq);
}
else {
EmuTCPNetPacket_Struct* tnps = MakePacket(pack, iDestination);
if (tmp == modeTransition) {
InModeQueuePush(tnps);
}
else {
#if TCPN_LOG_PACKETS >= 1
if (pack && pack->opcode != 0) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
else
DumpPacket(pack);
#endif
#if TCPN_LOG_PACKETS >= 3
DumpPacket(pack);
#endif
}
#endif
ServerSendQueuePushEnd((uchar**) &tnps, tnps->size);
}
}
return true;
}
bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
if (RemoteID)
return false;
if (!Connected())
return false;
if (GetMode() != modePacket)
return false;
LockMutex lock(&MState);
eTCPMode tmp = GetMode();
if (tmp == modeTransition) {
EmuTCPNetPacket_Struct* tnps2 = (EmuTCPNetPacket_Struct*) new uchar[tnps->size];
memcpy(tnps2, tnps, tnps->size);
InModeQueuePush(tnps2);
return true;
}
#if TCPN_LOG_PACKETS >= 1
if (tnps && tnps->opcode != 0) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP NetPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << tnps->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << tnps->size << " " << inet_ntoa(in) << ":" << GetrPort();
if (pOldFormat)
std::cout << " (OldFormat)";
std::cout << std::endl;
#if TCPN_LOG_PACKETS == 2
if (tnps->size >= 32)
DumpPacket((uchar*) tnps, 32);
else
DumpPacket((uchar*) tnps, tnps->size);
#endif
#if TCPN_LOG_PACKETS >= 3
DumpPacket((uchar*) tnps, tnps->size);
#endif
}
#endif
ServerSendQueuePushEnd((const uchar*) tnps, tnps->size);
return true;
}
ServerPacket* EmuTCPConnection::PopPacket() {
ServerPacket* ret;
if (!MOutQueueLock.trylock())
return nullptr;
ret = OutQueue.pop();
MOutQueueLock.unlock();
return ret;
}
void EmuTCPConnection::InModeQueuePush(EmuTCPNetPacket_Struct* tnps) {
MSendQueue.lock();
InModeQueue.push(tnps);
MSendQueue.unlock();
}
void EmuTCPConnection::OutQueuePush(ServerPacket* pack) {
MOutQueueLock.lock();
OutQueue.push(pack);
MOutQueueLock.unlock();
}
bool EmuTCPConnection::LineOutQueuePush(char* line) {
#if defined(GOTFRAGS) && 0
if (strcmp(line, "**CRASHME**") == 0) {
int i = 0;
std::cout << (5 / i) << std::endl;
}
#endif
if(line[0] == '*') {
if (strcmp(line, "**PACKETMODE**") == 0) {
MSendQueue.lock();
safe_delete_array(sendbuf);
if (TCPMode == modeConsole)
Send((const uchar*) "\0**PACKETMODE**\r", 16);
TCPMode = modePacket;
PacketMode = packetModeLogin;
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop())) {
SendPacket(tnps);
safe_delete_array(tnps);
}
MSendQueue.unlock();
safe_delete_array(line);
return(true);
}
if (strcmp(line, "**PACKETMODEZONE**") == 0) {
MSendQueue.lock();
safe_delete_array(sendbuf);
if (TCPMode == modeConsole)
Send((const uchar*) "\0**PACKETMODEZONE**\r", 20);
TCPMode = modePacket;
PacketMode = packetModeZone;
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop())) {
SendPacket(tnps);
safe_delete_array(tnps);
}
MSendQueue.unlock();
safe_delete_array(line);
return(true);
}
if (strcmp(line, "**PACKETMODELAUNCHER**") == 0) {
MSendQueue.lock();
safe_delete_array(sendbuf);
if (TCPMode == modeConsole)
Send((const uchar*) "\0**PACKETMODELAUNCHER**\r", 24);
TCPMode = modePacket;
PacketMode = packetModeLauncher;
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop())) {
SendPacket(tnps);
safe_delete_array(tnps);
}
MSendQueue.unlock();
safe_delete_array(line);
return(true);
}
if (strcmp(line, "**PACKETMODEUCS**") == 0) {
MSendQueue.lock();
safe_delete_array(sendbuf);
if (TCPMode == modeConsole)
Send((const uchar*) "\0**PACKETMODEUCS**\r", 19);
TCPMode = modePacket;
PacketMode = packetModeUCS;
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop())) {
SendPacket(tnps);
safe_delete_array(tnps);
}
MSendQueue.unlock();
safe_delete_array(line);
return(true);
}
if (strcmp(line, "**PACKETMODEQS**") == 0) {
MSendQueue.lock();
safe_delete_array(sendbuf);
if (TCPMode == modeConsole)
Send((const uchar*) "\0**PACKETMODEQS**\r", 18);
TCPMode = modePacket;
PacketMode = packetModeQueryServ;
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop())) {
SendPacket(tnps);
safe_delete_array(tnps);
}
MSendQueue.unlock();
safe_delete_array(line);
return(true);
}
}
return(TCPConnection::LineOutQueuePush(line));
}
void EmuTCPConnection::Disconnect(bool iSendRelayDisconnect) {
TCPConnection::Disconnect();
if (RelayLink) {
RelayLink->RemoveRelay(this, iSendRelayDisconnect);
RelayLink = 0;
}
}
bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
if(!TCPConnection::ConnectIP(irIP, irPort, errbuf))
return(false);
MSendQueue.lock();
#ifdef MINILOGIN
TCPMode = modePacket;
#else
if (pOldFormat) {
TCPMode = modePacket;
}
else if (TCPMode == modePacket || TCPMode == modeTransition) {
TCPMode = modeTransition;
if(PacketMode == packetModeLauncher) {
safe_delete_array(sendbuf);
sendbuf_size = 24;
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODELAUNCHER**\r", sendbuf_size);
} else if(PacketMode == packetModeLogin) {
safe_delete_array(sendbuf);
sendbuf_size = 16;
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODE**\r", sendbuf_size);
} else if(PacketMode == packetModeUCS) {
safe_delete_array(sendbuf);
sendbuf_size = 19;
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODEUCS**\r", sendbuf_size);
}
else if(PacketMode == packetModeQueryServ) {
safe_delete_array(sendbuf);
sendbuf_size = 18;
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODEQS**\r", sendbuf_size);
}
else {
//default: packetModeZone
safe_delete_array(sendbuf);
sendbuf_size = 20;
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODEZONE**\r", sendbuf_size);
}
}
#endif
MSendQueue.unlock();
return(true);
}
void EmuTCPConnection::ClearBuffers() {
TCPConnection::ClearBuffers();
LockMutex lock2(&MOutQueueLock);
ServerPacket* pack = 0;
while ((pack = OutQueue.pop()))
safe_delete(pack);
EmuTCPNetPacket_Struct* tnps = 0;
while ((tnps = InModeQueue.pop()))
safe_delete(tnps);
keepalive_timer.Start();
timeout_timer.Start();
}
void EmuTCPConnection::SendNetErrorPacket(const char* reason) {
#if TCPC_DEBUG >= 1
struct in_addr in;
in.s_addr = GetrIP();
std::cout "NetError: '";
if (reason)
std::cout << reason;
std::cout << "': " << inet_ntoa(in) << ":" << GetPort() << std::endl;
#endif
ServerPacket* pack = new ServerPacket(0);
pack->size = 1;
if (reason)
pack->size += strlen(reason) + 1;
pack->pBuffer = new uchar[pack->size];
memset(pack->pBuffer, 0, pack->size);
pack->pBuffer[0] = 255;
strcpy((char*) &pack->pBuffer[1], reason);
SendPacket(pack);
safe_delete(pack);
}
void EmuTCPConnection::RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisconnect) {
if (iSendRelayDisconnect) {
ServerPacket* pack = new ServerPacket(0, 5);
pack->pBuffer[0] = 3;
*((uint32*) &pack->pBuffer[1]) = relay->GetRemoteID();
SendPacket(pack);
safe_delete(pack);
}
RelayCount--;
}
bool EmuTCPConnection::ProcessReceivedData(char* errbuf) {
if (errbuf)
errbuf[0] = 0;
timeout_timer.Start();
if (!recvbuf)
return true;
if (TCPMode == modePacket) {
if (pOldFormat)
return ProcessReceivedDataAsOldPackets(errbuf);
else
return ProcessReceivedDataAsPackets(errbuf);
}
//else, use the base class's text processing.
bool ret = TCPConnection::ProcessReceivedData(errbuf);
//see if we made the transition to packet mode...
if(ret && TCPMode == modePacket) {
return ProcessReceivedDataAsPackets(errbuf);
}
return(ret);
}
bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
if (errbuf)
errbuf[0] = 0;
int32 base = 0;
int32 size = 7;
uchar* buffer;
ServerPacket* pack = 0;
while ((recvbuf_used - base) >= size) {
EmuTCPNetPacket_Struct* tnps = (EmuTCPNetPacket_Struct*) &recvbuf[base];
buffer = tnps->buffer;
size = tnps->size;
if (size >= MaxTCPReceiveBuffferSize) {
#if TCPN_DEBUG_Memory >= 1
std::cout << "TCPConnection[" << GetID() << "]::ProcessReceivedDataAsPackets(): size[" << size << "] >= MaxTCPReceiveBuffferSize" << std::endl;
DumpPacket(&recvbuf[base], 16);
#endif
if (errbuf)
snprintf(errbuf, TCPConnection_ErrorBufferSize, "EmuTCPConnection::ProcessReceivedDataAsPackets(): size >= MaxTCPReceiveBuffferSize");
return false;
}
if ((recvbuf_used - base) >= size) {
// ok, we got enough data to make this packet!
pack = new ServerPacket;
pack->size = size - sizeof(EmuTCPNetPacket_Struct);
// read headers
pack->opcode = tnps->opcode;
if (tnps->flags.compressed) {
pack->compressed = true;
pack->InflatedSize = *((int32*)buffer);
pack->size -= 4;
buffer += 4;
}
if (tnps->flags.destination) {
pack->destination = *((int32*)buffer);
pack->size -= 4;
buffer += 4;
}
// end read headers
if (pack->size > 0) {
if (tnps->flags.compressed) {
// Lets decompress the packet here
pack->compressed = false;
pack->pBuffer = new uchar[pack->InflatedSize];
pack->size = InflatePacket(buffer, pack->size, pack->pBuffer, pack->InflatedSize);
}
else {
pack->pBuffer = new uchar[pack->size];
memcpy(pack->pBuffer, buffer, pack->size);
}
}
if (pack->opcode == 0) {
if (pack->size) {
#if TCPN_DEBUG >= 2
std::cout << "Received TCP Network layer packet" << std::endl;
#endif
ProcessNetworkLayerPacket(pack);
}
#if TCPN_DEBUG >= 5
else {
std::cout << "Received TCP keepalive packet. (opcode=0)" << std::endl;
}
#endif
// keepalive, no need to process
safe_delete(pack);
}
else {
#if TCPN_LOG_PACKETS >= 1
if (pack && pack->opcode != 0) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging incoming TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
else
DumpPacket(pack);
#endif
#if TCPN_LOG_PACKETS >= 3
DumpPacket(pack);
#endif
}
#endif
if (RelayServer && Server && pack->destination) {
EmuTCPConnection* con = Server->FindConnection(pack->destination);
if (!con) {
#if TCPN_DEBUG >= 1
std::cout << "Error relaying packet: con = 0" << std::endl;
#endif
safe_delete(pack);
}
else
con->OutQueuePush(pack);
}
else
OutQueuePush(pack);
}
base += size;
size = 7;
}
}
if (base != 0) {
if (base >= recvbuf_used) {
safe_delete_array(recvbuf);
} else {
uchar* tmpbuf = new uchar[recvbuf_size - base];
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
safe_delete_array(recvbuf);
recvbuf = tmpbuf;
recvbuf_used -= base;
recvbuf_size -= base;
}
}
return true;
}
bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
int32 base = 0;
int32 size = 4;
uchar* buffer;
ServerPacket* pack = 0;
while ((recvbuf_used - base) >= size) {
buffer = &recvbuf[base];
memcpy(&size, &buffer[2], 2);
if (size >= MaxTCPReceiveBuffferSize) {
#if TCPN_DEBUG_Memory >= 1
std::cout << "TCPConnection[" << GetID() << "]::ProcessReceivedDataAsPackets(): size[" << size << "] >= MaxTCPReceiveBuffferSize" << std::endl;
#endif
if (errbuf)
snprintf(errbuf, TCPConnection_ErrorBufferSize, "EmuTCPConnection::ProcessReceivedDataAsPackets(): size >= MaxTCPReceiveBuffferSize");
return false;
}
if ((recvbuf_used - base) >= size) {
// ok, we got enough data to make this packet!
pack = new ServerPacket;
memcpy(&pack->opcode, &buffer[0], 2);
pack->size = size - 4;
/* if () { // TODO: Checksum or size check or something similar
// Datastream corruption, get the hell outta here!
delete pack;
return false;
}*/
if (pack->size > 0) {
pack->pBuffer = new uchar[pack->size];
memcpy(pack->pBuffer, &buffer[4], pack->size);
}
if (pack->opcode == 0) {
// keepalive, no need to process
safe_delete(pack);
}
else {
#if TCPN_LOG_PACKETS >= 1
if (pack && pack->opcode != 0) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging incoming TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
else
DumpPacket(pack);
#endif
#if TCPN_LOG_PACKETS >= 3
DumpPacket(pack);
#endif
}
#endif
OutQueuePush(pack);
}
base += size;
size = 4;
}
}
if (base != 0) {
if (base >= recvbuf_used) {
safe_delete_array(recvbuf);
}
else {
uchar* tmpbuf = new uchar[recvbuf_size - base];
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
safe_delete_array(recvbuf);
recvbuf = tmpbuf;
recvbuf_used -= base;
recvbuf_size -= base;
}
}
return true;
}
void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
uint8 opcode = pack->pBuffer[0];
uint8* data = &pack->pBuffer[1];
switch (opcode) {
case 0: {
break;
}
case 1: { // Switch to RelayServer mode
if (pack->size != 1) {
SendNetErrorPacket("New RelayClient: wrong size, expected 1");
break;
}
if (RelayServer) {
SendNetErrorPacket("Switch to RelayServer mode when already in RelayServer mode");
break;
}
if (RemoteID) {
SendNetErrorPacket("Switch to RelayServer mode by a Relay Client");
break;
}
if (ConnectionType != Incoming) {
SendNetErrorPacket("Switch to RelayServer mode on outgoing connection");
break;
}
#if TCPC_DEBUG >= 3
struct in_addr in;
in.s_addr = GetrIP();
std::cout << "Switching to RelayServer mode: " << inet_ntoa(in) << ":" << GetPort() << std::endl;
#endif
RelayServer = true;
break;
}
case 2: { // New Relay Client
if (!RelayServer) {
SendNetErrorPacket("New RelayClient when not in RelayServer mode");
break;
}
if (pack->size != 11) {
SendNetErrorPacket("New RelayClient: wrong size, expected 11");
break;
}
if (ConnectionType != Incoming) {
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
break;
}
EmuTCPConnection* con = new EmuTCPConnection(Server->GetNextID(), Server, this, *((uint32*) data), *((uint32*) &data[4]), *((uint16*) &data[8]));
Server->AddConnection(con);
RelayCount++;
break;
}
case 3: { // Delete Relay Client
if (!RelayServer) {
SendNetErrorPacket("Delete RelayClient when not in RelayServer mode");
break;
}
if (pack->size != 5) {
SendNetErrorPacket("Delete RelayClient: wrong size, expected 5");
break;
}
EmuTCPConnection* con = Server->FindConnection(*((uint32*)data));
if (con) {
if (ConnectionType == Incoming) {
if (con->GetRelayLink() != this) {
SendNetErrorPacket("Delete RelayClient: RelayLink != this");
break;
}
}
con->Disconnect(false);
}
break;
}
case 255: {
#if TCPC_DEBUG >= 1
struct in_addr in;
in.s_addr = GetrIP();
std::cout "Received NetError: '";
if (pack->size > 1)
std::cout << (char*) data;
std::cout << "': " << inet_ntoa(in) << ":" << GetPort() << std::endl;
#endif
break;
}
}
}
bool EmuTCPConnection::SendData(bool &sent_something, char* errbuf) {
sent_something = false;
if(!TCPConnection::SendData(sent_something, errbuf))
return(false);
if(sent_something)
keepalive_timer.Start();
else if (TCPMode == modePacket && keepalive_timer.Check()) {
ServerPacket* pack = new ServerPacket(0, 0);
SendPacket(pack);
safe_delete(pack);
#if TCPN_DEBUG >= 5
std::cout << "Sending TCP keepalive packet. (timeout=" << timeout_timer.GetRemainingTime() << " remaining)" << std::endl;
#endif
}
return(true);
}
bool EmuTCPConnection::RecvData(char* errbuf) {
if(!TCPConnection::RecvData(errbuf)) {
if (OutQueue.count())
return(true);
else
return(false);
}
if ((TCPMode == modePacket || TCPMode == modeTransition) && timeout_timer.Check()) {
if (errbuf)
snprintf(errbuf, TCPConnection_ErrorBufferSize, "TCPConnection::RecvData(): Connection timeout");
return false;
}
return(true);
}
-104
View File
@@ -1,104 +0,0 @@
#ifndef EmuTCPCONNECTION_H_
#define EmuTCPCONNECTION_H_
#include "tcp_connection.h"
#include "timer.h"
//moved out of TCPConnection:: to be more exportable
#pragma pack(1)
struct EmuTCPNetPacket_Struct {
uint32 size;
struct {
uint8
compressed : 1,
destination : 1,
flag3 : 1,
flag4 : 1,
flag5 : 1,
flag6 : 1,
flag7 : 1,
flag8 : 1;
} flags;
uint16 opcode;
uchar buffer[0];
};
#pragma pack()
struct SPackSendQueue;
class EmuTCPServer;
class ServerPacket;
class EmuTCPConnection : public TCPConnection {
public:
enum eTCPMode { modeConsole, modeTransition, modePacket };
enum ePacketMode { packetModeZone, packetModeLauncher, packetModeLogin, packetModeUCS, packetModeQueryServ };
EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, SOCKET iSock, uint32 irIP, uint16 irPort, bool iOldFormat = false);
EmuTCPConnection(bool iOldFormat = false, EmuTCPServer* iRelayServer = 0, eTCPMode iMode = modePacket); // for outgoing connections
EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConnection* iRelayLink, uint32 iRemoteID, uint32 irIP, uint16 irPort); // for relay connections
virtual ~EmuTCPConnection();
virtual bool ConnectIP(uint32 irIP, uint16 irPort, char* errbuf = 0);
virtual void Disconnect(bool iSendRelayDisconnect = true);
static EmuTCPNetPacket_Struct* MakePacket(ServerPacket* pack, uint32 iDestination = 0);
static SPackSendQueue* MakeOldPacket(ServerPacket* pack);
virtual bool SendPacket(ServerPacket* pack, uint32 iDestination = 0);
virtual bool SendPacket(EmuTCPNetPacket_Struct* tnps);
ServerPacket* PopPacket(); // OutQueuePop()
void SetPacketMode(ePacketMode mode) { PacketMode = mode; }
eTCPMode GetMode() const { return TCPMode; }
ePacketMode GetPacketMode() const { return(PacketMode); }
//relay crap:
inline bool IsRelayServer() const { return RelayServer; }
inline TCPConnection* GetRelayLink() const { return RelayLink; }
inline uint32 GetRemoteID() const { return RemoteID; }
protected:
void OutQueuePush(ServerPacket* pack);
void RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisconnect);
void SendNetErrorPacket(const char* reason = 0);
virtual bool SendData(bool &sent_something, char* errbuf = 0);
virtual bool RecvData(char* errbuf = 0);
virtual bool ProcessReceivedData(char* errbuf = 0);
bool ProcessReceivedDataAsPackets(char* errbuf = 0);
bool ProcessReceivedDataAsOldPackets(char* errbuf = 0);
void ProcessNetworkLayerPacket(ServerPacket* pack);
virtual bool LineOutQueuePush(char* line);
virtual void ClearBuffers();
EmuTCPServer* Server;
eTCPMode TCPMode;
ePacketMode PacketMode;
bool pOldFormat;
Timer keepalive_timer;
Timer timeout_timer;
//relay crap:
EmuTCPConnection* RelayLink;
int32 RelayCount;
bool RelayServer;
uint32 RemoteID;
//input queue...
void InModeQueuePush(EmuTCPNetPacket_Struct* tnps);
MyQueue<EmuTCPNetPacket_Struct> InModeQueue;
//output queue...
MyQueue<ServerPacket> OutQueue;
Mutex MOutQueueLock;
};
#endif /*EmuTCPCONNECTION_H_*/
-81
View File
@@ -1,81 +0,0 @@
#include "global_define.h"
#include "emu_tcp_server.h"
#include "emu_tcp_connection.h"
EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
: TCPServer<EmuTCPConnection>(iPort),
pOldFormat(iOldFormat)
{
}
EmuTCPServer::~EmuTCPServer() {
MInQueue.lock();
while(!m_InQueue.empty()) {
delete m_InQueue.front();
m_InQueue.pop();
}
MInQueue.unlock();
}
void EmuTCPServer::Process() {
CheckInQueue();
TCPServer<EmuTCPConnection>::Process();
}
void EmuTCPServer::CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
{
EmuTCPConnection *conn = new EmuTCPConnection(ID, this, in_socket, irIP, irPort, pOldFormat);
AddConnection(conn);
}
void EmuTCPServer::SendPacket(ServerPacket* pack) {
EmuTCPNetPacket_Struct* tnps = EmuTCPConnection::MakePacket(pack);
SendPacket(&tnps);
}
void EmuTCPServer::SendPacket(EmuTCPNetPacket_Struct** tnps) {
MInQueue.lock();
m_InQueue.push(*tnps);
MInQueue.unlock();
tnps = nullptr;
}
void EmuTCPServer::CheckInQueue() {
EmuTCPNetPacket_Struct* tnps = 0;
while (( tnps = InQueuePop() )) {
vitr cur, end;
cur = m_list.begin();
end = m_list.end();
for(; cur != end; cur++) {
if ((*cur)->GetMode() != EmuTCPConnection::modeConsole && (*cur)->GetRemoteID() == 0)
(*cur)->SendPacket(tnps);
}
safe_delete(tnps);
}
}
EmuTCPNetPacket_Struct* EmuTCPServer::InQueuePop() {
EmuTCPNetPacket_Struct* ret = nullptr;
MInQueue.lock();
if(!m_InQueue.empty()) {
ret = m_InQueue.front();
m_InQueue.pop();
}
MInQueue.unlock();
return ret;
}
EmuTCPConnection *EmuTCPServer::FindConnection(uint32 iID) {
vitr cur, end;
cur = m_list.begin();
end = m_list.end();
for(; cur != end; cur++) {
if ((*cur)->GetID() == iID)
return *cur;
}
return(nullptr);
}
-38
View File
@@ -1,38 +0,0 @@
#ifndef EmuTCPSERVER_H_
#define EmuTCPSERVER_H_
#include "tcp_server.h"
class EmuTCPConnection;
struct EmuTCPNetPacket_Struct;
class ServerPacket;
class EmuTCPServer : public TCPServer<EmuTCPConnection> {
public:
EmuTCPServer(uint16 iPort = 0, bool iOldFormat = false);
virtual ~EmuTCPServer();
//packet broadcast routines.
void SendPacket(ServerPacket* pack);
void SendPacket(EmuTCPNetPacket_Struct** tnps);
//special crap for relay management
EmuTCPConnection *FindConnection(uint32 iID);
//exposed for some crap we pull. Do not call from outside this object.
using TCPServer<EmuTCPConnection>::AddConnection;
protected:
virtual void Process();
virtual void CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort);
bool pOldFormat;
//broadcast packet queue..
void CheckInQueue();
Mutex MInQueue;
EmuTCPNetPacket_Struct* InQueuePop(); //returns ownership
std::queue<EmuTCPNetPacket_Struct *> m_InQueue;
};
#endif /*EmuTCPSERVER_H_*/
+558
View File
@@ -0,0 +1,558 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "emu_versions.h"
#include "emu_constants.h"
bool EQ::versions::IsValidClientVersion(ClientVersion client_version)
{
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
return false;
return true;
}
EQ::versions::ClientVersion EQ::versions::ValidateClientVersion(ClientVersion client_version)
{
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
return ClientVersion::Unknown;
return client_version;
}
const char* EQ::versions::ClientVersionName(ClientVersion client_version)
{
switch (client_version) {
case ClientVersion::Unknown:
return "Unknown Version";
case ClientVersion::Client62:
return "Client 6.2";
case ClientVersion::Titanium:
return "Titanium";
case ClientVersion::SoF:
return "SoF";
case ClientVersion::SoD:
return "SoD";
case ClientVersion::UF:
return "UF";
case ClientVersion::RoF:
return "RoF";
case ClientVersion::RoF2:
return "RoF2";
default:
return "Invalid Version";
};
}
uint32 EQ::versions::ConvertClientVersionToClientVersionBit(ClientVersion client_version)
{
switch (client_version) {
case ClientVersion::Titanium:
return bitTitanium;
case ClientVersion::SoF:
return bitSoF;
case ClientVersion::SoD:
return bitSoD;
case ClientVersion::UF:
return bitUF;
case ClientVersion::RoF:
return bitRoF;
case ClientVersion::RoF2:
return bitRoF2;
default:
return bitUnknown;
}
}
EQ::versions::ClientVersion EQ::versions::ConvertClientVersionBitToClientVersion(uint32 client_version_bit)
{
switch (client_version_bit) {
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)) :
return ClientVersion::Titanium;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)) :
return ClientVersion::SoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)) :
return ClientVersion::SoD;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)) :
return ClientVersion::UF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)) :
return ClientVersion::RoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) :
return ClientVersion::RoF2;
default:
return ClientVersion::Unknown;
}
}
bool EQ::versions::IsValidMobVersion(MobVersion mob_version)
{
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
return false;
return true;
}
bool EQ::versions::IsValidPCMobVersion(MobVersion mob_version)
{
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
return false;
return true;
}
bool EQ::versions::IsValidNonPCMobVersion(MobVersion mob_version)
{
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
return false;
return true;
}
bool EQ::versions::IsValidOfflinePCMobVersion(MobVersion mob_version)
{
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
return false;
return true;
}
EQ::versions::MobVersion EQ::versions::ValidateMobVersion(MobVersion mob_version)
{
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
return MobVersion::Unknown;
return mob_version;
}
EQ::versions::MobVersion EQ::versions::ValidatePCMobVersion(MobVersion mob_version)
{
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
return MobVersion::Unknown;
return mob_version;
}
EQ::versions::MobVersion EQ::versions::ValidateNonPCMobVersion(MobVersion mob_version)
{
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
return MobVersion::Unknown;
return mob_version;
}
EQ::versions::MobVersion EQ::versions::ValidateOfflinePCMobVersion(MobVersion mob_version)
{
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
return MobVersion::Unknown;
return mob_version;
}
const char* EQ::versions::MobVersionName(MobVersion mob_version)
{
switch (mob_version) {
case MobVersion::Unknown:
return "Unknown Version";
case MobVersion::Client62:
return "Client 6.2";
case MobVersion::Titanium:
return "Titanium";
case MobVersion::SoF:
return "SoF";
case MobVersion::SoD:
return "SoD";
case MobVersion::UF:
return "UF";
case MobVersion::RoF:
return "RoF";
case MobVersion::RoF2:
return "RoF2";
case MobVersion::NPC:
return "NPC";
case MobVersion::NPCMerchant:
return "NPC Merchant";
case MobVersion::Merc:
return "Merc";
case MobVersion::Bot:
return "Bot";
case MobVersion::ClientPet:
return "Client Pet";
case MobVersion::NPCPet:
return "NPC Pet";
case MobVersion::MercPet:
return "Merc Pet";
case MobVersion::BotPet:
return "Bot Pet";
case MobVersion::OfflineTitanium:
return "Offline Titanium";
case MobVersion::OfflineSoF:
return "Offline SoF";
case MobVersion::OfflineSoD:
return "Offline SoD";
case MobVersion::OfflineUF:
return "Offline UF";
case MobVersion::OfflineRoF:
return "Offline RoF";
case MobVersion::OfflineRoF2:
return "Offline RoF2";
default:
return "Invalid Version";
};
}
EQ::versions::ClientVersion EQ::versions::ConvertMobVersionToClientVersion(MobVersion mob_version)
{
switch (mob_version) {
case MobVersion::Unknown:
case MobVersion::Client62:
return ClientVersion::Unknown;
case MobVersion::Titanium:
return ClientVersion::Titanium;
case MobVersion::SoF:
return ClientVersion::SoF;
case MobVersion::SoD:
return ClientVersion::SoD;
case MobVersion::UF:
return ClientVersion::UF;
case MobVersion::RoF:
return ClientVersion::RoF;
case MobVersion::RoF2:
return ClientVersion::RoF2;
default:
return ClientVersion::Unknown;
}
}
EQ::versions::MobVersion EQ::versions::ConvertClientVersionToMobVersion(ClientVersion client_version)
{
switch (client_version) {
case ClientVersion::Unknown:
case ClientVersion::Client62:
return MobVersion::Unknown;
case ClientVersion::Titanium:
return MobVersion::Titanium;
case ClientVersion::SoF:
return MobVersion::SoF;
case ClientVersion::SoD:
return MobVersion::SoD;
case ClientVersion::UF:
return MobVersion::UF;
case ClientVersion::RoF:
return MobVersion::RoF;
case ClientVersion::RoF2:
return MobVersion::RoF2;
default:
return MobVersion::Unknown;
}
}
EQ::versions::MobVersion EQ::versions::ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version)
{
switch (mob_version) {
case MobVersion::Titanium:
return MobVersion::OfflineTitanium;
case MobVersion::SoF:
return MobVersion::OfflineSoF;
case MobVersion::SoD:
return MobVersion::OfflineSoD;
case MobVersion::UF:
return MobVersion::OfflineUF;
case MobVersion::RoF:
return MobVersion::OfflineRoF;
case MobVersion::RoF2:
return MobVersion::OfflineRoF2;
default:
return MobVersion::Unknown;
}
}
EQ::versions::MobVersion EQ::versions::ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version)
{
switch (mob_version) {
case MobVersion::OfflineTitanium:
return MobVersion::Titanium;
case MobVersion::OfflineSoF:
return MobVersion::SoF;
case MobVersion::OfflineSoD:
return MobVersion::SoD;
case MobVersion::OfflineUF:
return MobVersion::UF;
case MobVersion::OfflineRoF:
return MobVersion::RoF;
case MobVersion::OfflineRoF2:
return MobVersion::RoF2;
default:
return MobVersion::Unknown;
}
}
EQ::versions::ClientVersion EQ::versions::ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version)
{
switch (mob_version) {
case MobVersion::OfflineTitanium:
return ClientVersion::Titanium;
case MobVersion::OfflineSoF:
return ClientVersion::SoF;
case MobVersion::OfflineSoD:
return ClientVersion::SoD;
case MobVersion::OfflineUF:
return ClientVersion::UF;
case MobVersion::OfflineRoF:
return ClientVersion::RoF;
case MobVersion::OfflineRoF2:
return ClientVersion::RoF2;
default:
return ClientVersion::Unknown;
}
}
EQ::versions::MobVersion EQ::versions::ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version)
{
switch (client_version) {
case ClientVersion::Titanium:
return MobVersion::OfflineTitanium;
case ClientVersion::SoF:
return MobVersion::OfflineSoF;
case ClientVersion::SoD:
return MobVersion::OfflineSoD;
case ClientVersion::UF:
return MobVersion::OfflineUF;
case ClientVersion::RoF:
return MobVersion::OfflineRoF;
case ClientVersion::RoF2:
return MobVersion::OfflineRoF2;
default:
return MobVersion::Unknown;
}
}
const char* EQ::expansions::ExpansionName(Expansion expansion)
{
switch (expansion) {
case Expansion::EverQuest:
return "EverQuest";
case Expansion::RoK:
return "The Ruins of Kunark";
case Expansion::SoV:
return "The Scars of Velious";
case Expansion::SoL:
return "The Shadows of Luclin";
case Expansion::PoP:
return "The Planes of Power";
case Expansion::LoY:
return "The Legacy of Ykesha";
case Expansion::LDoN:
return "Lost Dungeons of Norrath";
case Expansion::GoD:
return "Gates of Discord";
case Expansion::OoW:
return "Omens of War";
case Expansion::DoN:
return "Dragons of Norrath";
case Expansion::DoD:
return "Depths of Darkhollow";
case Expansion::PoR:
return "Prophecy of Ro";
case Expansion::TSS:
return "The Serpent's Spine";
case Expansion::TBS:
return "The Buried Sea";
case Expansion::SoF:
return "Secrets of Faydwer";
case Expansion::SoD:
return "Seeds of Destruction";
case Expansion::UF:
return "Underfoot";
case Expansion::HoT:
return "House of Thule";
case Expansion::VoA:
return "Veil of Alaris";
case Expansion::RoF:
return "Rain of Fear";
case Expansion::CotF:
return "Call of the Forsaken";
default:
return "Invalid Expansion";
}
}
const char* EQ::expansions::ExpansionName(uint32 expansion_bit)
{
return ExpansionName(ConvertExpansionBitToExpansion(expansion_bit));
}
uint32 EQ::expansions::ConvertExpansionToExpansionBit(Expansion expansion)
{
switch (expansion) {
case Expansion::RoK:
return bitRoK;
case Expansion::SoV:
return bitSoV;
case Expansion::SoL:
return bitSoL;
case Expansion::PoP:
return bitPoP;
case Expansion::LoY:
return bitLoY;
case Expansion::LDoN:
return bitLDoN;
case Expansion::GoD:
return bitGoD;
case Expansion::OoW:
return bitOoW;
case Expansion::DoN:
return bitDoN;
case Expansion::DoD:
return bitDoD;
case Expansion::PoR:
return bitPoR;
case Expansion::TSS:
return bitTSS;
case Expansion::TBS:
return bitTBS;
case Expansion::SoF:
return bitSoF;
case Expansion::SoD:
return bitSoD;
case Expansion::UF:
return bitUF;
case Expansion::HoT:
return bitHoT;
case Expansion::VoA:
return bitVoA;
case Expansion::RoF:
return bitRoF;
case Expansion::CotF:
return bitCotF;
default:
return bitEverQuest;
}
}
EQ::expansions::Expansion EQ::expansions::ConvertExpansionBitToExpansion(uint32 expansion_bit)
{
switch (expansion_bit) {
case bitRoK:
return Expansion::RoK;
case bitSoV:
return Expansion::SoV;
case bitSoL:
return Expansion::SoL;
case bitPoP:
return Expansion::PoP;
case bitLoY:
return Expansion::LoY;
case bitLDoN:
return Expansion::LDoN;
case bitGoD:
return Expansion::GoD;
case bitOoW:
return Expansion::OoW;
case bitDoN:
return Expansion::DoN;
case bitDoD:
return Expansion::DoD;
case bitPoR:
return Expansion::PoR;
case bitTSS:
return Expansion::TSS;
case bitTBS:
return Expansion::TBS;
case bitSoF:
return Expansion::SoF;
case bitSoD:
return Expansion::SoD;
case bitUF:
return Expansion::UF;
case bitHoT:
return Expansion::HoT;
case bitVoA:
return Expansion::VoA;
case bitRoF:
return Expansion::RoF;
case bitCotF:
return Expansion::CotF;
default:
return Expansion::EverQuest;
}
}
uint32 EQ::expansions::ConvertExpansionToExpansionsMask(Expansion expansion)
{
switch (expansion) {
case Expansion::RoK:
return maskRoK;
case Expansion::SoV:
return maskSoV;
case Expansion::SoL:
return maskSoL;
case Expansion::PoP:
return maskPoP;
case Expansion::LoY:
return maskLoY;
case Expansion::LDoN:
return maskLDoN;
case Expansion::GoD:
return maskGoD;
case Expansion::OoW:
return maskOoW;
case Expansion::DoN:
return maskDoN;
case Expansion::DoD:
return maskDoD;
case Expansion::PoR:
return maskPoR;
case Expansion::TSS:
return maskTSS;
case Expansion::TBS:
return maskTBS;
case Expansion::SoF:
return maskSoF;
case Expansion::SoD:
return maskSoD;
case Expansion::UF:
return maskUF;
case Expansion::HoT:
return maskHoT;
case Expansion::VoA:
return maskVoA;
case Expansion::RoF:
return maskRoF;
case Expansion::CotF:
return maskCotF;
default:
return maskEverQuest;
}
}
EQ::expansions::Expansion EQ::expansions::ConvertClientVersionToExpansion(versions::ClientVersion client_version)
{
return EQ::constants::StaticLookup(client_version)->Expansion;
}
uint32 EQ::expansions::ConvertClientVersionToExpansionBit(versions::ClientVersion client_version)
{
return EQ::constants::StaticLookup(client_version)->ExpansionBit;
}
uint32 EQ::expansions::ConvertClientVersionToExpansionsMask(versions::ClientVersion client_version)
{
return EQ::constants::StaticLookup(client_version)->ExpansionsMask;
}
+222
View File
@@ -0,0 +1,222 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_VERSIONS_H
#define COMMON_EMU_VERSIONS_H
#include "types.h"
#include <stdlib.h>
namespace EQ
{
namespace versions {
enum class ClientVersion : uint32 {
Unknown = 0,
Client62, // Build: 'Aug 4 2005 15:40:59'
Titanium, // Build: 'Oct 31 2005 10:33:37'
SoF, // Build: 'Sep 7 2007 09:11:49'
SoD, // Build: 'Dec 19 2008 15:22:49'
UF, // Build: 'Jun 8 2010 16:44:32'
RoF, // Build: 'Dec 10 2012 17:35:44'
RoF2 // Build: 'May 10 2013 23:30:08'
};
enum ClientVersionBitmask : uint32 {
bitUnknown = 0x00000000,
bitClient62 = 0x00000001, // unsupported (placeholder for scripts)
bitTitanium = 0x00000002,
bitSoF = 0x00000004,
bitSoD = 0x00000008,
bitUF = 0x00000010,
bitRoF = 0x00000020,
bitRoF2 = 0x00000040,
maskUnknown = 0x00000000,
maskTitaniumAndEarlier = 0x00000003,
maskSoFAndEarlier = 0x00000007,
maskSoDAndEarlier = 0x0000000F,
maskUFAndEarlier = 0x0000001F,
maskRoFAndEarlier = 0x0000003F,
maskSoFAndLater = 0xFFFFFFFC,
maskSoDAndLater = 0xFFFFFFF8,
maskUFAndLater = 0xFFFFFFF0,
maskRoFAndLater = 0xFFFFFFE0,
maskRoF2AndLater = 0xFFFFFFC0,
maskAllClients = 0xFFFFFFFF
};
const ClientVersion LastClientVersion = ClientVersion::RoF2;
const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
bool IsValidClientVersion(ClientVersion client_version);
ClientVersion ValidateClientVersion(ClientVersion client_version);
const char* ClientVersionName(ClientVersion client_version);
uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
enum class MobVersion : uint32 {
Unknown = 0,
Client62,
Titanium,
SoF,
SoD,
UF,
RoF,
RoF2,
NPC,
NPCMerchant,
Merc,
Bot,
ClientPet,
NPCPet,
MercPet,
BotPet,
OfflineTitanium,
OfflineSoF,
OfflineSoD,
OfflineUF,
OfflineRoF,
OfflineRoF2
};
const MobVersion LastMobVersion = MobVersion::OfflineRoF2;
const MobVersion LastPCMobVersion = MobVersion::RoF2;
const MobVersion LastNonPCMobVersion = MobVersion::BotPet;
const MobVersion LastOfflinePCMobVersion = MobVersion::OfflineRoF2;
const size_t MobVersionCount = (static_cast<size_t>(LastMobVersion) + 1);
bool IsValidMobVersion(MobVersion mob_version);
bool IsValidPCMobVersion(MobVersion mob_version);
bool IsValidNonPCMobVersion(MobVersion mob_version);
bool IsValidOfflinePCMobVersion(MobVersion mob_version);
MobVersion ValidateMobVersion(MobVersion mob_version);
MobVersion ValidatePCMobVersion(MobVersion mob_version);
MobVersion ValidateNonPCMobVersion(MobVersion mob_version);
MobVersion ValidateOfflinePCMobVersion(MobVersion mob_version);
const char* MobVersionName(MobVersion mob_version);
ClientVersion ConvertMobVersionToClientVersion(MobVersion mob_version);
MobVersion ConvertClientVersionToMobVersion(ClientVersion client_version);
MobVersion ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version);
MobVersion ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version);
ClientVersion ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version);
MobVersion ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version);
enum UCSVersion : char {
ucsUnknown = '\0',
ucsClient62Chat = 'A',
ucsClient62Mail = 'a',
ucsTitaniumChat = 'B',
ucsTitaniumMail = 'b',
ucsSoFCombined = 'C',
ucsSoDCombined = 'D',
ucsUFCombined = 'E',
ucsRoFCombined = 'F',
ucsRoF2Combined = 'G'
};
} /*versions*/
namespace expansions {
enum class Expansion : uint32 {
EverQuest = 0,
RoK,
SoV,
SoL,
PoP,
LoY,
LDoN,
GoD,
OoW,
DoN,
DoD,
PoR,
TSS,
TBS,
SoF,
SoD,
UF,
HoT,
VoA,
RoF,
CotF
};
enum ExpansionBitmask : uint32 {
bitEverQuest = 0x00000000,
bitRoK = 0x00000001,
bitSoV = 0x00000002,
bitSoL = 0x00000004,
bitPoP = 0x00000008,
bitLoY = 0x00000010,
bitLDoN = 0x00000020,
bitGoD = 0x00000040,
bitOoW = 0x00000080,
bitDoN = 0x00000100,
bitDoD = 0x00000200,
bitPoR = 0x00000400,
bitTSS = 0x00000800,
bitTBS = 0x00001000,
bitSoF = 0x00002000,
bitSoD = 0x00004000,
bitUF = 0x00008000,
bitHoT = 0x00010000,
bitVoA = 0x00020000,
bitRoF = 0x00040000,
bitCotF = 0x00080000,
maskEverQuest = 0x00000000,
maskRoK = 0x00000001,
maskSoV = 0x00000003,
maskSoL = 0x00000007,
maskPoP = 0x0000000F,
maskLoY = 0x0000001F,
maskLDoN = 0x0000003F,
maskGoD = 0x0000007F,
maskOoW = 0x000000FF,
maskDoN = 0x000001FF,
maskDoD = 0x000003FF,
maskPoR = 0x000007FF,
maskTSS = 0x00000FFF,
maskTBS = 0x00001FFF,
maskSoF = 0x00003FFF,
maskSoD = 0x00007FFF,
maskUF = 0x0000FFFF,
maskHoT = 0x0001FFFF,
maskVoA = 0x0003FFFF,
maskRoF = 0x0007FFFF,
maskCotF = 0x000FFFFF
};
const char* ExpansionName(Expansion expansion);
const char* ExpansionName(uint32 expansion_bit);
uint32 ConvertExpansionToExpansionBit(Expansion expansion);
Expansion ConvertExpansionBitToExpansion(uint32 expansion_bit);
uint32 ConvertExpansionToExpansionsMask(Expansion expansion);
Expansion ConvertClientVersionToExpansion(versions::ClientVersion client_version);
uint32 ConvertClientVersionToExpansionBit(versions::ClientVersion client_version);
uint32 ConvertClientVersionToExpansionsMask(versions::ClientVersion client_version);
} /*expansions*/
} /*EQEmu*/
#endif /*COMMON_EMU_VERSIONS_H*/
+735 -744
View File
File diff suppressed because it is too large Load Diff
-943
View File
@@ -1,943 +0,0 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "eq_dictionary.h"
#include "string_util.h"
//
// class EmuConstants
//
uint16 EmuConstants::InventoryMapSize(int16 indexMap)
{
switch (indexMap)
{
case MapPossessions:
return MAP_POSSESSIONS_SIZE;
case MapBank:
return MAP_BANK_SIZE;
case MapSharedBank:
return MAP_SHARED_BANK_SIZE;
case MapTrade:
return MAP_TRADE_SIZE;
case MapWorld:
return MAP_WORLD_SIZE;
case MapLimbo:
return MAP_LIMBO_SIZE;
case MapTribute:
return MAP_TRIBUTE_SIZE;
case MapTrophyTribute:
return MAP_TROPHY_TRIBUTE_SIZE;
case MapGuildTribute:
return MAP_GUILD_TRIBUTE_SIZE;
case MapMerchant:
return MAP_MERCHANT_SIZE;
case MapDeleted:
return MAP_DELETED_SIZE;
case MapCorpse:
return MAP_CORPSE_SIZE;
case MapBazaar:
return MAP_BAZAAR_SIZE;
case MapInspect:
return MAP_INSPECT_SIZE;
case MapRealEstate:
return MAP_REAL_ESTATE_SIZE;
case MapViewMODPC:
return MAP_VIEW_MOD_PC_SIZE;
case MapViewMODBank:
return MAP_VIEW_MOD_BANK_SIZE;
case MapViewMODSharedBank:
return MAP_VIEW_MOD_SHARED_BANK_SIZE;
case MapViewMODLimbo:
return MAP_VIEW_MOD_LIMBO_SIZE;
case MapAltStorage:
return MAP_ALT_STORAGE_SIZE;
case MapArchived:
return MAP_ARCHIVED_SIZE;
case MapMail:
return MAP_MAIL_SIZE;
case MapGuildTrophyTribute:
return MAP_GUILD_TROPHY_TRIBUTE_SIZE;
case MapKrono:
return MAP_KRONO_SIZE;
case MapOther:
return MAP_OTHER_SIZE;
default:
return NOT_USED;
}
}
/*
std::string EmuConstants::InventoryLocationName(Location_Struct location)
{
// not ready for implementation...
std::string ret_str;
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
return ret_str;
}
*/
std::string EmuConstants::InventoryMapName(int16 indexMap)
{
switch (indexMap)
{
case INVALID_INDEX:
return "Invalid Map";
case MapPossessions:
return "Possessions";
case MapBank:
return "Bank";
case MapSharedBank:
return "SharedBank";
case MapTrade:
return "Trade";
case MapWorld:
return "World";
case MapLimbo:
return "Limbo";
case MapTribute:
return "Tribute";
case MapTrophyTribute:
return "TrophyTribute";
case MapGuildTribute:
return "GuildTribute";
case MapMerchant:
return "Merchant";
case MapDeleted:
return "Deleted";
case MapCorpse:
return "Corpse";
case MapBazaar:
return "Bazaar";
case MapInspect:
return "Inspect";
case MapRealEstate:
return "RealEstate";
case MapViewMODPC:
return "ViewMODPC";
case MapViewMODBank:
return "ViewMODBank";
case MapViewMODSharedBank:
return "ViewMODSharedBank";
case MapViewMODLimbo:
return "ViewMODLimbo";
case MapAltStorage:
return "AltStorage";
case MapArchived:
return "Archived";
case MapMail:
return "Mail";
case MapGuildTrophyTribute:
return "GuildTrophyTribute";
case MapKrono:
return "Krono";
case MapOther:
return "Other";
default:
return "Unknown Map";
}
}
std::string EmuConstants::InventoryMainName(int16 indexMain)
{
switch (indexMain)
{
case INVALID_INDEX:
return "Invalid Main";
case MainCharm:
return "Charm";
case MainEar1:
return "Ear1";
case MainHead:
return "Head";
case MainFace:
return "Face";
case MainEar2:
return "Ear2";
case MainNeck:
return "Neck";
case MainShoulders:
return "Shoulders";
case MainArms:
return "Arms";
case MainBack:
return "Back";
case MainWrist1:
return "Wrist1";
case MainWrist2:
return "Wrist2";
case MainRange:
return "Range";
case MainHands:
return "Hands";
case MainPrimary:
return "Primary";
case MainSecondary:
return "Secondary";
case MainFinger1:
return "Finger1";
case MainFinger2:
return "Finger2";
case MainChest:
return "Chest";
case MainLegs:
return "Legs";
case MainFeet:
return "Feet";
case MainWaist:
return "Waist";
case MainPowerSource:
return "PowerSource";
case MainAmmo:
return "Ammo";
case MainGeneral1:
return "General1";
case MainGeneral2:
return "General2";
case MainGeneral3:
return "General3";
case MainGeneral4:
return "General4";
case MainGeneral5:
return "General5";
case MainGeneral6:
return "General6";
case MainGeneral7:
return "General7";
case MainGeneral8:
return "General8";
/*
case MainGeneral9:
return "General9";
case MainGeneral10:
return "General10";
*/
case MainCursor:
return "Cursor";
default:
return "Unknown Main";
}
}
std::string EmuConstants::InventorySubName(int16 indexSub)
{
if (indexSub == INVALID_INDEX)
return "Invalid Sub";
if ((uint16)indexSub >= ITEM_CONTAINER_SIZE)
return "Unknown Sub";
std::string ret_str;
ret_str = StringFormat("Container%i", (indexSub + 1)); // zero-based index..but, count starts at one
return ret_str;
}
std::string EmuConstants::InventoryAugName(int16 indexAug)
{
if (indexAug == INVALID_INDEX)
return "Invalid Aug";
if ((uint16)indexAug >= ITEM_COMMON_SIZE)
return "Unknown Aug";
std::string ret_str;
ret_str = StringFormat("Augment%i", (indexAug + 1)); // zero-based index..but, count starts at one
return ret_str;
}
//
// class EQLimits
//
// client validation
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion)
{
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion)
{
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// npc validation
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion)
{
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion)
{
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// mob validation
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion)
{
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion)
{
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// database
size_t EQLimits::CharacterCreationLimit(ClientVersion clientVersion)
{
static const size_t local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*Client62*/ NOT_USED,
/*Titanium*/ Titanium::consts::CHARACTER_CREATION_LIMIT,
/*SoF*/ SoF::consts::CHARACTER_CREATION_LIMIT,
/*SoD*/ SoD::consts::CHARACTER_CREATION_LIMIT,
/*UF*/ UF::consts::CHARACTER_CREATION_LIMIT,
/*RoF*/ RoF::consts::CHARACTER_CREATION_LIMIT,
/*RoF2*/ RoF2::consts::CHARACTER_CREATION_LIMIT,
/*MobNPC*/ NOT_USED,
/*MobMerc*/ NOT_USED,
/*MobBot*/ NOT_USED,
/*MobPet*/ NOT_USED
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
// inventory
uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion)
{
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
// ALL of these values need to be verified before pushing to live
//
// make sure that you transcribe the actual value from 'defaults' to here before updating or client crashes will ensue..and/or...
// insert older clients inside of the progression of client order
//
// MAP_POSSESSIONS_SIZE does not reflect all actual <client>_constants size due to bitmask-use compatibility
//
// when setting NPC-based values, try to adhere to an EmuConstants::<property> or NOT_USED value to avoid unnecessary issues
static const uint16 local[_MapCount][CLIENT_VERSION_COUNT] = {
// server and database are sync'd to current MapPossessions's client as set in 'using namespace RoF::slots;' and
// 'EmuConstants::MAP_POSSESSIONS_SIZE' - use/update EquipmentBitmask(), GeneralBitmask() and CursorBitmask()
// for partial range validation checks and 'EmuConstants::MAP_POSSESSIONS_SIZE' for full range iterations
{ // local[MainPossessions]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Titanium*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*SoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF2*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Bot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Pet*/ EmuConstants::MAP_POSSESSIONS_SIZE
},
{ // local[MapBank]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapSharedBank]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*Titanium*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*SoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapTrade]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_TRADE_SIZE,
/*Titanium*/ EmuConstants::MAP_TRADE_SIZE,
/*SoF*/ EmuConstants::MAP_TRADE_SIZE,
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF2*/ EmuConstants::MAP_TRADE_SIZE,
/*NPC*/ 4,
/*Merc*/ 4,
/*Bot*/ EmuConstants::MAP_TRADE_SIZE, // client thinks this is another client
/*Pet*/ 4
},
{ // local[MapWorld]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_WORLD_SIZE,
/*Titanium*/ EmuConstants::MAP_WORLD_SIZE,
/*SoF*/ EmuConstants::MAP_WORLD_SIZE,
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF2*/ EmuConstants::MAP_WORLD_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapLimbo]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_LIMBO_SIZE,
/*Titanium*/ EmuConstants::MAP_LIMBO_SIZE,
/*SoF*/ EmuConstants::MAP_LIMBO_SIZE,
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF2*/ EmuConstants::MAP_LIMBO_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapTribute]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*Titanium*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*SoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapTrophyTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapGuildTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapMerchant]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
/*RoF2*/ EmuConstants::MAP_MERCHANT_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapDeleted]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
/*RoF2*/ EmuConstants::MAP_DELETED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapCorpse]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
/*Underfoot*/ UF::consts::MAP_CORPSE_SIZE,
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapBazaar]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_BAZAAR_SIZE,
/*Titanium*/ EmuConstants::MAP_BAZAAR_SIZE,
/*SoF*/ EmuConstants::MAP_BAZAAR_SIZE,
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF2*/ EmuConstants::MAP_BAZAAR_SIZE,
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapInspect]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
/*Underfoot*/ UF::consts::MAP_INSPECT_SIZE,
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapRealEstate]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*RoF2*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODPC]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODBank]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODSharedBank]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODLimbo]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapAltStorage]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*RoF2*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapArchived]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*RoF2*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapMail]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
/*RoF2*/ EmuConstants::MAP_MAIL_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapGuildTrophyTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapKrono]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ NOT_USED,
/*SoF*/ NOT_USED,
/*SoD*/ NOT_USED,
/*Underfoot*/ NOT_USED,
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
/*RoF2*/ EmuConstants::MAP_KRONO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapOther]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
/*RoF2*/ EmuConstants::MAP_OTHER_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
}
};
if ((uint16)indexMap < _MapCount)
return local[indexMap][static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
return NOT_USED;
}
uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion)
{
// these are for the new inventory system (RoF)..not the current (Ti) one...
// 0x0000000000200000 is SlotPowerSource (SoF+)
// 0x0000000080000000 is SlotGeneral9 (RoF+)
// 0x0000000100000000 is SlotGeneral10 (RoF+)
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x000000027FDFFFFF,
/*Titanium*/ 0x000000027FDFFFFF,
/*SoF*/ 0x000000027FFFFFFF,
/*SoD*/ 0x000000027FFFFFFF,
/*Underfoot*/ 0x000000027FFFFFFF,
/*RoF*/ 0x00000003FFFFFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion)
{
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x00000000005FFFFF,
/*Titanium*/ 0x00000000005FFFFF,
/*SoF*/ 0x00000000007FFFFF,
/*SoD*/ 0x00000000007FFFFF,
/*Underfoot*/ 0x00000000007FFFFF,
/*RoF*/ 0x00000000007FFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion)
{
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x000000007F800000,
/*Titanium*/ 0x000000007F800000,
/*SoF*/ 0x000000007F800000,
/*SoD*/ 0x000000007F800000,
/*Underfoot*/ 0x000000007F800000,
/*RoF*/ 0x00000001FF800000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::CursorBitmask(ClientVersion clientVersion)
{
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x0000000200000000,
/*Titanium*/ 0x0000000200000000,
/*SoF*/ 0x0000000200000000,
/*SoD*/ 0x0000000200000000,
/*Underfoot*/ 0x0000000200000000,
/*RoF*/ 0x0000000200000000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion)
{
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ false,
/*62*/ false,
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*Underfoot*/ UF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return false; // not implemented
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion)
{
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ false,
/*62*/ false,
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*Underfoot*/ UF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
// items
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion)
{
static const uint16 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
/*Titanium*/ EmuConstants::ITEM_COMMON_SIZE,
/*SoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF2*/ EmuConstants::ITEM_COMMON_SIZE,
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
/*Bot*/ EmuConstants::ITEM_COMMON_SIZE,
/*Pet*/ EmuConstants::ITEM_COMMON_SIZE
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion)
{
static const uint16 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Titanium*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*SoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF2*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Bot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Pet*/ EmuConstants::ITEM_CONTAINER_SIZE
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::CoinHasWeight(ClientVersion clientVersion)
{
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ true,
/*62*/ true,
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
/*Underfoot*/ UF::limits::COIN_HAS_WEIGHT,
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
/*NPC*/ true,
/*Merc*/ true,
/*Bot*/ true,
/*Pet*/ true
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
-205
View File
@@ -1,205 +0,0 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQ_DICTIONARY_H
#define EQ_DICTIONARY_H
#include "types.h"
#include "eq_constants.h"
#include "clientversions.h"
#include <string>
#include "../common/patches/titanium_constants.h"
#include "../common/patches/sof_constants.h"
#include "../common/patches/sod_constants.h"
#include "../common/patches/uf_constants.h"
#include "../common/patches/rof_constants.h"
#include "../common/patches/rof2_constants.h"
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
// Hard-coded values usually indicate that further research is needed and the values given are from the old (known) system
// (future use)
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
class EmuConstants
{
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
public:
// database
static const ClientVersion CHARACTER_CREATION_CLIENT = ClientVersion::RoF2; // adjust according to starting item placement and target client
static const size_t CHARACTER_CREATION_LIMIT = RoF2::consts::CHARACTER_CREATION_LIMIT;
// inventory
static uint16 InventoryMapSize(int16 indexMap);
//static std::string InventoryLocationName(Location_Struct location);
static std::string InventoryMapName(int16 indexMap);
static std::string InventoryMainName(int16 indexMain);
static std::string InventorySubName(int16 indexSub);
static std::string InventoryAugName(int16 indexAug);
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
static const uint16 MAP_POSSESSIONS_SIZE = _MainCount;
static const uint16 MAP_BANK_SIZE = 24;
static const uint16 MAP_SHARED_BANK_SIZE = 2;
static const uint16 MAP_TRADE_SIZE = 8;
static const uint16 MAP_WORLD_SIZE = 10;
static const uint16 MAP_LIMBO_SIZE = 36;
static const uint16 MAP_TRIBUTE_SIZE = 5; // (need client values)
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
static const uint16 MAP_MERCHANT_SIZE = 0;
static const uint16 MAP_DELETED_SIZE = 0;
static const uint16 MAP_CORPSE_SIZE = _MainCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
static const uint16 MAP_BAZAAR_SIZE = 80;
static const uint16 MAP_INSPECT_SIZE = 22;
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
static const uint16 MAP_VIEW_MOD_PC_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = NOT_USED;
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
static const uint16 MAP_ARCHIVED_SIZE = 0;
static const uint16 MAP_MAIL_SIZE = 0;
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_KRONO_SIZE = 0;
static const uint16 MAP_OTHER_SIZE = 0;
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
static const int16 EQUIPMENT_BEGIN = MainCharm;
static const int16 EQUIPMENT_END = MainAmmo;
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
static const int16 GENERAL_BEGIN = MainGeneral1;
static const int16 GENERAL_END = MainGeneral8;
static const uint16 GENERAL_SIZE = 8;
static const int16 GENERAL_BAGS_BEGIN = 251;
static const int16 GENERAL_BAGS_END_OFFSET = 79;
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
static const int16 CURSOR_BAG_BEGIN = 331;
static const int16 CURSOR_BAG_END_OFFSET = 9;
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
static const int16 BANK_BEGIN = 2000;
static const int16 BANK_END = 2023;
static const int16 BANK_BAGS_BEGIN = 2031;
static const int16 BANK_BAGS_END_OFFSET = 239;
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
static const int16 SHARED_BANK_BEGIN = 2500;
static const int16 SHARED_BANK_END = 2501;
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
static const int16 TRADE_BEGIN = 3000;
static const int16 TRADE_END = 3007;
static const int16 TRADE_NPC_END = 3003;
static const int16 TRADE_BAGS_BEGIN = 3031;
static const int16 TRADE_BAGS_END_OFFSET = 79;
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
static const int16 WORLD_BEGIN = 4000;
static const int16 WORLD_END = 4009;
static const int16 WORLD_SIZE = MAP_WORLD_SIZE;
static const int16 TRIBUTE_BEGIN = 400;
static const int16 TRIBUTE_END = 404;
static const int16 TRIBUTE_SIZE = MAP_TRIBUTE_SIZE;
static const int16 CORPSE_BEGIN = 22;
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
static const int16 MATERIAL_BEGIN = MaterialHead;
static const int16 MATERIAL_END = MaterialSecondary;
static const int16 MATERIAL_TINT_END = MaterialFeet;
static const int16 MATERIAL_SIZE = _MaterialCount;
// items
// common and container sizes will not increase until the new 'location' struct is implemented
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
static const size_t BANDOLIERS_SIZE = RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
static const size_t BANDOLIER_ITEM_COUNT = RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
static const size_t POTION_BELT_ITEM_COUNT = RoF2::consts::POTION_BELT_ITEM_COUNT;
static const size_t TEXT_LINK_BODY_LENGTH = RoF2::consts::TEXT_LINK_BODY_LENGTH;
};
class EQLimits
{
// values should default to a non-beneficial value..unless value conflicts with intended operation
//
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
public:
// client version validation (checks to avoid crashing zone server when accessing reference arrays)
// use this inside of class Client (limits to actual clients)
static bool IsValidPCClientVersion(ClientVersion clientVersion);
static ClientVersion ValidatePCClientVersion(ClientVersion clientVersion);
// basically..any non-client classes - do not when setting a valid client
static bool IsValidNPCClientVersion(ClientVersion clientVersion);
static ClientVersion ValidateNPCClientVersion(ClientVersion clientVersion);
// these are 'universal' - do not when setting a valid client
static bool IsValidMobClientVersion(ClientVersion clientVersion);
static ClientVersion ValidateMobClientVersion(ClientVersion clientVersion);
// database
static size_t CharacterCreationLimit(ClientVersion clientVersion);
// inventory
static uint16 InventoryMapSize(int16 indexMap, ClientVersion clientVersion);
static uint64 PossessionsBitmask(ClientVersion clientVersion);
static uint64 EquipmentBitmask(ClientVersion clientVersion);
static uint64 GeneralBitmask(ClientVersion clientVersion);
static uint64 CursorBitmask(ClientVersion clientVersion);
static bool AllowsEmptyBagInBag(ClientVersion clientVersion);
static bool AllowsClickCastFromBag(ClientVersion clientVersion);
// items
static uint16 ItemCommonSize(ClientVersion clientVersion);
static uint16 ItemContainerSize(ClientVersion clientVersion);
// player profile
static bool CoinHasWeight(ClientVersion clientVersion);
};
#endif /* EQ_DICTIONARY_H */
/*
Working Notes:
--------------
- full review of client_packet.cpp and client translators needed
*/
+1249
View File
File diff suppressed because it is too large Load Diff
+269
View File
@@ -0,0 +1,269 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EQ_LIMITS_H
#define COMMON_EQ_LIMITS_H
#include "types.h"
#include "eq_constants.h"
#include "emu_versions.h"
#include "../common/patches/titanium_limits.h"
#include "../common/patches/sof_limits.h"
#include "../common/patches/sod_limits.h"
#include "../common/patches/uf_limits.h"
#include "../common/patches/rof_limits.h"
#include "../common/patches/rof2_limits.h"
namespace EQ
{
void InitializeDynamicLookups();
namespace constants {
struct LookupEntry {
EQ::expansions::Expansion Expansion;
uint32 ExpansionBit;
uint32 ExpansionsMask;
int16 CharacterCreationLimit;
size_t SayLinkBodySize;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
EQ::expansions::Expansion Expansion,
uint32 ExpansionBit,
uint32 ExpansionsMask,
int16 CharacterCreationLimit,
size_t SayLinkBodySize
) :
Expansion(Expansion),
ExpansionBit(ExpansionBit),
ExpansionsMask(ExpansionsMask),
CharacterCreationLimit(CharacterCreationLimit),
SayLinkBodySize(SayLinkBodySize)
{ }
};
void InitializeDynamicLookups();
const LookupEntry* DynamicLookup(versions::ClientVersion client_version, bool gm_flag);
const LookupEntry* DynamicNonGMLookup(versions::ClientVersion client_version);
const LookupEntry* DynamicGMLookup(versions::ClientVersion client_version);
const LookupEntry* StaticLookup(versions::ClientVersion client_version);
} /*constants*/
namespace inventory {
struct LookupEntry {
// note: 'PossessionsBitmask' needs to be attuned to the client version with the highest number
// of possessions slots and 'InventoryTypeSize[typePossessions]' should reflect the same count
// with translators adjusting for valid slot indices. Server-side validations will be performed
// against 'PossessionsBitmask' (note: the same applies to CorpseBitmask..size is not dependent)
struct InventoryTypeSize_Struct { // should reflect count and naming conventions referenced in emu_constants.h
int16 Possessions, Bank, SharedBank;
int16 Trade, World, Limbo;
int16 Tribute, TrophyTribute, GuildTribute;
int16 Merchant, Deleted, Corpse;
int16 Bazaar, Inspect, RealEstate;
int16 ViewMODPC, ViewMODBank, ViewMODSharedBank;
int16 ViewMODLimbo, AltStorage, Archived;
int16 Mail, GuildTrophyTribute, Krono;
int16 Other;
InventoryTypeSize_Struct(
int16 Possessions, int16 Bank, int16 SharedBank,
int16 Trade, int16 World, int16 Limbo,
int16 Tribute, int16 TrophyTribute, int16 GuildTribute,
int16 Merchant, int16 Deleted, int16 Corpse,
int16 Bazaar, int16 Inspect, int16 RealEstate,
int16 ViewMODPC, int16 ViewMODBank, int16 ViewMODSharedBank,
int16 ViewMODLimbo, int16 AltStorage, int16 Archived,
int16 Mail, int16 GuildTrophyTribute, int16 Krono,
int16 Other
) :
Possessions(Possessions), Bank(Bank), SharedBank(SharedBank),
Trade(Trade), World(World), Limbo(Limbo),
Tribute(Tribute), TrophyTribute(TrophyTribute), GuildTribute(GuildTribute),
Merchant(Merchant), Deleted(Deleted), Corpse(Corpse),
Bazaar(Bazaar), Inspect(Inspect), RealEstate(RealEstate),
ViewMODPC(ViewMODPC), ViewMODBank(ViewMODBank), ViewMODSharedBank(ViewMODSharedBank),
ViewMODLimbo(ViewMODLimbo), AltStorage(AltStorage), Archived(Archived),
Mail(Mail), GuildTrophyTribute(GuildTrophyTribute), Krono(Krono),
Other(Other)
{ }
};
union {
InventoryTypeSize_Struct InventoryTypeSize;
int16 InventoryTypeSizeArray[25]; // should reflect EQ::invtype::TYPE_COUNT referenced in emu_constants.h
};
uint64 EquipmentBitmask;
uint64 GeneralBitmask;
uint64 CursorBitmask;
uint64 PossessionsBitmask;
uint64 CorpseBitmask;
int16 BagSlotCount;
int16 AugSocketCount;
bool AllowEmptyBagInBag;
bool AllowClickCastFromBag;
bool ConcatenateInvTypeLimbo;
bool AllowOverLevelEquipment;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
InventoryTypeSize_Struct InventoryTypeSize,
uint64 EquipmentBitmask,
uint64 GeneralBitmask,
uint64 CursorBitmask,
uint64 PossessionsBitmask,
uint64 CorpseBitmask,
int16 BagSlotCount,
int16 AugSocketCount,
bool AllowEmptyBagInBag,
bool AllowClickCastFromBag,
bool ConcatenateInvTypeLimbo,
bool AllowOverLevelEquipment
) :
InventoryTypeSize(InventoryTypeSize),
EquipmentBitmask(EquipmentBitmask),
GeneralBitmask(GeneralBitmask),
CursorBitmask(CursorBitmask),
PossessionsBitmask(PossessionsBitmask),
CorpseBitmask(CorpseBitmask),
BagSlotCount(BagSlotCount),
AugSocketCount(AugSocketCount),
AllowEmptyBagInBag(AllowEmptyBagInBag),
AllowClickCastFromBag(AllowClickCastFromBag),
ConcatenateInvTypeLimbo(ConcatenateInvTypeLimbo),
AllowOverLevelEquipment(AllowOverLevelEquipment)
{ }
};
void InitializeDynamicLookups();
const LookupEntry* DynamicLookup(versions::MobVersion mob_version, bool gm_flag);
const LookupEntry* DynamicNonGMLookup(versions::MobVersion mob_version);
const LookupEntry* DynamicGMLookup(versions::MobVersion mob_version);
const LookupEntry* StaticLookup(versions::MobVersion mob_version);
} /*inventory*/
namespace behavior {
struct LookupEntry {
bool CoinHasWeight;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
bool CoinHasWeight
) :
CoinHasWeight(CoinHasWeight)
{ }
};
void InitializeDynamicLookups();
const LookupEntry* DynamicLookup(versions::MobVersion mob_version, bool gm_flag);
const LookupEntry* DynamicNonGMLookup(versions::MobVersion mob_version);
const LookupEntry* DynamicGMLookup(versions::MobVersion mob_version);
const LookupEntry* StaticLookup(versions::MobVersion mob_version);
} /*behavior*/
namespace spells {
struct LookupEntry {
int SpellIdMax;
int SpellbookSize;
int SpellGemCount;
int LongBuffs;
int ShortBuffs;
int DiscBuffs;
int TotalBuffs;
int NPCBuffs;
int PetBuffs;
int MercBuffs;
LookupEntry(const LookupEntry *lookup_entry) { }
LookupEntry(
int SpellIdMax,
int SpellbookSize,
int SpellGemCount,
int LongBuffs,
int ShortBuffs,
int DiscBuffs,
int TotalBuffs,
int NPCBuffs,
int PetBuffs,
int MercBuffs
) :
SpellIdMax(SpellIdMax),
SpellbookSize(SpellbookSize),
SpellGemCount(SpellGemCount),
LongBuffs(LongBuffs),
ShortBuffs(ShortBuffs),
DiscBuffs(DiscBuffs),
TotalBuffs(TotalBuffs),
NPCBuffs(NPCBuffs),
PetBuffs(PetBuffs),
MercBuffs(MercBuffs)
{ }
};
void InitializeDynamicLookups();
const LookupEntry* DynamicLookup(versions::ClientVersion client_version, bool gm_flag);
const LookupEntry* DynamicNonGMLookup(versions::ClientVersion client_version);
const LookupEntry* DynamicGMLookup(versions::ClientVersion client_version);
const LookupEntry* StaticLookup(versions::ClientVersion client_version);
} /*spells*/
} /*EQEmu*/
namespace ClientUnknown
{
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace constants {
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::EverQuest;
const uint32 EXPANSION_BIT = EQ::expansions::bitEverQuest;
const uint32 EXPANSIONS_MASK = EQ::expansions::maskEverQuest;
} // namespace constants
} /*ClientUnknown*/
namespace Client62
{
const int16 IINVALID = -1;
const int16 INULL = 0;
namespace constants {
const EQ::expansions::Expansion EXPANSION = EQ::expansions::Expansion::EverQuest;
const uint32 EXPANSION_BIT = EQ::expansions::bitEverQuest;
const uint32 EXPANSIONS_MASK = EQ::expansions::maskEverQuest;
} // namespace constants
} /*Client62*/
#endif /*COMMON_EQ_LIMITS_H*/
+4 -4
View File
@@ -132,7 +132,7 @@ void EQApplicationPacket::build_header_dump(char *buffer) const
#ifdef STATIC_OPCODE
sprintf(buffer, "[OpCode 0x%04x Size=%u]\n", emu_opcode,size);
#else
sprintf(buffer, "[OpCode %s Size=%u]",OpcodeManager::EmuToName(emu_opcode),size);
sprintf(buffer, "[OpCode %s(0x%04x) Size=%u]",OpcodeManager::EmuToName(emu_opcode), GetProtocolOpcode(), size);
#endif
}
@@ -260,7 +260,7 @@ bool EQProtocolPacket::combine(const EQProtocolPacket *rhs)
{
bool result=false;
if (opcode==OP_Combined && size+rhs->size+5<256) {
unsigned char *tmpbuffer=new unsigned char [size+rhs->size+3];
auto tmpbuffer = new unsigned char[size + rhs->size + 3];
memcpy(tmpbuffer,pBuffer,size);
uint32 offset=size;
tmpbuffer[offset++]=rhs->Size();
@@ -270,7 +270,7 @@ bool result=false;
pBuffer=tmpbuffer;
result=true;
} else if (size+rhs->size+7<256) {
unsigned char *tmpbuffer=new unsigned char [size+rhs->size+6];
auto tmpbuffer = new unsigned char[size + rhs->size + 6];
uint32 offset=0;
tmpbuffer[offset++]=Size();
offset+=serialize(tmpbuffer+offset);
@@ -457,7 +457,7 @@ EQApplicationPacket *EQApplicationPacket::Copy() const {
}
EQRawApplicationPacket *EQProtocolPacket::MakeAppPacket() const {
EQRawApplicationPacket *res = new EQRawApplicationPacket(opcode, pBuffer, size);
auto res = new EQRawApplicationPacket(opcode, pBuffer, size);
res->copyInfo(this);
return(res);
}
+9 -2
View File
@@ -51,6 +51,7 @@ protected:
EmuOpcode emu_opcode;
EQPacket(EmuOpcode opcode, const unsigned char *buf, const uint32 len);
EQPacket(EmuOpcode opcode, SerializeBuffer &buf) : BasePacket(buf), emu_opcode(opcode) { };
// EQPacket(const EQPacket &p) { }
EQPacket() { emu_opcode=OP_Unknown; pBuffer=nullptr; size=0; }
@@ -62,7 +63,7 @@ class EQProtocolPacket : public BasePacket {
friend class EQStream;
friend class EQStreamPair;
public:
EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len) : BasePacket(buf,len), opcode(op) { acked = false; }
EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len) : BasePacket(buf, len), opcode(op) { acked = false; sent_time = 0; }
// EQProtocolPacket(const unsigned char *buf, uint32 len);
bool combine(const EQProtocolPacket *rhs);
uint32 serialize (unsigned char *dest) const;
@@ -70,6 +71,7 @@ public:
EQRawApplicationPacket *MakeAppPacket() const;
bool acked;
uint32 sent_time;
virtual void build_raw_header_dump(char *buffer, uint16 seq=0xffff) const;
virtual void build_header_dump(char *buffer) const;
@@ -103,6 +105,8 @@ public:
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op, buf, len), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, SerializeBuffer &buf) : EQPacket(op, buf), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
bool combine(const EQApplicationPacket *rhs);
uint32 serialize (uint16 opcode, unsigned char *dest) const;
uint32 Size() const { return size+app_opcode_size; }
@@ -114,11 +118,14 @@ public:
virtual void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;
virtual void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;
uint16 GetOpcodeBypass() { return opcode_bypass; }
uint16 GetOpcodeBypass() const { return opcode_bypass; }
void SetOpcodeBypass(uint16 v) { opcode_bypass = v; }
uint16 GetProtocolOpcode() const { return protocol_opcode; }
void SetProtocolOpcode(uint16 v) { protocol_opcode = v; }
protected:
uint16 protocol_opcode;
uint8 app_opcode_size;
uint16 opcode_bypass;
private:
+669 -387
View File
File diff suppressed because it is too large Load Diff
+216 -242
View File
File diff suppressed because it is too large Load Diff
+5 -18
View File
@@ -153,7 +153,6 @@ class EQStream : public EQStreamInterface {
std::deque<EQProtocolPacket *> SequencedQueue;
uint16 NextOutSeq;
uint16 SequencedBase; //the sequence number of SequencedQueue[0]
long NextSequencedSend; //index into SequencedQueue
Mutex MOutboundQueue;
//a buffer we use for compression/decompression
@@ -174,7 +173,7 @@ class EQStream : public EQStreamInterface {
Mutex MRate;
int32 RateThreshold;
int32 DecayRate;
uint32 AverageDelta;
OpcodeManager **OpMgr;
@@ -242,7 +241,7 @@ class EQStream : public EQStreamInterface {
virtual bool CheckState(EQStreamState state) { return GetState() == state; }
virtual std::string Describe() const { return("Direct EQStream"); }
void SetOpcodeManager(OpcodeManager **opm) { OpMgr = opm; }
virtual void SetOpcodeManager(OpcodeManager **opm) { OpMgr = opm; }
void CheckTimeout(uint32 now, uint32 timeout=30);
bool HasOutgoingData();
@@ -251,13 +250,13 @@ class EQStream : public EQStreamInterface {
void Write(int eq_fd);
// whether or not the stream has been assigned (we passed our stream match)
void SetActive(bool val) { streamactive = val; }
virtual void SetActive(bool val) { streamactive = val; }
//
inline bool IsInUse() { bool flag; MInUse.lock(); flag=(active_users>0); MInUse.unlock(); return flag; }
inline void PutInUse() { MInUse.lock(); active_users++; MInUse.unlock(); }
inline EQStreamState GetState() { EQStreamState s; MState.lock(); s=State; MState.unlock(); return s; }
virtual EQStreamState GetState() { EQStreamState s; MState.lock(); s=State; MState.unlock(); return s; }
static SeqOrder CompareSequence(uint16 expected_seq , uint16 seq);
@@ -307,19 +306,7 @@ class EQStream : public EQStreamInterface {
const uint64 GetPacketsReceived() { return received_packet_count; }
//used for dynamic stream identification
class Signature {
public:
//this object could get more complicated if needed...
uint16 ignore_eq_opcode; //0=dont ignore
uint16 first_eq_opcode;
uint32 first_length; //0=dont check length
};
typedef enum {
MatchNotReady,
MatchSuccessful,
MatchFailed
} MatchState;
MatchState CheckSignature(const Signature *sig);
virtual MatchState CheckSignature(const Signature *sig);
};
+18 -33
View File
@@ -3,7 +3,7 @@
#include "eq_stream_factory.h"
#ifdef _WINDOWS
#include <winsock.h>
#include <winsock2.h>
#include <process.h>
#include <io.h>
#include <stdio.h>
@@ -23,18 +23,10 @@
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
{
EQStreamFactory *fs=(EQStreamFactory *)eqfs;
#ifndef WIN32
Log.Out(Logs::Detail, Logs::None, "Starting EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
#endif
EQStreamFactory *fs=(EQStreamFactory *)eqfs;
fs->ReaderLoop();
#ifndef WIN32
Log.Out(Logs::Detail, Logs::None, "Ending EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
}
@@ -42,16 +34,8 @@ ThreadReturnType EQStreamFactoryWriterLoop(void *eqfs)
{
EQStreamFactory *fs=(EQStreamFactory *)eqfs;
#ifndef WIN32
Log.Out(Logs::Detail, Logs::None, "Starting EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
#endif
fs->WriterLoop();
#ifndef WIN32
Log.Out(Logs::Detail, Logs::None, "Ending EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
}
@@ -120,7 +104,7 @@ std::shared_ptr<EQStream> EQStreamFactory::Pop()
{
std::shared_ptr<EQStream> s = nullptr;
MNewStreams.lock();
if (NewStreams.size()) {
if (!NewStreams.empty()) {
s = NewStreams.front();
NewStreams.pop();
s->PutInUse();
@@ -235,7 +219,7 @@ void EQStreamFactory::CheckTimeout()
//give it a little time for everybody to finish with it
} else {
//everybody is done, we can delete it now
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator temp = stream_itr;
auto temp = stream_itr;
++stream_itr;
temp->second = nullptr;
Streams.erase(temp);
@@ -250,8 +234,7 @@ void EQStreamFactory::CheckTimeout()
void EQStreamFactory::WriterLoop()
{
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator stream_itr;
bool havework=true;
bool havework = true;
std::vector<std::shared_ptr<EQStream>> wants_write;
std::vector<std::shared_ptr<EQStream>>::iterator cur, end;
bool decay = false;
@@ -260,7 +243,7 @@ void EQStreamFactory::WriterLoop()
WriterRunning = true;
DecayTimer.Enable();
while(sock!=-1) {
while (sock != -1) {
MWriterRunning.lock();
if (!WriterRunning)
break;
@@ -269,34 +252,36 @@ void EQStreamFactory::WriterLoop()
havework = false;
wants_write.clear();
decay=DecayTimer.Check();
decay = DecayTimer.Check();
//copy streams into a seperate list so we dont have to keep
//MStreams locked while we are writting
// copy streams into a seperate list so we dont have to keep
// MStreams locked while we are writting
MStreams.lock();
for(stream_itr=Streams.begin();stream_itr!=Streams.end();++stream_itr) {
for (auto stream_itr = Streams.begin(); stream_itr != Streams.end(); ++stream_itr) {
// If it's time to decay the bytes sent, then let's do it before we try to write
if (decay)
stream_itr->second->Decay();
//bullshit checking, to see if this is really happening, GDB seems to think so...
if(stream_itr->second == nullptr) {
fprintf(stderr, "ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i:%i", stream_itr->first.first, stream_itr->first.second);
// bullshit checking, to see if this is really happening, GDB seems to think so...
if (stream_itr->second == nullptr) {
fprintf(stderr,
"ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i:%i",
stream_itr->first.first, stream_itr->first.second);
continue;
}
if (stream_itr->second->HasOutgoingData()) {
havework=true;
havework = true;
stream_itr->second->PutInUse();
wants_write.push_back(stream_itr->second);
}
}
MStreams.unlock();
//do the actual writes
// do the actual writes
cur = wants_write.begin();
end = wants_write.end();
for(; cur != end; ++cur) {
for (; cur != end; ++cur) {
(*cur)->Write(sock);
(*cur)->ReleaseFromUse();
}
+25 -23
View File
@@ -1,8 +1,10 @@
#include <utility>
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_stream_ident.h"
#include "eq_stream_proxy.h"
#include "misc.h"
EQStreamIdentifier::~EQStreamIdentifier() {
while(!m_identified.empty()) {
@@ -24,8 +26,8 @@ EQStreamIdentifier::~EQStreamIdentifier() {
}
}
void EQStreamIdentifier::RegisterPatch(const EQStream::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs) {
Patch *p = new Patch;
void EQStreamIdentifier::RegisterPatch(const EQStreamInterface::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs) {
auto p = new Patch;
p->signature = sig;
p->name = name;
p->opcodes = opcodes;
@@ -44,9 +46,9 @@ void EQStreamIdentifier::Process() {
//first see if this stream has expired
if(r.expire.Check(false)) {
//this stream has failed to match any pattern in our timeframe.
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before timeout.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
r.stream->ReleaseFromUse();
LogNetcode("[StreamIdentify] Unable to identify stream from [{}:{}] before timeout", r.stream->GetRemoteAddr().c_str(), ntohs(r.stream->GetRemotePort()));
r.stream->Close();
cur = m_streams.erase(cur);
continue;
}
@@ -60,23 +62,23 @@ void EQStreamIdentifier::Process() {
}
if(r.stream->GetState() != ESTABLISHED) {
//the stream closed before it was identified.
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before it closed.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
LogNetcode("[StreamIdentify] Unable to identify stream from [{}:{}] before it closed", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
switch(r.stream->GetState())
{
case ESTABLISHED:
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Established");
LogNetcode("[StreamIdentify] Stream state was Established");
break;
case CLOSING:
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closing");
LogNetcode("[StreamIdentify] Stream state was Closing");
break;
case DISCONNECTING:
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Disconnecting");
LogNetcode("[StreamIdentify] Stream state was Disconnecting");
break;
case CLOSED:
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closed");
LogNetcode("[StreamIdentify] Stream state was Closed");
break;
default:
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Unestablished or unknown");
LogNetcode("[StreamIdentify] Stream state was Unestablished or unknown");
break;
}
r.stream->ReleaseFromUse();
@@ -96,17 +98,17 @@ void EQStreamIdentifier::Process() {
Patch *p = *curp;
//ask the stream to see if it matches the supplied signature
EQStream::MatchState res = r.stream->CheckSignature(&p->signature);
EQStreamInterface::MatchState res = r.stream->CheckSignature(&p->signature);
switch(res) {
case EQStream::MatchNotReady:
case EQStreamInterface::MatchNotReady:
//the stream has not received enough packets to compare with this signature
// Log.LogDebugType(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, but stream is not ready for it.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
// Log.LogDebugType(Logs::General, Logs::Netcode, "[StreamIdentify] %s:%d: Tried patch %s, but stream is not ready for it.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
all_ready = false;
break;
case EQStream::MatchSuccessful: {
case EQStreamInterface::MatchSuccessful: {
//yay, a match.
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Identified stream %s:%d with signature %s", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
LogNetcode("[StreamIdentify] Identified stream [{}:{}] with signature [{}]", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
// before we assign the eqstream to an interface, let the stream recognize it is in use and the session should not be reset any further
r.stream->SetActive(true);
@@ -118,9 +120,9 @@ void EQStreamIdentifier::Process() {
found_one = true;
break;
}
case EQStream::MatchFailed:
case EQStreamInterface::MatchFailed:
//do nothing...
Log.Out(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, and it did not match.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
LogNetcode("[StreamIdentify] [{}:{}] Tried patch [{}] and it did not match", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
break;
}
}
@@ -128,7 +130,7 @@ void EQStreamIdentifier::Process() {
//if we checked all patches and did not find a match.
if(all_ready && !found_one) {
//the stream cannot be identified.
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d, no match found.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
LogNetcode("[StreamIdentify] Unable to identify stream from [{}:{}], no match found", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
r.stream->ReleaseFromUse();
}
@@ -142,7 +144,7 @@ void EQStreamIdentifier::Process() {
} //end foreach stream
}
void EQStreamIdentifier::AddStream(std::shared_ptr<EQStream> &eqs) {
void EQStreamIdentifier::AddStream(std::shared_ptr<EQStreamInterface> eqs) {
m_streams.push_back(Record(eqs));
eqs = nullptr;
}
@@ -155,8 +157,8 @@ EQStreamInterface *EQStreamIdentifier::PopIdentified() {
return(res);
}
EQStreamIdentifier::Record::Record(std::shared_ptr<EQStream> s)
: stream(s),
EQStreamIdentifier::Record::Record(std::shared_ptr<EQStreamInterface> s)
: stream(std::move(s)),
expire(STREAM_IDENT_WAIT_MS)
{
}
+7 -7
View File
@@ -1,13 +1,13 @@
#ifndef EQSTREAMIDENT_H_
#define EQSTREAMIDENT_H_
#include "eq_stream.h"
#include "eq_stream_intf.h"
#include "timer.h"
#include <vector>
#include <queue>
#include <memory>
#define STREAM_IDENT_WAIT_MS 10000
#define STREAM_IDENT_WAIT_MS 30000
class OpcodeManager;
class StructStrategy;
@@ -18,11 +18,11 @@ public:
~EQStreamIdentifier();
//registration interface.
void RegisterPatch(const EQStream::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs);
void RegisterPatch(const EQStreamInterface::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs);
//main processing interface
void Process();
void AddStream(std::shared_ptr<EQStream> &eqs);
void AddStream(std::shared_ptr<EQStreamInterface> eqs);
EQStreamInterface *PopIdentified();
protected:
@@ -31,7 +31,7 @@ protected:
class Patch {
public:
std::string name;
EQStream::Signature signature;
EQStreamInterface::Signature signature;
OpcodeManager ** opcodes;
const StructStrategy *structs;
};
@@ -40,8 +40,8 @@ protected:
//pending streams..
class Record {
public:
Record(std::shared_ptr<EQStream> s);
std::shared_ptr<EQStream> stream; //we own this
Record(std::shared_ptr<EQStreamInterface> s);
std::shared_ptr<EQStreamInterface> stream; //we own this
Timer expire;
};
std::vector<Record> m_streams; //we own these objects, and the streams contained in them.
+75 -7
View File
@@ -4,7 +4,9 @@
//this is the only part of an EQStream that is seen by the application.
#include <string>
#include "clientversions.h"
#include "emu_versions.h"
#include "eq_packet.h"
#include "net/daybreak_connection.h"
typedef enum {
ESTABLISHED,
@@ -15,27 +17,93 @@ typedef enum {
} EQStreamState;
class EQApplicationPacket;
class OpcodeManager;
struct EQStreamManagerInterfaceOptions
{
EQStreamManagerInterfaceOptions() {
opcode_size = 2;
}
EQStreamManagerInterfaceOptions(int port, bool encoded, bool compressed) {
opcode_size = 2;
//World seems to support both compression and xor zone supports one or the others.
//Enforce one or the other in the convienence construct
//Login I had trouble getting to recognize compression at all
//but that might be because it was still a bit buggy when i was testing that.
if (compressed) {
daybreak_options.encode_passes[0] = EQ::Net::EncodeCompression;
}
else if (encoded) {
daybreak_options.encode_passes[0] = EQ::Net::EncodeXOR;
}
daybreak_options.port = port;
}
int opcode_size;
bool track_opcode_stats;
EQ::Net::DaybreakConnectionManagerOptions daybreak_options;
};
class EQStreamManagerInterface
{
public:
EQStreamManagerInterface(const EQStreamManagerInterfaceOptions &options) { m_options = options; }
virtual ~EQStreamManagerInterface() { };
EQStreamManagerInterfaceOptions GetOptions() { return m_options; }
const EQStreamManagerInterfaceOptions& GetOptions() const { return m_options; }
virtual void SetOptions(const EQStreamManagerInterfaceOptions& options) = 0;
protected:
EQStreamManagerInterfaceOptions m_options;
};
class EQStreamInterface {
public:
virtual ~EQStreamInterface() {}
class Signature {
public:
//this object could get more complicated if needed...
uint16 ignore_eq_opcode; //0=dont ignore
uint16 first_eq_opcode;
uint32 first_length; //0=dont check length
};
typedef enum {
MatchNotReady,
MatchSuccessful,
MatchFailed
} MatchState;
struct Stats
{
EQ::Net::DaybreakConnectionStats DaybreakStats;
int RecvCount[_maxEmuOpcode];
int SentCount[_maxEmuOpcode];
};
virtual void QueuePacket(const EQApplicationPacket *p, bool ack_req=true) = 0;
virtual void FastQueuePacket(EQApplicationPacket **p, bool ack_req=true) = 0;
virtual EQApplicationPacket *PopPacket() = 0;
virtual void Close() = 0;
virtual void ReleaseFromUse() = 0;
virtual void RemoveData() = 0;
virtual std::string GetRemoteAddr() const = 0;
virtual uint32 GetRemoteIP() const = 0;
virtual uint16 GetRemotePort() const = 0;
virtual bool CheckState(EQStreamState state) = 0;
virtual std::string Describe() const = 0;
virtual const uint32 GetBytesSent() const { return 0; }
virtual const uint32 GetBytesRecieved() const { return 0; }
virtual const uint32 GetBytesSentPerSecond() const { return 0; }
virtual const uint32 GetBytesRecvPerSecond() const { return 0; }
virtual const ClientVersion GetClientVersion() const { return ClientVersion::Unknown; }
virtual void SetActive(bool val) { }
virtual MatchState CheckSignature(const Signature *sig) { return MatchFailed; }
virtual EQStreamState GetState() = 0;
virtual void SetOpcodeManager(OpcodeManager **opm) = 0;
virtual const EQ::versions::ClientVersion ClientVersion() const { return EQ::versions::ClientVersion::Unknown; }
virtual Stats GetStats() const = 0;
virtual void ResetStats() = 0;
virtual EQStreamManagerInterface* GetManager() const = 0;
};
#endif /*EQSTREAMINTF_H_*/
+39 -24
View File
@@ -1,11 +1,12 @@
#include "global_define.h"
#include "eq_stream_proxy.h"
#include "eq_stream.h"
#include "struct_strategy.h"
#include "eqemu_logsys.h"
#include "opcodemgr.h"
EQStreamProxy::EQStreamProxy(std::shared_ptr<EQStream> &stream, const StructStrategy *structs, OpcodeManager **opcodes)
EQStreamProxy::EQStreamProxy(std::shared_ptr<EQStreamInterface> &stream, const StructStrategy *structs, OpcodeManager **opcodes)
: m_stream(stream),
m_structs(structs),
m_opcodes(opcodes)
@@ -21,15 +22,30 @@ std::string EQStreamProxy::Describe() const {
return(m_structs->Describe());
}
const ClientVersion EQStreamProxy::GetClientVersion() const
const EQ::versions::ClientVersion EQStreamProxy::ClientVersion() const
{
return m_structs->GetClientVersion();
return m_structs->ClientVersion();
}
EQStreamState EQStreamProxy::GetState()
{
return m_stream->GetState();
}
void EQStreamProxy::SetOpcodeManager(OpcodeManager **opm)
{
return m_stream->SetOpcodeManager(opm);
}
void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
if(p == nullptr)
return;
if (p->GetOpcode() != OP_SpecialMesg) {
Log(Logs::General, Logs::PacketServerClient, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size());
Log(Logs::General, Logs::PacketServerClientWithDump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size(), DumpPacketToString(p).c_str());
}
EQApplicationPacket *newp = p->Copy();
FastQueuePacket(&newp, ack_req);
}
@@ -54,6 +70,10 @@ void EQStreamProxy::Close() {
m_stream->Close();
}
std::string EQStreamProxy::GetRemoteAddr() const {
return(m_stream->GetRemoteAddr());
}
uint32 EQStreamProxy::GetRemoteIP() const {
return(m_stream->GetRemoteIP());
}
@@ -62,26 +82,6 @@ uint16 EQStreamProxy::GetRemotePort() const {
return(m_stream->GetRemotePort());
}
const uint32 EQStreamProxy::GetBytesSent() const
{
return(m_stream->GetBytesSent());
}
const uint32 EQStreamProxy::GetBytesRecieved() const
{
return(m_stream->GetBytesRecieved());
}
const uint32 EQStreamProxy::GetBytesSentPerSecond() const
{
return(m_stream->GetBytesSentPerSecond());
}
const uint32 EQStreamProxy::GetBytesRecvPerSecond() const
{
return(m_stream->GetBytesRecvPerSecond());
}
void EQStreamProxy::ReleaseFromUse() {
m_stream->ReleaseFromUse();
}
@@ -90,6 +90,21 @@ void EQStreamProxy::RemoveData() {
m_stream->RemoveData();
}
EQStreamInterface::Stats EQStreamProxy::GetStats() const
{
return m_stream->GetStats();
}
void EQStreamProxy::ResetStats()
{
m_stream->ResetStats();
}
EQStreamManagerInterface *EQStreamProxy::GetManager() const
{
return m_stream->GetManager();
}
bool EQStreamProxy::CheckState(EQStreamState state) {
if(m_stream)
return(m_stream->CheckState(state));
+10 -10
View File
@@ -4,7 +4,6 @@
#include "types.h"
#include "eq_stream_intf.h"
#include "eq_stream.h"
#include <memory>
class StructStrategy;
@@ -14,7 +13,7 @@ class EQApplicationPacket;
class EQStreamProxy : public EQStreamInterface {
public:
//takes ownership of the stream.
EQStreamProxy(std::shared_ptr<EQStream> &stream, const StructStrategy *structs, OpcodeManager **opcodes);
EQStreamProxy(std::shared_ptr<EQStreamInterface> &stream, const StructStrategy *structs, OpcodeManager **opcodes);
virtual ~EQStreamProxy();
//EQStreamInterface:
@@ -22,22 +21,23 @@ public:
virtual void FastQueuePacket(EQApplicationPacket **p, bool ack_req=true);
virtual EQApplicationPacket *PopPacket();
virtual void Close();
virtual std::string GetRemoteAddr() const;
virtual uint32 GetRemoteIP() const;
virtual uint16 GetRemotePort() const;
virtual void ReleaseFromUse();
virtual void RemoveData();
virtual bool CheckState(EQStreamState state);
virtual std::string Describe() const;
virtual const ClientVersion GetClientVersion() const;
virtual const uint32 GetBytesSent() const;
virtual const uint32 GetBytesRecieved() const;
virtual const uint32 GetBytesSentPerSecond() const;
virtual const uint32 GetBytesRecvPerSecond() const;
virtual const EQ::versions::ClientVersion ClientVersion() const;
virtual EQStreamState GetState();
virtual void SetOpcodeManager(OpcodeManager **opm);
virtual Stats GetStats() const;
virtual void ResetStats();
virtual EQStreamManagerInterface* GetManager() const;
protected:
std::shared_ptr<EQStream> const m_stream; //we own this stream object.
const StructStrategy *const m_structs; //we do not own this object.
std::shared_ptr<EQStreamInterface> const m_stream; //we own this stream object.
const StructStrategy *const m_structs; //we do not own this object.
//this is a pointer to a pointer to make it less likely that a packet will
//reference an invalid opcode manager when they are being reloaded.
OpcodeManager **const m_opcodes; //we do not own this object.
+1 -1
View File
@@ -63,7 +63,7 @@ EQDBRes * EQDB::query(Const_char *q) {
//NOT THREAD SAFE!
Const_char *EQDB::escape_string(Const_char *from) {
int len = strlen(from);
char *res = new char[len*2+1];
auto res = new char[len * 2 + 1];
mysql_real_escape_string(mysql_ref,res,from,len);
+184 -288
View File
@@ -23,299 +23,164 @@
#include <iostream>
#include <sstream>
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
std::string EQEmuConfig::ConfigFile = "eqemu_config.json";
EQEmuConfig *EQEmuConfig::_config = nullptr;
void EQEmuConfig::do_world(TiXmlElement *ele)
void EQEmuConfig::parse_config()
{
const char *text;
TiXmlElement * sub_ele;;
text = ParseTextBlock(ele, "shortname");
if (text) {
ShortName = text;
}
text = ParseTextBlock(ele, "longname");
if (text) {
LongName = text;
}
text = ParseTextBlock(ele, "address", true);
if (text) {
WorldAddress = text;
}
text = ParseTextBlock(ele, "localaddress", true);
if (text) {
LocalAddress = text;
}
text = ParseTextBlock(ele, "maxclients", true);
if (text) {
MaxClients = atoi(text);
}
// Get the <key> element
text = ParseTextBlock(ele, "key", true);
if (text) {
SharedKey = text;
}
// Get the <loginserver> element
sub_ele = ele->FirstChildElement("loginserver");
if (sub_ele) {
text = ParseTextBlock(sub_ele, "host", true);
if (text) {
LoginHost = text;
ShortName = _root["server"]["world"].get("shortname", "").asString();
LongName = _root["server"]["world"].get("longname", "").asString();
WorldAddress = _root["server"]["world"].get("address", "").asString();
LocalAddress = _root["server"]["world"].get("localaddress", "").asString();
MaxClients = atoi(_root["server"]["world"].get("maxclients", "-1").asString().c_str());
SharedKey = _root["server"]["world"].get("key", "").asString();
LoginCount = 0;
if (_root["server"]["world"]["loginserver"].isObject()) {
LoginHost = _root["server"]["world"]["loginserver"].get("host", "login.eqemulator.net").asString();
LoginPort = atoi(_root["server"]["world"]["loginserver"].get("port", "5998").asString().c_str());
LoginLegacy = false;
if (_root["server"]["world"]["loginserver"].get("legacy", "0").asString() == "1") { LoginLegacy = true; }
LoginAccount = _root["server"]["world"]["loginserver"].get("account", "").asString();
LoginPassword = _root["server"]["world"]["loginserver"].get("password", "").asString();
// at least today, this is wrong a majority of the time
// remove this if eqemulator ever upgrades its loginserver
if (LoginHost.find("login.eqemulator.net") != std::string::npos) {
LoginLegacy = true;
}
text = ParseTextBlock(sub_ele, "port", true);
if (text) {
LoginPort = atoi(text);
}
text = ParseTextBlock(sub_ele, "account", true);
if (text) {
LoginAccount = text;
}
text = ParseTextBlock(sub_ele, "password", true);
if (text) {
LoginPassword = text;
}
} else {
char str[32];
}
else {
char str[32];
loginlist.Clear();
do {
sprintf(str, "loginserver%i", ++LoginCount);
sub_ele = ele->FirstChildElement(str);
if (sub_ele) {
LoginConfig* loginconfig = new LoginConfig;
text = ParseTextBlock(sub_ele, "host", true);
if (text) {
loginconfig->LoginHost = text;
}
text = ParseTextBlock(sub_ele, "port", true);
if (text) {
loginconfig->LoginPort = atoi(text);
}
text = ParseTextBlock(sub_ele, "account", true);
if (text) {
loginconfig->LoginAccount = text;
}
text = ParseTextBlock(sub_ele, "password", true);
if (text) {
loginconfig->LoginPassword = text;
}
loginlist.Insert(loginconfig);
if (!_root["server"]["world"][str].isObject()) {
break;
}
} while (sub_ele);
auto loginconfig = new LoginConfig;
loginconfig->LoginHost = _root["server"]["world"][str].get("host", "login.eqemulator.net").asString();
loginconfig->LoginPort = atoi(_root["server"]["world"][str].get("port", "5998").asString().c_str());
loginconfig->LoginAccount = _root["server"]["world"][str].get("account", "").asString();
loginconfig->LoginPassword = _root["server"]["world"][str].get("password", "").asString();
loginconfig->LoginLegacy = false;
if (_root["server"]["world"][str].get("legacy", "0").asString() == "1") { loginconfig->LoginLegacy = true; }
// at least today, this is wrong a majority of the time
// remove this if eqemulator ever upgrades its loginserver
if (loginconfig->LoginHost.find("login.eqemulator.net") != std::string::npos) {
loginconfig->LoginLegacy = true;
}
loginlist.Insert(loginconfig);
} while (LoginCount < 100);
}
// Check for locked
sub_ele = ele->FirstChildElement("locked");
if (sub_ele != nullptr) {
Locked = true;
}
// Get the <tcp> element
sub_ele = ele->FirstChildElement("tcp");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("ip");
if (text) {
WorldIP = text;
}
text = sub_ele->Attribute("port");
if (text) {
WorldTCPPort = atoi(text);
}
text = sub_ele->Attribute("telnet");
if (text && !strcasecmp(text, "enabled")) {
TelnetEnabled = true;
}
}
// Get the <http> element
sub_ele = ele->FirstChildElement("http");
if (sub_ele != nullptr) {
// text = sub_ele->Attribute("ip");
// if (text)
// WorldIP=text;
text = sub_ele->Attribute("mimefile");
if (text) {
WorldHTTPMimeFile = text;
}
text = sub_ele->Attribute("port");
if (text) {
WorldHTTPPort = atoi(text);
}
text = sub_ele->Attribute("enabled");
if (text && !strcasecmp(text, "true")) {
WorldHTTPEnabled = true;
}
//<locked> from xml converts to json as locked: "", so i default to "false".
//The only way to enable locked is by switching to true, meaning this value is always false until manually set true
Locked = false;
if (_root["server"]["world"].get("locked", "false").asString() == "true") { Locked = true; }
WorldIP = _root["server"]["world"]["tcp"].get("host", "127.0.0.1").asString();
WorldTCPPort = atoi(_root["server"]["world"]["tcp"].get("port", "9000").asString().c_str());
TelnetIP = _root["server"]["world"]["telnet"].get("ip", "127.0.0.1").asString();
TelnetTCPPort = atoi(_root["server"]["world"]["telnet"].get("port", "9001").asString().c_str());
TelnetEnabled = false;
if (_root["server"]["world"]["telnet"].get("enabled", "false").asString() == "true") { TelnetEnabled = true; }
WorldHTTPMimeFile = _root["server"]["world"]["http"].get("mimefile", "mime.types").asString();
WorldHTTPPort = atoi(_root["server"]["world"]["http"].get("port", "9080").asString().c_str());
WorldHTTPEnabled = false;
if (_root["server"]["world"]["http"].get("enabled", "false").asString() == "true") {
WorldHTTPEnabled = true;
}
/**
* UCS
*/
ChatHost = _root["server"]["chatserver"].get("host", "eqchat.eqemulator.net").asString();
ChatPort = atoi(_root["server"]["chatserver"].get("port", "7778").asString().c_str());
MailHost = _root["server"]["mailserver"].get("host", "eqmail.eqemulator.net").asString();
MailPort = atoi(_root["server"]["mailserver"].get("port", "7778").asString().c_str());
/**
* Database
*/
DatabaseUsername = _root["server"]["database"].get("username", "eq").asString();
DatabasePassword = _root["server"]["database"].get("password", "eq").asString();
DatabaseHost = _root["server"]["database"].get("host", "localhost").asString();
DatabasePort = atoi(_root["server"]["database"].get("port", "3306").asString().c_str());
DatabaseDB = _root["server"]["database"].get("db", "eq").asString();
/**
* Content Database
*/
ContentDbUsername = _root["server"]["content_database"].get("username", "").asString();
ContentDbPassword = _root["server"]["content_database"].get("password", "").asString();
ContentDbHost = _root["server"]["content_database"].get("host", "").asString();
ContentDbPort = atoi(_root["server"]["content_database"].get("port", 0).asString().c_str());
ContentDbName = _root["server"]["content_database"].get("db", "").asString();
/**
* QS
*/
QSDatabaseHost = _root["server"]["qsdatabase"].get("host", "localhost").asString();
QSDatabasePort = atoi(_root["server"]["qsdatabase"].get("port", "3306").asString().c_str());
QSDatabaseUsername = _root["server"]["qsdatabase"].get("username", "eq").asString();
QSDatabasePassword = _root["server"]["qsdatabase"].get("password", "eq").asString();
QSDatabaseDB = _root["server"]["qsdatabase"].get("db", "eq").asString();
/**
* Zones
*/
DefaultStatus = atoi(_root["server"]["zones"].get("defaultstatus", 0).asString().c_str());
ZonePortLow = atoi(_root["server"]["zones"]["ports"].get("low", "7000").asString().c_str());
ZonePortHigh = atoi(_root["server"]["zones"]["ports"].get("high", "7999").asString().c_str());
/**
* Files
*/
SpellsFile = _root["server"]["files"].get("spells", "spells_us.txt").asString();
OpCodesFile = _root["server"]["files"].get("opcodes", "opcodes.conf").asString();
MailOpCodesFile = _root["server"]["files"].get("mail_opcodes", "mail_opcodes.conf").asString();
PluginPlFile = _root["server"]["files"].get("plugin.pl", "plugin.pl").asString();
/**
* Directories
*/
MapDir = _root["server"]["directories"].get("maps", "Maps/").asString();
QuestDir = _root["server"]["directories"].get("quests", "quests/").asString();
PluginDir = _root["server"]["directories"].get("plugins", "plugins/").asString();
LuaModuleDir = _root["server"]["directories"].get("lua_modules", "lua_modules/").asString();
PatchDir = _root["server"]["directories"].get("patches", "./").asString();
SharedMemDir = _root["server"]["directories"].get("shared_memory", "shared/").asString();
LogDir = _root["server"]["directories"].get("logs", "logs/").asString();
/**
* Logs
*/
LogPrefix = _root["server"]["launcher"].get("logprefix", "logs/zone-").asString();
LogSuffix = _root["server"]["launcher"].get("logsuffix", ".log").asString();
/**
* Launcher
*/
RestartWait = atoi(_root["server"]["launcher"]["timers"].get("restart", "10000").asString().c_str());
TerminateWait = atoi(_root["server"]["launcher"]["timers"].get("reterminate", "10000").asString().c_str());
InitialBootWait = atoi(_root["server"]["launcher"]["timers"].get("initial", "20000").asString().c_str());
ZoneBootInterval = atoi(_root["server"]["launcher"]["timers"].get("interval", "2000").asString().c_str());
#ifdef WIN32
ZoneExe = _root["server"]["launcher"].get("exe", "zone.exe").asString();
#else
ZoneExe = _root["server"]["launcher"].get("exe", "./zone").asString();
#endif
}
void EQEmuConfig::do_chatserver(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
ChatHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
ChatPort = atoi(text);
}
}
void EQEmuConfig::do_mailserver(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
MailHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
MailPort = atoi(text);
}
}
void EQEmuConfig::do_database(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
DatabaseHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
DatabasePort = atoi(text);
}
text = ParseTextBlock(ele, "username", true);
if (text) {
DatabaseUsername = text;
}
text = ParseTextBlock(ele, "password", true);
if (text) {
DatabasePassword = text;
}
text = ParseTextBlock(ele, "db", true);
if (text) {
DatabaseDB = text;
}
}
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
QSDatabaseHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
QSDatabasePort = atoi(text);
}
text = ParseTextBlock(ele, "username", true);
if (text) {
QSDatabaseUsername = text;
}
text = ParseTextBlock(ele, "password", true);
if (text) {
QSDatabasePassword = text;
}
text = ParseTextBlock(ele, "db", true);
if (text) {
QSDatabaseDB = text;
}
}
void EQEmuConfig::do_zones(TiXmlElement *ele)
{
const char *text;
TiXmlElement *sub_ele;
// TiXmlNode *node,*sub_node;
text = ParseTextBlock(ele, "defaultstatus", true);
if (text) {
DefaultStatus = atoi(text);
}
// Get the <ports> element
sub_ele = ele->FirstChildElement("ports");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("low");
if (text) {
ZonePortLow = atoi(text);
};
text = sub_ele->Attribute("high");
if (text) {
ZonePortHigh = atoi(text);
}
}
}
void EQEmuConfig::do_files(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "spells", true);
if (text) {
SpellsFile = text;
}
text = ParseTextBlock(ele, "opcodes", true);
if (text) {
OpCodesFile = text;
}
text = ParseTextBlock(ele, "eqtime", true);
if (text) {
EQTimeFile = text;
}
}
void EQEmuConfig::do_directories(TiXmlElement *ele)
{
const char *text;
text = ParseTextBlock(ele, "maps", true);
if (text) {
MapDir = text;
}
text = ParseTextBlock(ele, "quests", true);
if (text) {
QuestDir = text;
}
text = ParseTextBlock(ele, "plugins", true);
if (text) {
PluginDir = text;
}
}
void EQEmuConfig::do_launcher(TiXmlElement *ele)
{
const char *text;
TiXmlElement *sub_ele;
text = ParseTextBlock(ele, "logprefix", true);
if (text) {
LogPrefix = text;
}
text = ParseTextBlock(ele, "logsuffix", true);
if (text) {
LogSuffix = text;
}
// Get the <exe> element
text = ParseTextBlock(ele, "exe", true);
if (text) {
ZoneExe = text;
}
// Get the <timers> element
sub_ele = ele->FirstChildElement("timers");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("restart");
if (text) {
RestartWait = atoi(text);
}
text = sub_ele->Attribute("reterminate");
if (text) {
TerminateWait = atoi(text);
}
text = sub_ele->Attribute("initial");
if (text) {
InitialBootWait = atoi(text);
}
text = sub_ele->Attribute("interval");
if (text) {
ZoneBootInterval = atoi(text);
}
}
}
std::string EQEmuConfig::GetByName(const std::string &var_name) const
{
if (var_name == "ShortName") {
@@ -339,6 +204,9 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
if (var_name == "LoginPort") {
return (itoa(LoginPort));
}
if (var_name == "LoginLegacy") {
return (itoa(LoginLegacy ? 1 : 0));
}
if (var_name == "Locked") {
return (Locked ? "true" : "false");
}
@@ -348,6 +216,12 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
if (var_name == "WorldIP") {
return (WorldIP);
}
if (var_name == "TelnetTCPPort") {
return (itoa(TelnetTCPPort));
}
if (var_name == "TelnetIP") {
return (TelnetIP);
}
if (var_name == "TelnetEnabled") {
return (TelnetEnabled ? "true" : "false");
}
@@ -408,8 +282,11 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
if (var_name == "OpCodesFile") {
return (OpCodesFile);
}
if (var_name == "EQTimeFile") {
return (EQTimeFile);
if (var_name == "MailOpCodesFile") {
return (MailOpCodesFile);
}
if (var_name == "PluginPlFile") {
return (PluginPlFile);
}
if (var_name == "MapDir") {
return (MapDir);
@@ -420,6 +297,18 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
if (var_name == "PluginDir") {
return (PluginDir);
}
if (var_name == "LuaModuleDir") {
return (LuaModuleDir);
}
if (var_name == "PatchDir") {
return (PatchDir);
}
if (var_name == "SharedMemDir") {
return (SharedMemDir);
}
if (var_name == "LogDir") {
return (LogDir);
}
if (var_name == "LogPrefix") {
return (LogPrefix);
}
@@ -452,9 +341,12 @@ void EQEmuConfig::Dump() const
std::cout << "LoginAccount = " << LoginAccount << std::endl;
std::cout << "LoginPassword = " << LoginPassword << std::endl;
std::cout << "LoginPort = " << LoginPort << std::endl;
std::cout << "LoginLegacy = " << LoginLegacy << std::endl;
std::cout << "Locked = " << Locked << std::endl;
std::cout << "WorldTCPPort = " << WorldTCPPort << std::endl;
std::cout << "WorldIP = " << WorldIP << std::endl;
std::cout << "TelnetTCPPort = " << TelnetTCPPort << std::endl;
std::cout << "TelnetIP = " << TelnetIP << std::endl;
std::cout << "TelnetEnabled = " << TelnetEnabled << std::endl;
std::cout << "WorldHTTPPort = " << WorldHTTPPort << std::endl;
std::cout << "WorldHTTPMimeFile = " << WorldHTTPMimeFile << std::endl;
@@ -475,13 +367,17 @@ void EQEmuConfig::Dump() const
std::cout << "QSDatabasePort = " << QSDatabasePort << std::endl;
std::cout << "SpellsFile = " << SpellsFile << std::endl;
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
std::cout << "EQTimeFile = " << EQTimeFile << std::endl;
std::cout << "MailOpcodesFile = " << MailOpCodesFile << std::endl;
std::cout << "PluginPlFile = " << PluginPlFile << std::endl;
std::cout << "MapDir = " << MapDir << std::endl;
std::cout << "QuestDir = " << QuestDir << std::endl;
std::cout << "PluginDir = " << PluginDir << std::endl;
std::cout << "LuaModuleDir = " << LuaModuleDir << std::endl;
std::cout << "PatchDir = " << PatchDir << std::endl;
std::cout << "SharedMemDir = " << SharedMemDir << std::endl;
std::cout << "LogDir = " << LogDir << std::endl;
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
std::cout << "DefaultStatus = " << (int) DefaultStatus << std::endl;
// std::cout << "DynamicCount = " << DynamicCount << std::endl;
}
+45 -78
View File
@@ -18,17 +18,19 @@
#ifndef __EQEmuConfig_H
#define __EQEmuConfig_H
#include "xml_parser.h"
#include "json/json.h"
#include "linked_list.h"
#include <fstream>
struct LoginConfig {
std::string LoginHost;
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
bool LoginLegacy;
};
class EQEmuConfig : public XMLParser
class EQEmuConfig
{
public:
virtual std::string GetByName(const std::string &var_name) const;
@@ -42,11 +44,14 @@ class EQEmuConfig : public XMLParser
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
bool LoginLegacy;
uint32 LoginCount;
LinkedList<LoginConfig*> loginlist;
bool Locked;
uint16 WorldTCPPort;
std::string WorldIP;
uint16 TelnetTCPPort;
std::string TelnetIP;
bool TelnetEnabled;
int32 MaxClients;
bool WorldHTTPEnabled;
@@ -69,6 +74,13 @@ class EQEmuConfig : public XMLParser
std::string DatabaseDB;
uint16 DatabasePort;
// From <content_database/>
std::string ContentDbHost;
std::string ContentDbUsername;
std::string ContentDbPassword;
std::string ContentDbName;
uint16 ContentDbPort;
// From <qsdatabase> // QueryServ
std::string QSDatabaseHost;
std::string QSDatabaseUsername;
@@ -79,12 +91,17 @@ class EQEmuConfig : public XMLParser
// From <files/>
std::string SpellsFile;
std::string OpCodesFile;
std::string EQTimeFile;
std::string MailOpCodesFile;
std::string PluginPlFile;
// From <directories/>
std::string MapDir;
std::string QuestDir;
std::string PluginDir;
std::string LuaModuleDir;
std::string PatchDir;
std::string SharedMemDir;
std::string LogDir;
// From <launcher/>
std::string LogPrefix;
@@ -107,80 +124,14 @@ class EQEmuConfig : public XMLParser
protected:
static EQEmuConfig *_config;
Json::Value _root;
static std::string ConfigFile;
#define ELEMENT(name) \
void do_##name(TiXmlElement *ele);
#include "eqemu_config_elements.h"
void parse_config();
EQEmuConfig()
{
// import the needed handler prototypes
#define ELEMENT(name) \
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
#include "eqemu_config_elements.h"
// Set sane defaults
// Login server
LoginHost = "eqemulator.net";
LoginPort = 5998;
// World
Locked = false;
WorldTCPPort = 9000;
TelnetEnabled = false;
WorldHTTPEnabled = false;
WorldHTTPPort = 9080;
WorldHTTPMimeFile = "mime.types";
SharedKey = ""; //blank disables authentication
// Mail
ChatHost = "eqchat.eqemulator.net";
ChatPort = 7778;
// Mail
MailHost = "eqmail.eqemulator.net";
MailPort = 7779;
// Mysql
DatabaseHost = "localhost";
DatabasePort = 3306;
DatabaseUsername = "eq";
DatabasePassword = "eq";
DatabaseDB = "eq";
// QueryServ Database
QSDatabaseHost = "localhost";
QSDatabasePort = 3306;
QSDatabaseUsername = "eq";
QSDatabasePassword = "eq";
QSDatabaseDB = "eq";
// Files
SpellsFile = "spells_us.txt";
OpCodesFile = "opcodes.conf";
EQTimeFile = "eqtime.cfg";
// Dirs
MapDir = "Maps";
QuestDir = "quests";
PluginDir = "plugins";
// Launcher
LogPrefix = "logs/zone-";
LogSuffix = ".log";
RestartWait = 10000; //milliseconds
TerminateWait = 10000; //milliseconds
InitialBootWait = 20000; //milliseconds
ZoneBootInterval = 2000; //milliseconds
#ifdef WIN32
ZoneExe = "zone.exe";
#else
ZoneExe = "./zone";
#endif
// Zones
ZonePortLow = 7000;
ZonePortHigh = 7999;
DefaultStatus = 0;
// For where zones need to connect to.
WorldIP = "127.0.0.1";
// Dynamics to start
//DynamicCount=5;
MaxClients = -1;
LoginCount = 0;
{
}
virtual ~EQEmuConfig() {}
@@ -189,9 +140,7 @@ class EQEmuConfig : public XMLParser
// Produce a const singleton
static const EQEmuConfig *get()
{
if (_config == nullptr) {
LoadConfig();
}
LoadConfig();
return (_config);
}
@@ -205,10 +154,28 @@ class EQEmuConfig : public XMLParser
static bool LoadConfig()
{
if (_config != nullptr) {
delete _config;
return true;
}
_config = new EQEmuConfig;
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(), "server");
return parseFile();
}
// Load config file and parse data
static bool parseFile() {
if (_config == nullptr) {
return LoadConfig();
}
std::ifstream fconfig(EQEmuConfig::ConfigFile, std::ifstream::binary);
try {
fconfig >> _config->_root;
_config->parse_config();
}
catch (std::exception &) {
return false;
}
return true;
}
void Dump() const;
+1 -1
View File
@@ -18,7 +18,7 @@
#include "eqemu_exception.h"
namespace EQEmu
namespace EQ
{
Exception::Exception(const char* name, const std::string& description, const char* file, long line)
: line_(line),
+2 -2
View File
@@ -22,7 +22,7 @@
#include <sstream>
#include <exception>
namespace EQEmu
namespace EQ
{
//! EQEmu Exception Class
/*!
@@ -104,7 +104,7 @@ namespace EQEmu
} // EQEmu
#ifndef EQ_EXCEPT
#define EQ_EXCEPT(n, d) throw EQEmu::Exception(n, d, __FILE__, __LINE__)
#define EQ_EXCEPT(n, d) throw EQ::Exception(n, d, __FILE__, __LINE__)
#endif
#endif
+496 -162
View File
@@ -1,27 +1,29 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "eqemu_logsys.h"
#include "rulesys.h"
#include "platform.h"
#include "string_util.h"
#include "database.h"
#include "misc.h"
#include "repositories/logsys_categories_repository.h"
#include <iostream>
#include <fstream>
@@ -29,152 +31,259 @@
#include <iomanip>
#include <time.h>
#include <sys/stat.h>
#include <algorithm>
std::ofstream process_log;
#ifdef _WINDOWS
#include <direct.h>
#include <conio.h>
#include <iostream>
#include <dos.h>
#include <windows.h>
#include <process.h>
#include <direct.h>
#include <conio.h>
#include <iostream>
#include <dos.h>
#include <windows.h>
#include <process.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/stat.h>
#endif
/* Linux ANSI console color defines */
/**
* Linux ANSI console color defines
*/
#define LC_RESET "\033[0m"
#define LC_BLACK "\033[30m" /* Black */
#define LC_RED "\033[31m" /* Red */
#define LC_GREEN "\033[32m" /* Green */
#define LC_YELLOW "\033[33m" /* Yellow */
#define LC_BLUE "\033[34m" /* Blue */
#define LC_MAGENTA "\033[35m" /* Magenta */
#define LC_CYAN "\033[36m" /* Cyan */
#define LC_WHITE "\033[37m" /* White */
#define LC_BLACK "\033[30m" /* Black */
#define LC_RED "\033[31m" /* Red */
#define LC_GREEN "\033[32m" /* Green */
#define LC_YELLOW "\033[33m" /* Yellow */
#define LC_BLUE "\033[34m" /* Blue */
#define LC_MAGENTA "\033[35m" /* Magenta */
#define LC_CYAN "\033[36m" /* Cyan */
#define LC_WHITE "\033[37m" /* White */
namespace Console {
enum Color {
Black = 0,
Blue = 1,
Green = 2,
Cyan = 3,
Red = 4,
Magenta = 5,
Brown = 6,
LightGray = 7,
DarkGray = 8,
LightBlue = 9,
LightGreen = 10,
LightCyan = 11,
LightRed = 12,
Black = 0,
Blue = 1,
Green = 2,
Cyan = 3,
Red = 4,
Magenta = 5,
Brown = 6,
LightGray = 7,
DarkGray = 8,
LightBlue = 9,
LightGreen = 10,
LightCyan = 11,
LightRed = 12,
LightMagenta = 13,
Yellow = 14,
White = 15
Yellow = 14,
White = 15
};
}
/**
* EQEmuLogSys Constructor
*/
EQEmuLogSys::EQEmuLogSys()
{
on_log_gmsay_hook = [](uint16 log_type, const std::string&) {};
bool file_logs_enabled = false;
int log_platform = 0;
on_log_gmsay_hook = [](uint16 log_type, const std::string &) {};
on_log_console_hook = [](uint16 debug_level, uint16 log_type, const std::string &) {};
}
EQEmuLogSys::~EQEmuLogSys()
{
}
/**
* EQEmuLogSys Deconstructor
*/
EQEmuLogSys::~EQEmuLogSys() = default;
void EQEmuLogSys::LoadLogSettingsDefaults()
EQEmuLogSys *EQEmuLogSys::LoadLogSettingsDefaults()
{
/* Get Executable platform currently running this code (Zone/World/etc) */
/**
* Get Executable platform currently running this code (Zone/World/etc)
*/
log_platform = GetExecutablePlatformInt();
/* Zero out Array */
memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID);
for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) {
log_settings[log_category_id].log_to_console = 0;
log_settings[log_category_id].log_to_file = 0;
log_settings[log_category_id].log_to_gmsay = 0;
log_settings[log_category_id].is_category_enabled = 0;
}
/* Set Defaults */
log_settings[Logs::World_Server].log_to_console = Logs::General;
log_settings[Logs::Zone_Server].log_to_console = Logs::General;
log_settings[Logs::QS_Server].log_to_console = Logs::General;
log_settings[Logs::UCS_Server].log_to_console = Logs::General;
log_settings[Logs::Crash].log_to_console = Logs::General;
log_settings[Logs::MySQLError].log_to_console = Logs::General;
file_logs_enabled = false;
/* Declare process file names for log writing
If there is no process_file_name declared, no log file will be written, simply
*/
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld)
/**
* Set Defaults
*/
log_settings[Logs::WorldServer].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::ZoneServer].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::QSServer].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::UCSServer].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Crash].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::MySQLError].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Loginserver].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::HeadlessClient].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::NPCScaling].log_to_gmsay = static_cast<uint8>(Logs::General);
log_settings[Logs::HotReload].log_to_gmsay = static_cast<uint8>(Logs::General);
log_settings[Logs::HotReload].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Loot].log_to_gmsay = static_cast<uint8>(Logs::General);
log_settings[Logs::Scheduler].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Cheat].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::HTTP].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::HTTP].log_to_gmsay = static_cast<uint8>(Logs::General);
/**
* RFC 5424
*/
log_settings[Logs::Emergency].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Alert].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Critical].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Error].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Warning].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Notice].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::Info].log_to_console = static_cast<uint8>(Logs::General);
/**
* Set Category enabled status on defaults
*/
for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) {
const bool log_to_console = log_settings[log_category_id].log_to_console > 0;
const bool log_to_file = log_settings[log_category_id].log_to_file > 0;
const bool log_to_gmsay = log_settings[log_category_id].log_to_gmsay > 0;
const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay;
if (is_category_enabled) {
log_settings[log_category_id].is_category_enabled = 1;
}
}
/**
* Declare process file names for log writing=
*/
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld) {
platform_file_name = "world";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformQueryServ)
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformQueryServ) {
platform_file_name = "query_server";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) {
platform_file_name = "zone";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformUCS)
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformUCS) {
platform_file_name = "ucs";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin) {
platform_file_name = "login";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLaunch) {
platform_file_name = "launcher";
}
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformHC) {
platform_file_name = "hc";
}
return this;
}
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message)
/**
* @param log_category
* @return
*/
bool EQEmuLogSys::IsRfc5424LogCategory(uint16 log_category)
{
std::string category_string;
if (log_category > 0 && Logs::LogCategoryName[log_category])
category_string = StringFormat("[%s] ", Logs::LogCategoryName[log_category]);
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
return (
log_category == Logs::Emergency ||
log_category == Logs::Alert ||
log_category == Logs::Critical ||
log_category == Logs::Error ||
log_category == Logs::Warning ||
log_category == Logs::Notice ||
log_category == Logs::Info ||
log_category == Logs::Debug
);
}
void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message)
/**
* @param log_category
* @param in_message
* @return
*/
std::string EQEmuLogSys::FormatOutMessageString(
uint16 log_category,
const std::string &in_message
)
{
/* Check if category enabled for process */
if (log_settings[log_category].log_to_gmsay == 0)
return;
std::string return_string = "[" + GetPlatformName() + "] ";
/* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */
if (log_category == Logs::LogCategory::Netcode)
return;
return return_string + "[" + Logs::LogCategoryName[log_category] + "] " + in_message;
}
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_gmsay < debug_level)
/**
* @param debug_level
* @param log_category
* @param message
*/
void EQEmuLogSys::ProcessGMSay(
uint16 debug_level,
uint16 log_category,
const std::string &message
)
{
/**
* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash
*/
if (log_category == Logs::LogCategory::Netcode) {
return;
}
/* Check to see if the process that actually ran this is zone */
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
/**
* Processes that actually support hooks
*/
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone ||
EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld
) {
on_log_gmsay_hook(log_category, message);
}
}
void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message)
/**
* @param debug_level
* @param log_category
* @param message
*/
void EQEmuLogSys::ProcessLogWrite(
uint16 debug_level,
uint16 log_category,
const std::string &message
)
{
if (log_category == Logs::Crash) {
char time_stamp[80];
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
std::ofstream crash_log;
EQEmuLogSys::MakeDirectory("logs/crashes");
crash_log.open(StringFormat("logs/crashes/crash_%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
crash_log.open(
StringFormat("logs/crashes/crash_%s_%i.log", platform_file_name.c_str(), getpid()),
std::ios_base::app | std::ios_base::out
);
crash_log << time_stamp << " " << message << "\n";
crash_log.close();
}
/* Check if category enabled for process */
if (log_settings[log_category].log_to_file == 0)
return;
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_file < debug_level)
return;
char time_stamp[80];
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
if (process_log)
if (process_log) {
process_log << time_stamp << " " << message << std::endl;
}
}
uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) {
/**
* @param log_category
* @return
*/
uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category)
{
switch (log_category) {
case Logs::Status:
case Logs::Normal:
@@ -197,12 +306,19 @@ uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) {
}
}
std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) {
/**
* @param log_category
* @return
*/
std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category)
{
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return LC_YELLOW;
case Logs::MySQLError:
case Logs::Warning:
case Logs::Critical:
case Logs::Error:
return LC_RED;
case Logs::MySQLQuery:
@@ -220,86 +336,173 @@ std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) {
}
}
uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) {
/**
* @param log_category
* @return
*/
uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category)
{
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return 15; /* Yellow */
return Chat::Yellow;
case Logs::MySQLError:
case Logs::Error:
return 13; /* Red */
return Chat::Red;
case Logs::MySQLQuery:
case Logs::Debug:
return 14; /* Light Green */
return Chat::Lime;
case Logs::Quests:
return 258; /* Light Cyan */
return Chat::Group;
case Logs::Commands:
case Logs::Mercenaries:
return 5; /* Light Purple */
return Chat::Magenta;
case Logs::Crash:
return 13; /* Red */
return Chat::Red;
default:
return 15; /* Yellow */
return Chat::Yellow;
}
}
/**
* @param debug_level
* @param log_category
* @param message
*/
void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message)
{
/* Check if category enabled for process */
if (log_settings[log_category].log_to_console == 0)
return;
#ifdef _WINDOWS
HANDLE console_handle;
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_FONT_INFOEX info = { 0 };
info.cbSize = sizeof(info);
info.dwFontSize.Y = 12; // leave X as zero
info.FontWeight = FW_NORMAL;
wcscpy(info.FaceName, L"Lucida Console");
SetCurrentConsoleFontEx(console_handle, NULL, &info);
SetConsoleTextAttribute(console_handle, EQEmuLogSys::GetWindowsConsoleColorFromCategory(log_category));
std::cout << message << "\n";
SetConsoleTextAttribute(console_handle, Console::Color::White);
#else
std::cout << EQEmuLogSys::GetLinuxConsoleColorFromCategory(log_category) << message << LC_RESET << std::endl;
#endif
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_console < debug_level)
return;
#ifdef _WINDOWS
HANDLE console_handle;
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_FONT_INFOEX info = { 0 };
info.cbSize = sizeof(info);
info.dwFontSize.Y = 12; // leave X as zero
info.FontWeight = FW_NORMAL;
wcscpy(info.FaceName, L"Lucida Console");
SetCurrentConsoleFontEx(console_handle, NULL, &info);
SetConsoleTextAttribute(console_handle, EQEmuLogSys::GetWindowsConsoleColorFromCategory(log_category));
std::cout << message << "\n";
SetConsoleTextAttribute(console_handle, Console::Color::White);
#else
std::cout << EQEmuLogSys::GetLinuxConsoleColorFromCategory(log_category) << message << LC_RESET << std::endl;
#endif
on_log_console_hook(debug_level, log_category, message);
}
void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...)
/**
* @param str
* @return
*/
constexpr const char *str_end(const char *str)
{
const bool log_to_console = log_settings[log_category].log_to_console > 0;
const bool log_to_file = log_settings[log_category].log_to_file > 0;
const bool log_to_gmsay = log_settings[log_category].log_to_gmsay > 0;
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
return *str ? str_end(str + 1) : str;
}
if (nothing_to_log) return;
/**
* @param str
* @return
*/
constexpr bool str_slant(const char *str)
{
return *str == '/' ? true : (*str ? str_slant(str + 1) : false);
}
/**
* @param str
* @return
*/
constexpr const char *r_slant(const char *str)
{
return *str == '/' ? (str + 1) : r_slant(str - 1);
}
/**
* @param str
* @return
*/
constexpr const char *base_file_name(const char *str)
{
return str_slant(str) ? r_slant(str_end(str)) : str;
}
/**
* Core logging function
*
* @param debug_level
* @param log_category
* @param message
* @param ...
*/
void EQEmuLogSys::Out(
Logs::DebugLevel debug_level,
uint16 log_category,
const char *file,
const char *func,
int line,
const char *message,
...
)
{
bool log_to_console = true;
if (log_settings[log_category].log_to_console < debug_level) {
log_to_console = false;
}
bool log_to_file = true;
if (log_settings[log_category].log_to_file < debug_level) {
log_to_file = false;
}
bool log_to_gmsay = true;
if (log_settings[log_category].log_to_gmsay < debug_level) {
log_to_gmsay = false;
}
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
if (nothing_to_log) {
return;
}
std::string prefix;
if (RuleB(Logging, PrintFileFunctionAndLine)) {
prefix = fmt::format("[{0}::{1}:{2}] ", base_file_name(file), func, line);
}
va_list args;
va_start(args, message);
std::string output_message = vStringFormat(message.c_str(), args);
std::string output_message = vStringFormat(message, args);
va_end(args);
std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, output_message);
std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, prefix + output_message);
if (log_to_console) EQEmuLogSys::ProcessConsoleMessage(debug_level, log_category, output_debug_message);
if (log_to_gmsay) EQEmuLogSys::ProcessGMSay(debug_level, log_category, output_debug_message);
if (log_to_file) EQEmuLogSys::ProcessLogWrite(debug_level, log_category, output_debug_message);
if (log_to_console) {
EQEmuLogSys::ProcessConsoleMessage(debug_level, log_category, output_debug_message);
}
if (log_to_gmsay) {
EQEmuLogSys::ProcessGMSay(debug_level, log_category, output_debug_message);
}
if (log_to_file) {
EQEmuLogSys::ProcessLogWrite(debug_level, log_category, output_debug_message);
}
}
void EQEmuLogSys::SetCurrentTimeStamp(char* time_stamp)
/**
* @param time_stamp
*/
void EQEmuLogSys::SetCurrentTimeStamp(char *time_stamp)
{
time_t raw_time;
struct tm * time_info;
time_t raw_time;
struct tm *time_info;
time(&raw_time);
time_info = localtime(&raw_time);
strftime(time_stamp, 80, "[%m-%d-%Y :: %H:%M:%S]", time_info);
}
/**
* @param directory_name
*/
void EQEmuLogSys::MakeDirectory(const std::string &directory_name)
{
#ifdef _WINDOWS
@@ -308,9 +511,10 @@ void EQEmuLogSys::MakeDirectory(const std::string &directory_name)
return;
_mkdir(directory_name.c_str());
#else
struct stat st;
if (stat(directory_name.c_str(), &st) == 0) // exists
struct stat st{};
if (stat(directory_name.c_str(), &st) == 0) { // exists
return;
}
mkdir(directory_name.c_str(), 0755);
#endif
}
@@ -322,29 +526,159 @@ void EQEmuLogSys::CloseFileLogs()
}
}
/**
* @param log_name
*/
void EQEmuLogSys::StartFileLogs(const std::string &log_name)
{
EQEmuLogSys::CloseFileLogs();
/* When loading settings, we must have been given a reason in category based logging to output to a file in order to even create or open one... */
if (file_logs_enabled == false)
/**
* When loading settings, we must have been given a reason in category based logging to output to a file in order to even create or open one...
*/
if (!file_logs_enabled) {
return;
}
/**
* Zone
*/
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) {
if (!log_name.empty())
if (!log_name.empty()) {
platform_file_name = log_name;
}
if (platform_file_name.empty())
if (platform_file_name.empty()) {
return;
}
EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid());
LogInfo("Starting File Log [logs/{}_{}.log]", platform_file_name.c_str(), getpid());
/**
* Make directory if not exists
*/
EQEmuLogSys::MakeDirectory("logs/zone");
process_log.open(StringFormat("logs/zone/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
} else {
if (platform_file_name.empty())
return;
EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid());
process_log.open(StringFormat("logs/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
/**
* Open file pointer
*/
process_log.open(
StringFormat("logs/zone/%s_%i.log", platform_file_name.c_str(), getpid()),
std::ios_base::app | std::ios_base::out
);
}
else {
/**
* All other processes
*/
if (platform_file_name.empty()) {
return;
}
LogInfo("Starting File Log [logs/{}_{}.log]", platform_file_name.c_str(), getpid());
/**
* Open file pointer
*/
process_log.open(
StringFormat("logs/%s_%i.log", platform_file_name.c_str(), getpid()),
std::ios_base::app | std::ios_base::out
);
}
}
/**
* Silence console logging
*/
void EQEmuLogSys::SilenceConsoleLogging()
{
for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) {
log_settings[log_index].log_to_console = 0;
log_settings[log_index].is_category_enabled = 0;
}
}
/**
* Enables console logging
*/
void EQEmuLogSys::EnableConsoleLogging()
{
for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) {
log_settings[log_index].log_to_console = Logs::General;
log_settings[log_index].is_category_enabled = 1;
}
}
EQEmuLogSys *EQEmuLogSys::LoadLogDatabaseSettings()
{
auto categories = LogsysCategoriesRepository::GetWhere(
*m_database,
"TRUE ORDER BY log_category_id"
);
// keep track of categories
std::vector<int> db_categories{};
db_categories.reserve(categories.size());
// loop through database categories
for (auto &c: categories) {
if (c.log_category_id <= Logs::None || c.log_category_id >= Logs::MaxCategoryID) {
continue;
}
log_settings[c.log_category_id].log_to_console = static_cast<uint8>(c.log_to_console);
log_settings[c.log_category_id].log_to_file = static_cast<uint8>(c.log_to_file);
log_settings[c.log_category_id].log_to_gmsay = static_cast<uint8>(c.log_to_gmsay);
// Determine if any output method is enabled for the category
// and set it to 1 so it can used to check if category is enabled
const bool log_to_console = log_settings[c.log_category_id].log_to_console > 0;
const bool log_to_file = log_settings[c.log_category_id].log_to_file > 0;
const bool log_to_gmsay = log_settings[c.log_category_id].log_to_gmsay > 0;
const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay;
if (is_category_enabled) {
log_settings[c.log_category_id].is_category_enabled = 1;
}
// This determines whether or not the process needs to actually file log anything.
// If we go through this whole loop and nothing is set to any debug level, there
// is no point to create a file or keep anything open
if (log_settings[c.log_category_id].log_to_file > 0) {
LogSys.file_logs_enabled = true;
}
db_categories.emplace_back(c.log_category_id);
}
// Auto inject categories that don't exist in the database...
for (int i = Logs::AA; i != Logs::MaxCategoryID; i++) {
if (std::find(db_categories.begin(), db_categories.end(), i) == db_categories.end()) {
LogInfo(
"Automatically adding new log category [{0}]",
Logs::LogCategoryName[i]
);
auto new_category = LogsysCategoriesRepository::NewEntity();
new_category.log_category_id = i;
new_category.log_category_description = EscapeString(Logs::LogCategoryName[i]);
new_category.log_to_console = log_settings[i].log_to_console;
new_category.log_to_gmsay = log_settings[i].log_to_gmsay;
new_category.log_to_file = log_settings[i].log_to_file;
LogsysCategoriesRepository::InsertOne(*m_database, new_category);
}
}
LogInfo("Loaded [{}] log categories", categories.size());
return this;
}
EQEmuLogSys *EQEmuLogSys::SetDatabase(Database *db)
{
m_database = db;
return this;
}

Some files were not shown because too many files have changed in this diff Show More