User Tag List

Page 2 of 2 FirstFirst 1 2
Results 8 to 12 of 12

Thread: NPC get units in range.

  1. #8
    Original Poster
    Member
    Join Date
    Jul 2016
    Posts
    15
    XP
    176
    Level
    2
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks again xP

    Have to say only recently changed to TrinityCore since I used to use arcemu back in the day when i was working on my project. But since that is dead I decided to change to TrinityCore. The compiling was perfect. No issues whatsoever. Installed the lua engine en now i finnaly can work on my long awaited project.
    This community is very helpfull i'll stay around on these forums.
    Just wanted to say that.

    PS: I'll have alot of questions while i'm working on the thing i'm working on.
    What is the suggested way on this forum.

    Create one help topic in the forum and ask questions in that one topic.
    Or for each question i might come up with start a new topic?
    Last edited by LordSeaworth; 07-20-2016 at 09:43 AM.
    Achievements:
    Member 7 days registered Level II

  2. #9
    Original Poster
    Member
    Join Date
    Jul 2016
    Posts
    15
    XP
    176
    Level
    2
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by slp13at420 View Post
    yea a global method like
    Code:
    unit = GetUnitByGUID(guid);
    would be handy from time to time but I havnt seen anything .. yet...
    Seems that method isn't found? I'm looking on http://eluna.emudevs.com/

  3. #10
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,860
    XP
    13,487
    Level
    35
    Thanks
    95
    Thanked 591 Times in 418 Posts
    There is no method to get a creature etc by database ID.
    You can only search by guid, which is a different number for creatures in instances and possibly in normal maps as well.
    However ingame if you have a creature spawned and get the creature's guid and then use that to search for it later, you should find it if it still exists in the world.

    http://eluna.emudevs.com/Object/GetGUID.html
    http://eluna.emudevs.com/Map/GetWorldObject.html
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  4. The Following User Says Thank You to Rochet2 For This Useful Post:


  5. #11
    Founder <span style='color: #FF4500'>Foereaper</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    926
    XP
    38,862
    Level
    60
    Thanks
    125
    Thanked 329 Times in 156 Posts
    Quote Originally Posted by slp13at420 View Post
    yea a global method like
    Code:
    unit = GetUnitByGUID(guid);
    would be handy from time to time but I havnt seen anything .. yet...
    Problem with this is object access safety, and you cannot be sure that the creature is actually loaded whenever you try to access it by its guid.

  6. The Following User Says Thank You to Foereaper For This Useful Post:


  7. #12
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,492
    XP
    20,134,792
    Level
    500
    Thanks
    1,089
    Thanked 330 Times in 212 Posts
    Quote Originally Posted by Foereaper View Post
    Problem with this is object access safety, and you cannot be sure that the creature is actually loaded whenever you try to access it by its guid.
    oh yea I totally agree . if the map isn't loaded you can have all sorts of problems trying to just spawn an npc or gob in an unloaded map let alone trying to call it or w/e lol

    - - - Updated - - -

    I learned that the hard way with my willow-the-wisp capture the flags . when it would spawn where a map wasn't loaded that's the reason for the spawned checks on them...
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •