本文整理汇总了Python中Plasma.ptVaultChronicleNode方法的典型用法代码示例。如果您正苦于以下问题:Python Plasma.ptVaultChronicleNode方法的具体用法?Python Plasma.ptVaultChronicleNode怎么用?Python Plasma.ptVaultChronicleNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plasma
的用法示例。
在下文中一共展示了Plasma.ptVaultChronicleNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GenerateCleftSolution
# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
def GenerateCleftSolution(args):
import Plasma
import xRandom
solutionlist = [3,2,5,0]
cleftSolList = [3,2,5,0]
while _AreListsEquiv(solutionlist, cleftSolList):
solutionlist = []
while len(solutionlist) < 4:
newint = xRandom.randint(0,6)
if not newint in solutionlist:
solutionlist.append(newint)
vault = Plasma.ptVault()
entry = vault.findChronicleEntry("BahroCave")
entry.removeAllNodes()
if entry != None:
agelist = ["Teledahn", "Garrison", "Garden", "Kadish"]
for v in range(len(agelist)):
newnode = Plasma.ptVaultChronicleNode(0)
newnode.chronicleSetName(agelist[v])
ageVal = str(solutionlist[v])
newnode.chronicleSetValue("1," + ageVal + "," + str(v + 1))
#newnode.chronicleSetValue("1," + str(solutionlist[v]) + "," + str(v + 1))
entry.addNode(newnode)
print "%s solution is %s" % (agelist[v], ageVal)
示例2: GetAgeJourneyCloths
# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
def GetAgeJourneyCloths(args):
import Plasma
ageChronNode = None
ageName = Plasma.PtGetAgeName()
if ageName == "Gira" or ageName == "Garden":
ageName = "Eder"
elif ageName == "Teledahn" or ageName == "Garrison" or ageName == "Kadish" or ageName == "Cleft":
pass
else:
return
vault = Plasma.ptVault()
chron = vault.findChronicleEntry("JourneyClothProgress")
ageChronRefList = chron.getChildNodeRefList()
for ageChron in ageChronRefList:
ageChild = ageChron.getChild()
ageChild = ageChild.upcastToChronicleNode()
if ageChild.chronicleGetName() == ageName:
ageChronNode = ageChild
break
if type(ageChronNode) == type(None):
newNode = Plasma.ptVaultChronicleNode(0)
newNode.chronicleSetName(ageName)
newNode.chronicleSetValue("abcdefg")
chron.addNode(newNode)
else:
ageChronNode.chronicleSetValue("abcdefg")
ageChronNode.save()
示例3: _GetChron
# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
def _GetChron(needle, haystack):
for i in haystack.getChildNodeRefList():
child = i.getChild().upcastToChronicleNode()
if child is None:
continue
if child.getName() == needle:
return child
else:
chron = Plasma.ptVaultChronicleNode()
chron.setName(needle)
if default is not None:
chron.setValue(str(default))
haystack.addNode(chron)
return chron