This is alot of small changes/new checks but it's all related to quests in some fashion or another so just posting it here.
Added: Max TS and Adv level prereqs to quests (self explanatory
)
Added: bool Player::CanReceiveQuest(), moved some checks from Player::CheckQuestFlag to this
I moved alot of the checks for quest flags into CanReceiveQuest so that we can just check for that value on individual quests without a ton of repetative code. CheckQuestFlag() still works exactly the same, I added the ability for Max level reqs and I also added a check so you can't be offered a quest you already have.
Added:Yellow name/category support for quests(right now this is set to happen if the zonename you're in matches the quest's zonename. can manually set it through the lua function SetQuestYellow[Quest* quest])
Added:vector<Spawn*> ZoneServer::GetSpawnsByID()
This just returns all of the spawns in a zone from the spawn_list with the spawn_id you give it.
Added: LUA functions RemoveSpawnIDAccess() and AddSpawnIDAccess()
These functions work just like AddSpawnAccess and remove spawn access, except for every spawn in a zone with the id you give. Their params are the same for syntax, RemoveSpawnIDAccess(Spawn* spawn, int32 spawn_id, [ZoneServer* zone]) the zone param is optional, if not set it will use the spawn's zone. The spawn is the spawn to grant/remove access to.
Added: LUA function: CanReceiveQuest(Spawn* player, int32 quest_id)
This runs a check with the function of the same name I mentioned earlier and returns a bool. The spawn must be a player for it to work. (Should make spawnscripts for quest NPCs alot simpler for quests with alot of requirements.)
Changed: PlayAnimation lua function and server function
I added 2 optional params to change the way PlayAnimation works, you can now use a player for the third param. If the third param is used the function checks for the forth param which is an int8. Using 1 for param 4 will only send the animation to the player, 2 sends it to all players in range except the player in param 3. Param 4 defaults to 1 if not set.
Will get all the LUA functions documented in the next day or two
