18 #ifndef OREGONCORE_GAMEOBJECT_H 19 #define OREGONCORE_GAMEOBJECT_H 376 default:
return false;
397 autoCloseTime =
door.autoCloseTime;
400 autoCloseTime =
button.autoCloseTime;
403 autoCloseTime =
trap.autoCloseTime;
406 autoCloseTime =
goober.autoCloseTime;
417 return autoCloseTime / 0x10000;
466 return door.noDamageImmune;
468 return button.noDamageImmune;
472 return goober.noDamageImmune;
487 return chest.linkedTrapId;
491 return goober.linkedTrapId;
518 default:
return false;
529 #if defined( __GNUC__ ) 549 #define MAX_GO_STATE 3 594 #define FISHING_BOBBER_READY_TIME 5 602 void AddToWorld()
override;
603 void RemoveFromWorld()
override;
604 void CleanupsBeforeDelete()
override;
606 bool Create(
uint32 guidlow,
uint32 name_id,
Map* map,
uint32 phaseMask,
float x,
float y,
float z,
float ang,
float rotation0,
float rotation1,
float rotation2,
float rotation3,
uint32 animprogress,
GOState go_state,
uint32 ArtKit = 0);
607 void Update(
uint32 diff)
override;
618 void SetGoState(
GOState state);
619 void SetPhaseMask(
uint32 newPhaseMask,
bool update)
override;
620 void EnableCollision(
bool enable);
622 bool IsTransport()
const;
626 return m_DBTableGuid;
629 void UpdateRotationFields(
float rotation2 = 0.0f,
float rotation3 = 0.0f);
633 MonsterSay(text, language, TargetGuid);
637 MonsterYell(text, language, TargetGuid);
641 MonsterTextEmote(text, TargetGuid);
645 MonsterWhisper(text, receiver);
649 MonsterSay(textId, language, TargetGuid);
653 MonsterYell(textId, language, TargetGuid);
657 MonsterTextEmote(textId, TargetGuid);
661 MonsterWhisper(textId, receiver);
665 const char* GetNameForLocaleIdx(
int32 locale_idx)
const override;
670 bool LoadGameObjectFromDB(
uint32 guid,
Map* map,
bool addToMap =
true);
676 if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
678 m_spawnedByDefault =
false;
685 Unit* GetOwner()
const;
689 m_spawnedByDefault =
false;
699 return m_respawnTime;
703 time_t now = time(NULL);
704 if (m_respawnTime > now)
705 return m_respawnTime;
712 m_respawnTime = respawn > 0 ? time(NULL) + respawn : 0;
713 m_respawnDelayTime = respawn > 0 ? respawn : 0;
718 return m_respawnDelayTime == 0 ||
719 (m_respawnTime > 0 && !m_spawnedByDefault) ||
720 (m_respawnTime == 0 && m_spawnedByDefault);
724 return m_spawnedByDefault;
728 m_spawnedByDefault = b;
732 return m_respawnDelayTime;
736 void getFishLoot(
Loot* loot,
Player* loot_owner);
753 void SetGoArtKit(
uint32 artkit);
763 void Use(
Unit* user);
773 m_SkillupList.push_back(PlayerGuidLow);
777 for (std::list<uint32>::const_iterator i = m_SkillupList.begin(); i != m_SkillupList.end(); ++i)
778 if (*i == PlayerGuidLow)
return true;
783 m_SkillupList.clear();
786 void AddUniqueUse(
Player* player);
798 return m_unique_users.size();
803 return m_unique_users.find(guid) != m_unique_users.end();
806 void SaveRespawnTime()
override;
810 bool hasQuest(
uint32 quest_id)
const override;
811 bool hasInvolvedQuest(
uint32 quest_id)
const override;
812 bool ActivateToQuest(
Player* pTarget)
const;
813 void UseDoorOrButton(
uint32 time_to_restore = 0,
bool alternative =
false,
Unit* user = NULL);
815 void ResetDoorOrButton();
817 void Animate(
uint32 anim = 0);
824 return GetGOInfo()->trap.cooldown;
826 return GetGOInfo()->goober.cooldown;
832 void TriggeringLinkedGameObject(
uint32 trapEntry,
Unit* target);
834 bool IsNeverVisible()
const override;
836 bool IsAlwaysVisibleFor(
WorldObject const* seer)
const override;
837 bool IsInvisibleDueToDespawn()
const override;
841 if (
Unit* owner = GetOwner())
842 return owner->getLevelForTarget(target);
850 float GetInteractionDistance()
const;
852 void UpdateModelPosition();
853 GameObject* LookupFishingHoleAround(
float range);
861 bool AIM_Initialize();
878 void SetDisplayId(
uint32 displayid);
882 void SwitchDoorOrButton(
bool activate,
bool alternative =
false);
uint32 GetLinkedGameObjectEntry() const
struct GameObjectInfo::@59::@80 meetingstone
struct GameObjectInfo::@59::@69 text
uint32 GetCooldown() const
struct GameObjectInfo::@59::@73 camera
struct GameObjectInfo::@59::@66 trap
GameObjectAI * AI() const
GameObjectInfo const * m_goInfo
struct GameObjectInfo::@59::@86 auraGenerator
struct GameObjectInfo::@59::@76 summoningRitual
bool IsLargeGameObject() const
struct GameObjectInfo::@59::@71 transport
GOState GetGoState() const
LootState getLootState() const
void Say(int32 textId, uint32 language, uint64 TargetGuid)
uint32 m_respawnDelayTime
struct GameObjectInfo::@59::@77 auctionhouse
GameObjectData const * GetGOData() const
struct GameObjectInfo::@59::@83 flagdrop
void SetGoType(GameobjectTypes type)
time_t GetRespawnTime() const
struct GameObjectInfo::@59::@64 chest
uint64 GetOwnerGUID() const
struct GameObjectInfo::@59::@63 questgiver
struct GameObjectInfo::@59::@74 moTransport
std::vector< std::string > CastBarCaption
time_t GetRespawnTimeEx() const
bool IsUsedBy(uint64 guid)
struct GameObjectInfo::@59::@65 _generic
struct GameObjectInfo::@59::@88 doNotUseYet
uint32 GetGoArtKit() const
void SetRespawnTime(int32 respawn)
bool IsDespawnAtAction() const
uint8 getLevelForTarget(WorldObject const *target) const override
struct GameObjectInfo::@59::@75 fishnode
GameObjectData const * m_goData
bool LoadFromDB(uint32 guid, Map *map)
void TextEmote(const char *text, uint64 TargetGuid)
struct GameObjectInfo::@59::@89 destructibleBuilding
struct GameObjectInfo::@59::@62 button
uint32 GetRespawnDelay() const
uint32 GetGoAnimProgress() const
struct GameObjectInfo::@59::@85 capturePoint
struct GameObjectInfo::@59::@87 dungeonDifficulty
GameObjectModel * m_model
struct GameObjectInfo::@59::@81 flagstand
void TextEmote(int32 textId, uint64 TargetGuid)
uint32 GetCharges() const
struct GameObjectInfo::@59::@72 areadamage
void SetSpawnedByDefault(bool b)
Transport const * ToTransport() const
uint32 casterTargetSpellTargets
Transport * ToTransport()
void Whisper(int32 textId, uint64 receiver)
void Whisper(const char *text, uint64 receiver)
uint32 GetAutoCloseTime() const
struct GameObjectInfo::@59::@82 fishinghole
uint32 ritualNoTargetCheck
void SetGoAnimProgress(uint32 animprogress)
std::string GetAIName() const
std::set< uint64 > m_unique_users
void Yell(int32 textId, uint32 language, uint64 TargetGuid)
struct GameObjectInfo::@59::@68 spellFocus
GameobjectTypes GetGoType() const
void SetOwnerGUID(uint64 owner)
uint32 GetGossipMenuId() const
void Yell(const char *text, uint32 language, uint64 TargetGuid)
GameObjectInfo const * GetGOInfo() const
void SetSpellId(uint32 id)
void AddToSkillupList(uint32 PlayerGuidLow)
struct GameObjectInfo::@59::@79 spellcaster
std::list< uint32 > m_SkillupList
uint32 GetUniqueUseCount() const
uint32 GetSpellId() const
uint32 GetDBTableGUIDLow() const
void Say(const char *text, uint32 language, uint64 TargetGuid)
struct GameObjectInfo::@59::@90 raw
bool isSpawnedByDefault() const
struct GameObjectInfo::@59::@70 goober
bool GetDespawnPossibility() const
std::vector< std::string > Name
bool IsInSkillupList(uint32 PlayerGuidLow) const
struct GameObjectInfo::@59::@67 chair
struct GameObjectInfo::@59::@78 guardpost
struct GameObjectInfo::@59::@84 miniGame
struct GameObjectInfo::@59::@61 door
uint32 GetUseCount() const