users: Remove the setid property. Sets are fully handled by the zone now.
This commit is contained in:
parent
ad7071a61b
commit
e7246271ad
@ -74,8 +74,7 @@
|
||||
prev_area = {0, 0, 0} :: area(),
|
||||
prev_entryid = 0 :: entryid(),
|
||||
%% To be moved or deleted later on.
|
||||
instancepid :: pid(),
|
||||
setid = 0 :: non_neg_integer() %% @todo Current area's set number. Move that handling to the proper zone module later.
|
||||
instancepid :: pid()
|
||||
}).
|
||||
|
||||
%% Past this point needs to be reviewed.
|
||||
|
@ -448,7 +448,7 @@ event(mission_abort, State=#state{gid=GID}) ->
|
||||
Character = User#users.character,
|
||||
MaxHP = Character#characters.maxhp,
|
||||
NewCharacter = Character#characters{currenthp=MaxHP},
|
||||
NewUser = User#users{character=NewCharacter, setid=0, instancepid=undefined},
|
||||
NewUser = User#users{character=NewCharacter, instancepid=undefined},
|
||||
egs_users:write(NewUser),
|
||||
%% map change
|
||||
if User#users.areatype =:= mission ->
|
||||
|
@ -50,7 +50,6 @@ area_load(QuestID, ZoneID, MapID, EntryID, State) ->
|
||||
ZoneChange = if OldQuestID =:= QuestID, OldZoneID =:= ZoneID -> false; true -> true end,
|
||||
AreaType = egs_quests_db:area_type(QuestID, ZoneID),
|
||||
AreaShortName = "dammy", %% @todo Load the short name from egs_quests_db.
|
||||
SetID = 0, %% @todo Handle multiple sets properly.
|
||||
{IsSeasonal, SeasonID} = egs_seasons:read(QuestID),
|
||||
User = OldUser#users{areatype=AreaType, area={QuestID, ZoneID, MapID}, entryid=EntryID},
|
||||
egs_users:write(User), %% @todo Booh ugly! But temporary.
|
||||
@ -70,7 +69,7 @@ area_load(QuestID, ZoneID, MapID, EntryID, State) ->
|
||||
psu_proto:send_0111(User2#users{lid=0}, 6, State),
|
||||
psu_proto:send_010d(User2#users{lid=0}, State),
|
||||
psu_proto:send_0200(ZoneID, AreaType, State),
|
||||
psu_proto:send_020f(ZoneData, SetID, SeasonID, State),
|
||||
psu_proto:send_020f(ZoneData, egs_zones:setid(ZonePid), SeasonID, State),
|
||||
User2#users{zonepid=ZonePid};
|
||||
true -> User2
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user