Elin Decompiled Documentation EA 23.233 Nightly Patch 1
Loading...
Searching...
No Matches
Player.Flags Class Reference
Inheritance diagram for Player.Flags:
EClass

Public Member Functions

void OnCreateGame ()
 
void OnEnableDebug ()
 
void OnBuild (Recipe r)
 
bool IsStoryPlayed (int flag)
 
int GetStoryRowID (string idBook, string idStep)
 
Dictionary< string, string > GetStoryRow (string idBook, int id)
 
ExcelData GetStoryExcelData (string idBook)
 
bool PlayStory (string idBook, int id, bool fromBook=false)
 
bool PlayStory (int id, bool fromBook=false)
 
void AddStory (int id)
 
void OnEnterZone ()
 
void OnLeaveZone ()
 

Public Attributes

int[] ints = new int[50]
 
List< int > playedStories = new List<int>()
 
List< int > availableStories = new List<int>()
 
HashSet< int > pleaseDontTouch = new HashSet<int>()
 
List< string > reservedTutorial = new List<string>()
 
BitArray32 bits
 
Dictionary< string, ExcelDatastoryExcel = new Dictionary<string, ExcelData>()
 

Static Public Attributes

const int MonoDeparture = 100
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

bool gotClickReward [get, set]
 
bool welcome [get, set]
 
bool fiamaStoryBookGiven [get, set]
 
bool fiamaFirstDream [get, set]
 
bool helpHighlightDisabled [get, set]
 
bool pickedMelilithTreasure [get, set]
 
bool isShoesOff [get, set]
 
bool backpackHighlightDisabled [get, set]
 
bool abilityHighlightDisabled [get, set]
 
bool elinGift [get, set]
 
bool gotMelilithCurse [get, set]
 
bool canComupWithFoodRecipe [get, set]
 
bool KilledBossInVoid [get, set]
 
bool statueShipped [get, set]
 
bool little_saved [get, set]
 
bool little_killed [get, set]
 
bool gotEtherDisease [get, set]
 
bool loytelEscaped [get, set]
 
bool toggleHotbarHighlightDisabled [get, set]
 
bool debugEnabled [get, set]
 
bool magicChestSent [get, set]
 
bool toggleHotbarHighlightActivated [get, set]
 
bool gotJurePillow [get, set]
 
bool gotLoytelMart [get, set]
 
bool killedDuponne [get, set]
 
int santa [get, set]
 
int start [get, set]
 
int build [get, set]
 
int main [get, set]
 
int storyFiama [get, set]
 
int lutz [get, set]
 
int daysAfterQuestExploration [get, set]
 
int landDeedBought [get, set]
 
int loytelMartLv [get, set]
 
int reward_gould [get, set]
 
int reward_killkill [get, set]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void _OnSerializing (StreamingContext context)
 
void _OnDeserialized (StreamingContext context)
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Detailed Description

Definition at line 251 of file Player.cs.

Member Function Documentation

◆ _OnDeserialized()

void Player.Flags._OnDeserialized ( StreamingContext  context)
inlineprivate

Definition at line 713 of file Player.cs.

714 {
715 bits.Bits = (uint)ints[0];
716 }
int[] ints
Definition: Player.cs:256

References Player.Flags.ints.

◆ _OnSerializing()

void Player.Flags._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 707 of file Player.cs.

708 {
709 ints[0] = (int)bits.Bits;
710 }
BitArray32 bits
Definition: Player.cs:270
uint Bits
Definition: BitArray32.cs:6

References Player.Flags.bits, BitArray32.Bits, and Player.Flags.ints.

◆ AddStory()

void Player.Flags.AddStory ( int  id)
inline

Definition at line 798 of file Player.cs.

799 {
800 if (!playedStories.Contains(id) && !availableStories.Contains(id))
801 {
802 availableStories.Add(id);
803 Msg.Say("story_added");
804 SE.WriteJournal();
805 }
806 }
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< int > availableStories
Definition: Player.cs:262
List< int > playedStories
Definition: Player.cs:259

References Player.Flags.availableStories, Player.Flags.playedStories, and Msg.Say().

Referenced by Player.Flags.OnEnterZone().

◆ GetStoryExcelData()

ExcelData Player.Flags.GetStoryExcelData ( string  idBook)
inline

Definition at line 763 of file Player.cs.

764 {
765 ExcelData excelData = storyExcel.TryGetValue(idBook);
766 if (excelData == null)
767 {
768 excelData = new ExcelData();
769 excelData.path = CorePath.DramaData + idBook + ".xlsx";
770 excelData.BuildList("index");
771 storyExcel.Add(idBook, excelData);
772 }
773 return excelData;
774 }
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Dictionary< string, ExcelData > storyExcel
Definition: Player.cs:272

References ExcelData.BuildList(), and Player.Flags.storyExcel.

Referenced by Player.Flags.GetStoryRow(), and Player.Flags.GetStoryRowID().

◆ GetStoryRow()

Dictionary< string, string > Player.Flags.GetStoryRow ( string  idBook,
int  id 
)
inline

Definition at line 751 of file Player.cs.

752 {
753 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
754 {
755 if (item["id"].ToInt() == id)
756 {
757 return item;
758 }
759 }
760 return null;
761 }
ExcelData GetStoryExcelData(string idBook)
Definition: Player.cs:763

References Player.Flags.GetStoryExcelData(), and item.

Referenced by Player.Flags.PlayStory().

◆ GetStoryRowID()

int Player.Flags.GetStoryRowID ( string  idBook,
string  idStep 
)
inline

Definition at line 739 of file Player.cs.

740 {
741 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
742 {
743 if (item["step"] == idStep)
744 {
745 return item["id"].ToInt();
746 }
747 }
748 return 0;
749 }

References Player.Flags.GetStoryExcelData(), and item.

Referenced by Tutorial.Play(), Tutorial.Remove(), and Tutorial.Reserve().

◆ IsStoryPlayed()

bool Player.Flags.IsStoryPlayed ( int  flag)
inline

Definition at line 734 of file Player.cs.

735 {
736 return playedStories.Contains(flag);
737 }

References Player.Flags.playedStories.

Referenced by TraitStoryBook.OnRead().

◆ OnBuild()

void Player.Flags.OnBuild ( Recipe  r)
inline

Definition at line 726 of file Player.cs.

727 {
728 if (build == 0 && r.id == "workbench")
729 {
730 build = 1;
731 }
732 }
int build
Definition: Player.cs:599
string id
Definition: Recipe.cs:179

References Player.Flags.build, and Recipe.id.

Referenced by TaskBuild.OnProgressComplete().

◆ OnCreateGame()

void Player.Flags.OnCreateGame ( )
inline

Definition at line 718 of file Player.cs.

719 {
720 }

Referenced by Player.OnCreateGame().

◆ OnEnableDebug()

void Player.Flags.OnEnableDebug ( )
inline

Definition at line 722 of file Player.cs.

723 {
724 }

Referenced by CoreDebug.EnableDebugResource(), and CoreDebug.QuickStart().

◆ OnEnterZone()

void Player.Flags.OnEnterZone ( )
inline

Definition at line 808 of file Player.cs.

809 {
810 if (EClass._zone.id == "nymelle")
811 {
812 if (EClass._zone.lv == -1)
813 {
814 AddStory(10);
815 }
816 if (EClass._zone.lv == -2)
817 {
818 AddStory(20);
819 }
820 if (EClass._zone.lv == -3)
821 {
822 AddStory(30);
823 }
824 }
825 if (QuestMain.Phase == 700 && EClass._zone.id == "lothria")
826 {
827 PlayStory(50);
828 }
830 {
832 availableStories.RemoveAt(0);
833 }
835 {
836 if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 0 && EClass.game.quests.GetPhase<QuestNegotiationDarkness>() == 5)
837 {
839 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
840 }
841 else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 1)
842 {
843 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
844 }
845 else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 2)
846 {
847 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
848 }
849 else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 3)
850 {
851 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
852 }
853 }
854 }
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
bool isLoading
Definition: Game.cs:241
Prologue Prologue
Definition: Game.cs:263
QuestManager quests
Definition: Game.cs:182
static LayerDrama Instance
Definition: LayerDrama.cs:20
bool PlayStory(string idBook, int id, bool fromBook=false)
Definition: Player.cs:776
void AddStory(int id)
Definition: Player.cs:798
string idStartZone
Definition: Prologue.cs:9
static int Phase
Definition: QuestMain.cs:23
Quest Get(string id)
int lv
Definition: Spatial.cs:142
string id
Definition: Spatial.cs:13
bool IsPCFaction
Definition: Zone.cs:470

References EClass._zone, Player.Flags.AddStory(), Player.Flags.availableStories, EClass.game, QuestManager.Get(), Spatial.id, Prologue.idStartZone, LayerDrama.Instance, Game.isLoading, Zone.IsPCFaction, Spatial.lv, QuestMain.Phase, Player.Flags.PlayStory(), Game.Prologue, and Game.quests.

Referenced by Scene.Init().

◆ OnLeaveZone()

void Player.Flags.OnLeaveZone ( )
inline

Definition at line 856 of file Player.cs.

857 {
859 {
860 PlayStory(40);
861 }
862 }
static Player player
Definition: EClass.cs:12
bool simulatingZone
Definition: Player.cs:1179

References QuestMain.Phase, EClass.player, Player.Flags.PlayStory(), and Player.simulatingZone.

Referenced by Scene.OnUpdate().

◆ PlayStory() [1/2]

bool Player.Flags.PlayStory ( int  id,
bool  fromBook = false 
)
inline

Definition at line 793 of file Player.cs.

794 {
795 return PlayStory("_main", id, fromBook);
796 }

References Player.Flags.PlayStory().

◆ PlayStory() [2/2]

bool Player.Flags.PlayStory ( string  idBook,
int  id,
bool  fromBook = false 
)
inline

Definition at line 776 of file Player.cs.

777 {
778 if (!fromBook && playedStories.Contains(id))
779 {
780 return false;
781 }
782 Dictionary<string, string> storyRow = GetStoryRow(idBook, id);
783 SoundManager.ForceBGM();
784 LayerDrama.fromBook = fromBook;
785 LayerDrama.Activate(idBook, storyRow["sheet"], storyRow["step"]);
786 if (!fromBook && !playedStories.Contains(id))
787 {
788 playedStories.Add(id);
789 }
790 return true;
791 }
static LayerDrama Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:66
Dictionary< string, string > GetStoryRow(string idBook, int id)
Definition: Player.cs:751

References LayerDrama.Activate(), Player.Flags.GetStoryRow(), and Player.Flags.playedStories.

Referenced by Player.Flags.OnEnterZone(), Player.Flags.OnLeaveZone(), TraitStoryBook.OnRead(), Tutorial.Play(), and Player.Flags.PlayStory().

Member Data Documentation

◆ availableStories

List<int> Player.Flags.availableStories = new List<int>()

Definition at line 262 of file Player.cs.

Referenced by Player.Flags.AddStory(), and Player.Flags.OnEnterZone().

◆ bits

BitArray32 Player.Flags.bits

Definition at line 270 of file Player.cs.

Referenced by Player.Flags._OnSerializing().

◆ ints

int [] Player.Flags.ints = new int[50]

Definition at line 256 of file Player.cs.

Referenced by Player.Flags._OnDeserialized(), and Player.Flags._OnSerializing().

◆ MonoDeparture

const int Player.Flags.MonoDeparture = 100
static

Definition at line 253 of file Player.cs.

◆ playedStories

List<int> Player.Flags.playedStories = new List<int>()

◆ pleaseDontTouch

HashSet<int> Player.Flags.pleaseDontTouch = new HashSet<int>()

Definition at line 265 of file Player.cs.

◆ reservedTutorial

List<string> Player.Flags.reservedTutorial = new List<string>()

Definition at line 268 of file Player.cs.

Referenced by Tutorial.Reserve(), and Tutorial.TryPlayReserve().

◆ storyExcel

Dictionary<string, ExcelData> Player.Flags.storyExcel = new Dictionary<string, ExcelData>()

Definition at line 272 of file Player.cs.

Referenced by Player.Flags.GetStoryExcelData().

Property Documentation

◆ abilityHighlightDisabled

bool Player.Flags.abilityHighlightDisabled
getset

Definition at line 370 of file Player.cs.

371 {
372 get
373 {
374 return bits[9];
375 }
376 set
377 {
378 bits[9] = value;
379 }
380 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ backpackHighlightDisabled

bool Player.Flags.backpackHighlightDisabled
getset

Definition at line 358 of file Player.cs.

359 {
360 get
361 {
362 return bits[8];
363 }
364 set
365 {
366 bits[8] = value;
367 }
368 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ build

int Player.Flags.build
getset

Definition at line 598 of file Player.cs.

599 {
600 get
601 {
602 return ints[11];
603 }
604 set
605 {
606 ints[11] = value;
607 }
608 }

Referenced by Player.Flags.OnBuild().

◆ canComupWithFoodRecipe

bool Player.Flags.canComupWithFoodRecipe
getset

Definition at line 406 of file Player.cs.

407 {
408 get
409 {
410 return bits[12];
411 }
412 set
413 {
414 bits[12] = value;
415 }
416 }

Referenced by RecipeCard.Craft().

◆ daysAfterQuestExploration

int Player.Flags.daysAfterQuestExploration
getset

Definition at line 646 of file Player.cs.

647 {
648 get
649 {
650 return ints[16];
651 }
652 set
653 {
654 ints[16] = value;
655 }
656 }

Referenced by GameDate.AdvanceDay().

◆ debugEnabled

bool Player.Flags.debugEnabled
getset

Definition at line 502 of file Player.cs.

503 {
504 get
505 {
506 return bits[20];
507 }
508 set
509 {
510 bits[20] = value;
511 }
512 }

Referenced by UI.ToggleFeedback().

◆ elinGift

bool Player.Flags.elinGift
getset

Definition at line 382 of file Player.cs.

383 {
384 get
385 {
386 return bits[10];
387 }
388 set
389 {
390 bits[10] = value;
391 }
392 }

Referenced by FactionBranch.ReceivePackages().

◆ fiamaFirstDream

bool Player.Flags.fiamaFirstDream
getset

Definition at line 310 of file Player.cs.

311 {
312 get
313 {
314 return bits[4];
315 }
316 set
317 {
318 bits[4] = value;
319 }
320 }

Referenced by Chara.ShowDialog().

◆ fiamaStoryBookGiven

bool Player.Flags.fiamaStoryBookGiven
getset

Definition at line 298 of file Player.cs.

299 {
300 get
301 {
302 return bits[3];
303 }
304 set
305 {
306 bits[3] = value;
307 }
308 }

Referenced by Chara.ShowDialog().

◆ gotClickReward

bool Player.Flags.gotClickReward
getset

Definition at line 274 of file Player.cs.

275 {
276 get
277 {
278 return bits[1];
279 }
280 set
281 {
282 bits[1] = value;
283 }
284 }

◆ gotEtherDisease

bool Player.Flags.gotEtherDisease
getset

Definition at line 466 of file Player.cs.

467 {
468 get
469 {
470 return bits[17];
471 }
472 set
473 {
474 bits[17] = value;
475 }
476 }

Referenced by Chara.MutateRandom().

◆ gotJurePillow

bool Player.Flags.gotJurePillow
getset

Definition at line 538 of file Player.cs.

539 {
540 get
541 {
542 return bits[30];
543 }
544 set
545 {
546 bits[30] = value;
547 }
548 }

Referenced by DramaOutcome.convert_Jure().

◆ gotLoytelMart

bool Player.Flags.gotLoytelMart
getset

Definition at line 550 of file Player.cs.

551 {
552 get
553 {
554 return bits[31];
555 }
556 set
557 {
558 bits[31] = value;
559 }
560 }

Referenced by QuestDebt.GiveReward().

◆ gotMelilithCurse

bool Player.Flags.gotMelilithCurse
getset

Definition at line 394 of file Player.cs.

395 {
396 get
397 {
398 return bits[11];
399 }
400 set
401 {
402 bits[11] = value;
403 }
404 }

◆ helpHighlightDisabled

bool Player.Flags.helpHighlightDisabled
getset

Definition at line 322 of file Player.cs.

323 {
324 get
325 {
326 return bits[5];
327 }
328 set
329 {
330 bits[5] = value;
331 }
332 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ isShoesOff

bool Player.Flags.isShoesOff
getset

Definition at line 346 of file Player.cs.

347 {
348 get
349 {
350 return bits[7];
351 }
352 set
353 {
354 bits[7] = value;
355 }
356 }

Referenced by Chara._Move().

◆ KilledBossInVoid

bool Player.Flags.KilledBossInVoid
getset

Definition at line 418 of file Player.cs.

419 {
420 get
421 {
422 return bits[13];
423 }
424 set
425 {
426 bits[13] = value;
427 }
428 }

Referenced by Chara.TryDropBossLoot().

◆ killedDuponne

bool Player.Flags.killedDuponne
getset

Definition at line 562 of file Player.cs.

563 {
564 get
565 {
566 return bits[32];
567 }
568 set
569 {
570 bits[32] = value;
571 }
572 }

◆ landDeedBought

int Player.Flags.landDeedBought
getset

Definition at line 658 of file Player.cs.

659 {
660 get
661 {
662 return ints[17];
663 }
664 set
665 {
666 ints[17] = value;
667 }
668 }

Referenced by Card.GetPrice().

◆ little_killed

bool Player.Flags.little_killed
getset

Definition at line 454 of file Player.cs.

455 {
456 get
457 {
458 return bits[16];
459 }
460 set
461 {
462 bits[16] = value;
463 }
464 }

Referenced by Chara.ShowDialog().

◆ little_saved

bool Player.Flags.little_saved
getset

Definition at line 442 of file Player.cs.

443 {
444 get
445 {
446 return bits[15];
447 }
448 set
449 {
450 bits[15] = value;
451 }
452 }

Referenced by Chara.ShowDialog().

◆ loytelEscaped

bool Player.Flags.loytelEscaped
getset

Definition at line 478 of file Player.cs.

479 {
480 get
481 {
482 return bits[18];
483 }
484 set
485 {
486 bits[18] = value;
487 }
488 }

Referenced by Chara.ShowDialog().

◆ loytelMartLv

int Player.Flags.loytelMartLv
getset

Definition at line 670 of file Player.cs.

671 {
672 get
673 {
674 return ints[18];
675 }
676 set
677 {
678 ints[18] = value;
679 }
680 }

Referenced by Trait.CreateStock(), Trait.OnBarter(), and CoreDebug.UpdateInput().

◆ lutz

int Player.Flags.lutz
getset

Definition at line 634 of file Player.cs.

635 {
636 get
637 {
638 return ints[15];
639 }
640 set
641 {
642 ints[15] = value;
643 }
644 }

Referenced by GameDate.ShipLetter().

◆ magicChestSent

bool Player.Flags.magicChestSent
getset

Definition at line 514 of file Player.cs.

515 {
516 get
517 {
518 return bits[21];
519 }
520 set
521 {
522 bits[21] = value;
523 }
524 }

Referenced by GameDate.AdvanceDay().

◆ main

int Player.Flags.main
getset

Definition at line 610 of file Player.cs.

611 {
612 get
613 {
614 return ints[13];
615 }
616 set
617 {
618 ints[13] = value;
619 }
620 }

◆ pickedMelilithTreasure

bool Player.Flags.pickedMelilithTreasure
getset

Definition at line 334 of file Player.cs.

335 {
336 get
337 {
338 return bits[6];
339 }
340 set
341 {
342 bits[6] = value;
343 }
344 }

◆ reward_gould

int Player.Flags.reward_gould
getset

Definition at line 682 of file Player.cs.

683 {
684 get
685 {
686 return ints[19];
687 }
688 set
689 {
690 ints[19] = value;
691 }
692 }

Referenced by AI_PlayMusic.ThrowReward().

◆ reward_killkill

int Player.Flags.reward_killkill
getset

Definition at line 694 of file Player.cs.

695 {
696 get
697 {
698 return ints[20];
699 }
700 set
701 {
702 ints[20] = value;
703 }
704 }

Referenced by AI_PlayMusic.ThrowReward().

◆ santa

int Player.Flags.santa
getset

Definition at line 574 of file Player.cs.

575 {
576 get
577 {
578 return ints[9];
579 }
580 set
581 {
582 ints[9] = value;
583 }
584 }

◆ start

int Player.Flags.start
getset

Definition at line 586 of file Player.cs.

587 {
588 get
589 {
590 return ints[10];
591 }
592 set
593 {
594 ints[10] = value;
595 }
596 }

◆ statueShipped

bool Player.Flags.statueShipped
getset

Definition at line 430 of file Player.cs.

431 {
432 get
433 {
434 return bits[14];
435 }
436 set
437 {
438 bits[14] = value;
439 }
440 }

Referenced by GameDate.ShipRandomPackages().

◆ storyFiama

int Player.Flags.storyFiama
getset

Definition at line 622 of file Player.cs.

623 {
624 get
625 {
626 return ints[14];
627 }
628 set
629 {
630 ints[14] = value;
631 }
632 }

Referenced by Chara.ShowDialog().

◆ toggleHotbarHighlightActivated

bool Player.Flags.toggleHotbarHighlightActivated
getset

Definition at line 526 of file Player.cs.

527 {
528 get
529 {
530 return bits[22];
531 }
532 set
533 {
534 bits[22] = value;
535 }
536 }

Referenced by InvOwnerHotbar.OnProcess().

◆ toggleHotbarHighlightDisabled

bool Player.Flags.toggleHotbarHighlightDisabled
getset

Definition at line 490 of file Player.cs.

491 {
492 get
493 {
494 return bits[19];
495 }
496 set
497 {
498 bits[19] = value;
499 }
500 }

Referenced by WidgetCurrentTool.OnActivate().

◆ welcome

bool Player.Flags.welcome
getset

Definition at line 286 of file Player.cs.

287 {
288 get
289 {
290 return bits[2];
291 }
292 set
293 {
294 bits[2] = value;
295 }
296 }

The documentation for this class was generated from the following file: