mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 18:47:35 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c25cb0cc23 | |||
| ddac326239 | |||
| 14fe396510 |
@@ -1,3 +1,13 @@
|
|||||||
|
## [22.22.1] - 07/30/2023
|
||||||
|
|
||||||
|
### Database
|
||||||
|
|
||||||
|
* Hotfix: Add command_subsettings to server tables @Akkadius 2023-07-29
|
||||||
|
|
||||||
|
### Doors
|
||||||
|
|
||||||
|
* Add door blacklist ([#3516](https://github.com/EQEmu/Server/pull/3516)) @Akkadius 2023-07-30
|
||||||
|
|
||||||
## [22.22.0] - 07/27/2023
|
## [22.22.0] - 07/27/2023
|
||||||
|
|
||||||
### Code
|
### Code
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ namespace DatabaseSchema {
|
|||||||
"chatchannels",
|
"chatchannels",
|
||||||
"chatchannel_reserved_names",
|
"chatchannel_reserved_names",
|
||||||
"command_settings",
|
"command_settings",
|
||||||
|
"command_subsettings",
|
||||||
"content_flags",
|
"content_flags",
|
||||||
"db_str",
|
"db_str",
|
||||||
"eqtime",
|
"eqtime",
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Build variables
|
// Build variables
|
||||||
// these get injected during the build pipeline
|
// these get injected during the build pipeline
|
||||||
#define CURRENT_VERSION "22.22.0-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.22.1-dev" // always append -dev to the current version for custom-builds
|
||||||
#define LOGIN_VERSION "0.8.0"
|
#define LOGIN_VERSION "0.8.0"
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eqemu-server",
|
"name": "eqemu-server",
|
||||||
"version": "22.22.0",
|
"version": "22.22.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ Doors::Doors(const DoorsRepository::Doors &door) :
|
|||||||
m_close_timer.Disable();
|
m_close_timer.Disable();
|
||||||
|
|
||||||
m_disable_timer = (door.disable_timer == 1 ? true : false);
|
m_disable_timer = (door.disable_timer == 1 ? true : false);
|
||||||
|
|
||||||
|
m_is_blacklisted_to_open = GetIsDoorBlacklisted();
|
||||||
}
|
}
|
||||||
|
|
||||||
Doors::Doors(const char *model, const glm::vec4 &position, uint8 open_type, uint16 size) :
|
Doors::Doors(const char *model, const glm::vec4 &position, uint8 open_type, uint16 size) :
|
||||||
@@ -901,3 +903,27 @@ bool Doors::IsDestinationZoneSame() const
|
|||||||
{
|
{
|
||||||
return m_same_destination_zone;
|
return m_same_destination_zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsDoorBlacklisted has a static list of doors that are blacklisted
|
||||||
|
// from being opened by NPCs. This is used to prevent NPCs from opening
|
||||||
|
// doors that are not meant to be opened by NPCs.
|
||||||
|
bool Doors::GetIsDoorBlacklisted()
|
||||||
|
{
|
||||||
|
std::vector<std::string> blacklist = {
|
||||||
|
"TOGGLE",
|
||||||
|
"PNDRESSER101",
|
||||||
|
};
|
||||||
|
|
||||||
|
for (auto& name : blacklist) {
|
||||||
|
std::string door_name = GetDoorName();
|
||||||
|
if (name == door_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Doors::IsDoorBlacklisted() {
|
||||||
|
return m_is_blacklisted_to_open;
|
||||||
|
}
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ public:
|
|||||||
bool HasDestinationZone() const;
|
bool HasDestinationZone() const;
|
||||||
bool IsDestinationZoneSame() const;
|
bool IsDestinationZoneSame() const;
|
||||||
|
|
||||||
|
bool IsDoorBlacklisted();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool GetIsDoorBlacklisted();
|
||||||
|
|
||||||
bool m_has_destination_zone = false;
|
bool m_has_destination_zone = false;
|
||||||
bool m_same_destination_zone = false;
|
bool m_same_destination_zone = false;
|
||||||
@@ -99,5 +102,6 @@ private:
|
|||||||
uint8 m_is_ldon_door;
|
uint8 m_is_ldon_door;
|
||||||
int m_dz_switch_id = 0;
|
int m_dz_switch_id = 0;
|
||||||
uint32 m_client_version_mask;
|
uint32 m_client_version_mask;
|
||||||
|
bool m_is_blacklisted_to_open = false; // is door blacklisted to open by npcs
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -8365,3 +8365,48 @@ uint32 Mob::GetMobTypeIdentifier()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mob::HandleDoorOpen()
|
||||||
|
{
|
||||||
|
for (auto e : entity_list.GetDoorsList()) {
|
||||||
|
Doors *d = e.second;
|
||||||
|
if (d->GetKeyItem()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (d->GetLockpick()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (d->IsDoorOpen()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (d->IsDoorBlacklisted()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the door is a trigger door, check if the trigger door is open
|
||||||
|
if (d->GetTriggerDoorID() > 0) {
|
||||||
|
auto td = entity_list.GetDoorsByDoorID(d->GetTriggerDoorID());
|
||||||
|
if (td) {
|
||||||
|
if (Strings::RemoveNumbers(d->GetDoorName()) != Strings::RemoveNumbers(td->GetDoorName())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d->GetDoorParam() > 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
float distance = DistanceSquared(m_Position, d->GetPosition());
|
||||||
|
float distance_scan_door_open = 20;
|
||||||
|
|
||||||
|
if (distance <= (distance_scan_door_open * distance_scan_door_open)) {
|
||||||
|
// Make sure we're opening a door within height relevance and not platforms above or below us
|
||||||
|
if (std::abs(m_Position.z - d->GetPosition().z) > 10) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
d->ForceOpen(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1866,6 +1866,7 @@ private:
|
|||||||
void SetHeroicWisBonuses(StatBonuses* n);
|
void SetHeroicWisBonuses(StatBonuses* n);
|
||||||
|
|
||||||
void DoSpellInterrupt(uint16 spell_id, int32 mana_cost, int my_curmana);
|
void DoSpellInterrupt(uint16 spell_id, int32 mana_cost, int my_curmana);
|
||||||
|
void HandleDoorOpen();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-46
@@ -981,52 +981,7 @@ void Mob::AI_Process() {
|
|||||||
|
|
||||||
if (moving && CanOpenDoors()) {
|
if (moving && CanOpenDoors()) {
|
||||||
if (AI_scan_door_open_timer->Check()) {
|
if (AI_scan_door_open_timer->Check()) {
|
||||||
auto &door_list = entity_list.GetDoorsList();
|
HandleDoorOpen();
|
||||||
for (auto itr : door_list) {
|
|
||||||
Doors *door = itr.second;
|
|
||||||
|
|
||||||
if (door->GetKeyItem()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (door->GetLockpick()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (door->IsDoorOpen()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (door->GetTriggerDoorID() > 0) {
|
|
||||||
auto trigger_door = entity_list.GetDoorsByDoorID(door->GetTriggerDoorID());
|
|
||||||
if (trigger_door) {
|
|
||||||
if (Strings::RemoveNumbers(door->GetDoorName()) !=
|
|
||||||
Strings::RemoveNumbers(trigger_door->GetDoorName())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (door->GetDoorParam() > 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
float distance = DistanceSquared(m_Position, door->GetPosition());
|
|
||||||
float distance_scan_door_open = 20;
|
|
||||||
|
|
||||||
if (distance <= (distance_scan_door_open * distance_scan_door_open)) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make sure we're opening a door within height relevance and not platforms
|
|
||||||
* above or below
|
|
||||||
*/
|
|
||||||
if (std::abs(m_Position.z - door->GetPosition().z) > 10) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
door->ForceOpen(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user