mirror of
https://github.com/araxiaonline/mod-guildhouse.git
synced 2026-06-13 02:52:21 -04:00
Set Guild House as rested area (#32)
* Set the guild house to be a resting area. * Fixed so that the call is on the player object. * Updated to test fix for rested on GM teleport out of guild house. * Updated return type. * Removed test message. * Updated to clear compiler warning about unused variables. * Updated README.
This commit is contained in:
@@ -17,11 +17,11 @@ All guilds will get their own phasing system and then the guild master can purch
|
||||
* Class Trainers (all available in Wrath)
|
||||
* Primary Profession Trainers (all available in Wrath)
|
||||
* Secondary Profession Trainers (all available in Wrath)
|
||||
* Vendors: Reagents Vendor, Food & Water, Trade Goods, and Repairs/Ammo Vendor
|
||||
* Vendors: Reagents Vendor, Food & Drink, Trade Goods, Ammo & Repair Vendor, and Poisons Vendor
|
||||
* Portals to Neutral, Horde and Alliance cities
|
||||
* Spirit Healer
|
||||
* Guild Bank and Personal Bank access
|
||||
* Auctioneer
|
||||
* Auctioneer/Neutral Auctioneer
|
||||
* Stable Master
|
||||
|
||||
## How to use ingame
|
||||
@@ -42,7 +42,7 @@ All guilds will get their own phasing system and then the guild master can purch
|
||||
|
||||
## Edit module configuration (optional)
|
||||
|
||||
If you need to change the module configuration, go to your server configuration folder (where your `worldserver` or `worldserver.exe` is), copy `mod_guild_house_v2.conf.dist` to `mod_guild_house_v2.conf` and edit that new file.
|
||||
If you need to change the module configuration, go to your server configuration folder (where your `worldserver` or `worldserver.exe` is), copy `mod_guildhouse.conf.dist` to `mod_guildhouse.conf` and edit that new file.
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
@@ -524,6 +524,25 @@ public:
|
||||
player->SetPhaseMask(GetNormalPhase(player), true);
|
||||
}
|
||||
|
||||
bool OnBeforeTeleport(Player *player, uint32 mapid, float x, float y, float z, float orientation, uint32 options, Unit *target)
|
||||
{
|
||||
(void)mapid;
|
||||
(void)x;
|
||||
(void)y;
|
||||
(void)z;
|
||||
(void)orientation;
|
||||
(void)options;
|
||||
(void)target;
|
||||
|
||||
if (player->GetZoneId() == 876 && player->GetAreaId() == 876) // GM Island
|
||||
{
|
||||
// Remove the rested state when teleporting from the guild house
|
||||
player->RemoveRestState();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 GetNormalPhase(Player *player) const
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
@@ -561,6 +580,9 @@ public:
|
||||
|
||||
if (player->GetZoneId() == 876 && player->GetAreaId() == 876) // GM Island
|
||||
{
|
||||
// Set the guild house as a rested area
|
||||
player->SetRestState(0);
|
||||
|
||||
// If player is not in a guild he doesnt have a guild house teleport away
|
||||
// TODO: What if they are in a guild, but somehow are in the wrong phaseMask and seeing someone else's area?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user