View Single Post
11/23/14, 05:03 AM   #1
klaro00
 
klaro00's Avatar
Join Date: Apr 2014
Posts: 31
How to determine PvE/PvP

Hi,

if I wanted to find out wether I am in a PvP or in a PvE zone (or, to be more precise: wether all NPCs, mobs and players ar on level 50 or not), what would be the safest way? The following method seems to do what I need.

Lua Code:
  1. local function isInPVEZone()
  2.     return (GetMapContentType() ~= MAP_CONTENT_AVA)
  3. end
  4.  
  5. local function isInPVPZone()
  6.     return (GetMapContentType() == MAP_CONTENT_AVA)
  7. end

I just like to know if this code works under all circumstances. Is it the correct approach to investigate the result of "GetMapContentType()"? Maybe there is another, better, safer way to find out if I am currently in PvP or PvE? Can someone confirm that this way of testing for PvP/PvE is correct?

// Klaro

Last edited by klaro00 : 11/23/14 at 05:05 AM. Reason: typo
  Reply With Quote